586,409 active members*
3,348 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Jul 2007
    Posts
    82

    GOTO jump instruction

    Hi

    In Nakamura TW-10 with controller Fanuc 18T I'm not able to jump over the block of the program GOTO10, GOTO#10 (as book says) gives me back alarm message 004 adress not found. I'm sure there is block N10 in my program. Any clue?? Thank You for any advise

  2. #2
    Join Date
    Jan 2007
    Posts
    91
    GOTO10 would be correct
    GOTO#10 will not work
    It can only jump to a line number, not a varible number. You will need to have macros enabled on your control to use GOTO command.

  3. #3
    Join Date
    May 2007
    Posts
    781
    Quote Originally Posted by jamesweed View Post
    GOTO10 would be correct
    GOTO#10 will not work
    It can only jump to a line number, not a varible number. You will need to have macros enabled on your control to use GOTO command.
    But this should work just fine.
    Code:
    #10 = 10
    GOTO#10 
    .
    .
    .
    .
    N10 ...

  4. #4
    Join Date
    Jan 2007
    Posts
    91
    I dont think you can assign varibles to line numbers.

  5. #5
    Join Date
    Feb 2008
    Posts
    586
    The correct syntax for MY Fanuc is GOTO10

    Sometimes you can use

    M99P10

    Instead of the GOTO statement

    Does the same thing, unless its from a sub, then it would return to the main program looking for an N10

  6. #6
    Join Date
    Jul 2007
    Posts
    82
    Thank U Guys, I think "You have to enable macros in your machine" is correct :-); In my swiss simple GOTO10 works without any problem, GOTO#10 is taken from Fanuc Programing Manual. Now I have to figure out how to check "macros enabling" in my TW-10, heh I love this job...:-)

    :cheers: for all

  7. #7
    Join Date
    Jan 2007
    Posts
    91
    Quote Originally Posted by maximusek View Post
    Thank U Guys, I think "You have to enable macros in your machine" is correct :-); In my swiss simple GOTO10 works without any problem, GOTO#10 is taken from Fanuc Programing Manual. Now I have to figure out how to check "macros enabling" in my TW-10, heh I love this job...:-)

    :cheers: for all
    "GOTO#10 is taken from Fanuc Programing Manual"... Ive never seen such a example, but to check if you have macro option just MDI #1=1 If it alarms out, you dont have the option my friend If you do have macro option, then GOTO10 should work just fine
    -Jim

  8. #8
    Join Date
    May 2007
    Posts
    781
    It has been a while since I used it and now that I think of it some controls may want the variable in []. I have used this type of program on both Mit and Fanuc controls.
    GOTO[#10]


    It is just like when you use a variable in a gcode word like the code below.
    Set #3 to 0 and the path goes around counter clockwise, set it to 1 and the path goes around clockwise. You can do this type of thing when you want to mirror the cut but still climb mill on both mirrored and non mirrored parts.

    Code:
    #3=1  (0 COUNTER CLOCKWISE, 1 CLOCKWISE)
    
    G0X0Y0
    G1G[41+#3] X1.000 D1 F20.0
    G1 Y[-0.750*[[#3*2]-1]]
    G[3-#3] X0.750 Y[-1.000*[[#3*2]-1]] R0.250
    G1 X-0.750
    G[3-#3] X-1.000 Y[-0.750*[[#3*2]-1]] R0.250
    G1 Y[0.750*[[#3*2]-1]]
    G[3-#3] X-0.750 Y[1.000*[[#3*2]-1]] R0.250
    G1 X0.750
    G[3-#3] X1.000 Y[0.750*[[#3*2]-1]] R0.250
    G1 Y0.000
    G1G40 X0 Y0

  9. #9
    Join Date
    Jul 2007
    Posts
    82
    Quote Originally Posted by jamesweed View Post
    "GOTO#10 is taken from Fanuc Programing Manual"... Ive never seen such a example, but to check if you have macro option just MDI #1=1 If it alarms out, you dont have the option my friend If you do have macro option, then GOTO10 should work just fine
    -Jim
    Because I don't like to be a liar :-) Fanuc 16Tc-18Tc Operators Manual - chapter 16 Custom Macro - 16.5.1 Unconditional Branch (GOTO Statement) page 290. It wasn't Programming Manual though - sorry

    Thank You for second part of your post...

  10. #10
    Join Date
    Jan 2007
    Posts
    91
    maximusek,
    I wasn't calling you a liar! and your right its in my macro section as well...so i'm the liar! It doesnt give a example how to use this GOTO#10
    I will have to check this out today. I've never seen such a thing??? learn something new all the time. Did you find out if you have macros?

    %
    #10=1;
    GOTO#10;
    ;
    ;
    N2;
    N1;
    M30;
    %
    Okay, this does work. My apolgies to everyone involved in this thread. I learned macros on Allen/Bradley contols and this doesn't work there. I learn new stuff all the time. Which is why I like to program macros in the first place. I think what I was thinking was this...N#10. That would not work.(or would it??? )

  11. #11
    Join Date
    Jul 2007
    Posts
    82
    jamesweed,

    I know You didn't call me liar, maybe I should answer different way, I apologize. The reason I asked about is: making program is one thing but setup is another. Many times I have to compromise cycle time and f.ex. good surface finish or tool life. It is very usefull to jump over the part of the program using just GOTO (next block) to change the order of operations etc.etc. When First Part Raport is done and spindles are still in the same place I clean everything to prepare final version to back it up, but during setup, program looks like war zone :-). I was very suprise when in my swiss GOTO100 works ok and in tw-10 Nakamura not. Maybe tomorrow I'll check it out, interface looks like MS-DOS, I suspect I don't have macros enabled. That lathe is the oldest machine we have. That may be a problem. Anyway thank You Guys for help- jamesweed, Andre'B, beege - :cheers:

  12. #12
    Join Date
    Jan 2007
    Posts
    91
    maximusek you have a private message.

  13. #13
    Join Date
    Feb 2008
    Posts
    6

    GOTO

    You dont need to assign a variable...

    GOTO#10
    .
    .
    .
    .
    .
    N10

    The N is the address for the #(Sending Factor)

    should work..

  14. #14
    Join Date
    May 2007
    Posts
    1003
    I realize I am a little slow at times, but the only function I see for GOTO in my Fanuc manual is to jump to a block. What would be the advantage of using the # sign, especially if Beta is correct? I have to assume the only thing GOTO is going to look for is N????.

  15. #15
    Join Date
    Jan 2007
    Posts
    91
    Thats what made me assume that GOTO#10 wasn't an allowed statement. But I suppose one could have logic determin what line number to goto. Example maybe something like this...
    #103=2;
    IF[#100GT#101]THEN#103=1;
    GOTO#103;
    ***;
    ***;
    N1;
    N2;
    M30;

    I realize that alot of fanucs dont have the IF/THEN option, in that case I dont know what use it would have.
    Like I said, I've never had the thought???

  16. #16
    Join Date
    May 2007
    Posts
    1003
    True except wouldn't

    IF[#100GT#101]GOTO1
    GOTO2
    ***;
    ***;
    N1;
    N2;
    M30

    serve the same purpose?

    I just found out his past week that one of our barfeeds with an OT control doesn't support THEN, so I used GOTO to accomplish the same objective.

  17. #17
    Join Date
    Jan 2007
    Posts
    91
    I agree, I wish the fanuc manual had a example of its intended use. I learned macros on Allen/Bradley 9 series controls and they didnt have "THEN". IF/GOTO was it. I'm with you, I dont see a use for it. I havent wrote a new macro for awhile, but I'll put GOTO#? on the back shelf and see then.

  18. #18
    Join Date
    Aug 2006
    Posts
    17
    Here is an example of how i use it.

    On our lathes we might have several re occuring jobs we run on the machine. Most of the tools are common between jobs but not always. I program in my work shifts for every job like so.

    Main program;

    O2349

    #500=2349.(this program number)
    M98P9999(LOAD WSHIFT)


    N100(BAR FEED)
    ;
    ;
    ;
    ETC.
    M30


    SUB PROGRAM;

    O9999(WSHIFT SUB)
    GOTO#500(JUMP TO PROGRAM NUMBER)


    N1001(O1001 WSHIFT)
    G10P0Z-3.223
    M99

    N2112(O2112 WSHIFT)
    G10P0Z-1.11
    M99

    N2349(O2349 WSHIFT)
    G10P0Z-4.433
    M99

    This way no one forgets to change the wshift and i have unlimited wshifts. press start and go.

  19. #19
    Join Date
    May 2007
    Posts
    1003
    Finally...a use for the GOTO# statement.

    How does one forget to set the workshift? Hope you don't forget to set the correct value in #500.

    However, this seems a little more complicated than necessary. I set the workshift for most of the machines right in my programs.

    :3216 (102424-001-REV.AD)

    N100G10P0Z-3.45 (BARSTOP)
    G200
    M1

    or

    :4319 (ORA-10185-REV.E)

    N100G10P0Z-7.68 (BARSTOP)
    G65P9018X1.55F.01S800M4000T202
    M1

    or

    :1818 (IRA-4445-REV.NONE)

    N100G10P0Z-#530 (BARSTOP)
    G200
    M1

    For #530, set-up guy sets workshift like he normally would. Then puts the POSITIVE value in #530. I take care of the minus sign so he never has to worry about forgetting to put it in. There is a reason why a few of the lathes are set up this way.

    G200 is the call for my barstop subroutine regardless of the make. I try to keep subprograms and variable usage, etc. the same for all machines as much as I possibly can as our operators may be called upon to run any of them. Saves on confusion.

    The G65 call is for the 4 foot barfeeds as they automatically load a new bar, and my subroutine dresses the barend before barstopping a 2nd time so as not to scrap the first part if it isn't cut very square. This sets the X-axis clearance starting point, the feedrate, the SFM, the max RPM, and the tool doing the facing (99.9% of the time it will be the same. I like to be prepared for that other .1%.).

  20. #20
    Join Date
    Aug 2006
    Posts
    17
    We are running 2 and 3 turret lathes with sub spindles.(lots of wshfts!)and most of the parts we run can be ran on any of the machines. The wshifts are not in the main programs because all the machines wshfts are not exactly the same but we want the Main programs to all be the same. So if i make a program change on 1 machine i can just load it up in all the other machines and not have to worry about matching the wshifts to the machine. We do alot of changeovers so the time and error proofing savings add up. Operators can do the changeovers(collet,jaws and program number) but cannot and do not need to change the wshfts(which is a good thing in my opinion).

Page 1 of 2 12

Similar Threads

  1. Using GOTO in a mazak program
    By CAMCRASH in forum G-Code Programing
    Replies: 8
    Last Post: 03-16-2012, 11:31 AM
  2. GOTO Z button
    By TMaster in forum Mach Mill
    Replies: 10
    Last Post: 05-30-2009, 01:18 PM
  3. Z goto 0 first ?
    By SScnc in forum Mach Mill
    Replies: 7
    Last Post: 08-10-2008, 06:31 PM
  4. GOTO Z
    By monte55 in forum Mach Software (ArtSoft software)
    Replies: 12
    Last Post: 02-06-2008, 04:03 PM
  5. Goto Z's button... also the @#$%#$% wizard...
    By InspirationTool in forum Mach Mill
    Replies: 2
    Last Post: 04-02-2007, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •