587,396 active members*
3,637 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Posts
    162

    GOTO creates new program

    today when i was trying to load my new barpuller macro and ran into a snag

    O7001 (Bar pulling subprogram)
    (G65 CALL MUST INCLUDE W ADRESS)
    M05 (Stop spindle)
    G28U0W0

    %
    IF[#24=1.0] GOTO 4000
    IF[#502LT#23]GOTO 4000
    T1212 (Index turret to bar puller station)
    G00 X0 Z-[#23 + #101 + - 0.2] (Rapid to approach position)
    G98 G01 Z-[#23 + #101] F20.0 (Select ipm mode, engage bar at 20.0 ipm)
    M8(ENGAGE BAR PULL CLAMP)
    G4X1.0(DWELL ENGAGE)
    M11 (Open jaws,)
    G04 X1.0 (Pause to allow jaws to open)
    G01 Z[#102] F30.0 (Advance bar at 30 ipm)
    M10 (Close jaws)
    G04 X2.0 (Pause to allow jaws to close)
    M9(DISENGAGE PULLER)
    G04 X.5(DWELL DISENGAGE)
    G0 W1.5 (Disengage bar at 20.0 ipm)
    #502=[#502-#23]
    G99 G28 U0W0
    M01
    M99

    N4000
    M11
    M0
    (REMOVE REMNANT FROM SPINDLE)
    (REMOVE REMNANT FROM SPINDLE)
    (REMOVE REMNANT FROM SPINDLE)
    (REMOVE REMNANT FROM SPINDLE)
    G0T0606
    G0X-1.0 Z[#102](MOVE CUTOFF TO FACE POSITION)
    M0
    (LOAD NEW BAR TO CUTOFF)
    (LOAD NEW BAR TO CUTOFF)
    (LOAD NEW BAR TO CUTOFF)
    (LOAD NEW BAR TO CUTOFF)
    G0 W1.0
    G28U0W0
    #502=[#501-#503-#504-#102](SET BAR REMAINING)

    %

    my GOTO statement is creating a new program 4000

    what am i doing wrong?
    this is my first delve int real macro programming,

    i dont have problems on my other machines with goto statements

    control is a fanuc 18t and we just brought it back from a no batterty condition(previous owners disgruntled employee)

    for now i will just delete my goto's for inputing

  2. #2
    Join Date
    Jul 2010
    Posts
    118
    hi,
    please check if you have macroB function,
    you should see the "macro" screen for the 100 variable's
    regards
    norbert

  3. #3
    Join Date
    Mar 2003
    Posts
    2932
    The % before the GOTO probably is causing this. Also, you don't have an M99 at the end of the macro.

  4. #4
    Join Date
    May 2011
    Posts
    27
    O7001 should be on your first line of your macro and M99 should be on the last line of your macro.
    You're GOTOs should be going to line numbers that are inside your macro before your M99.

  5. #5
    Join Date
    Nov 2007
    Posts
    188
    may just be a type O but try removing the space GOTO4000 Not GOTO 4000

  6. #6
    Join Date
    Aug 2011
    Posts
    2517
    the machine adds spaces between GOTO and 4000. A space there is fine.

    The problem as stated above is the first %
    you can't have a % in the middle of a program. it will create a new program starting with the next found number (in this case it will create O4000)

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. Tesla Turbine Creates Liquid Electricity!!!
    By tobyaxis in forum News Announcements
    Replies: 11
    Last Post: 06-18-2009, 10:43 PM
  3. Qoodaa MNP2P Creates a New Epoch of Internet Transfer
    By angelstar in forum OpenSource Software
    Replies: 1
    Last Post: 05-10-2008, 03:49 PM
  4. Dell 3100 creates chatter w/mach software
    By wes in forum Mach Mill
    Replies: 6
    Last Post: 10-17-2007, 09:00 PM

Posting Permissions

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