587,108 active members*
3,738 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Haas Machines > Haas Mills > need better method for program exit routine
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Posts
    28

    need better method for program exit routine

    I post my programs using work coordinates G54 thru G59 from surfcam. After I run or setup a part the tool moves to a clearance location based on the work coordinate G111 called from a sub routine that is always in the control.

    I set the work coordinate G111 when I 1st manually move the tool away from the part for clearance, and then capture it in the G111 offset page. It is an arbitrary and random spot which is what I want so that i don't have to write it in the main program.

    This works fine until I do a program mid-start. The Haas control assumes it should use the last modal work coordinate G111 because i skipped over the beginning G54 part of the program.

    How can I make the G111 a one time use and then return to using the original work coordinate without stating it again just before the M30? I want to have the original work coordinate stated 1 time at the beginning of the program.

    I am not quite sure how a G53 works or if it can be used for what i want, I am looking for a way to just quickly "capture" the arbitrary clearance location and not edit the program once written.

    If anybody has an idea or are currently doing something similar I would appreciate any suggestions.

    Thanks
    Bob Flores
    MMTechi
    [email protected]

    sample program

    %
    O777
    G54 G17 G90

    N6
    G90 G40 G80 M1
    T6 D6 M6
    /M8
    G90 G0 X0. Y0.
    G43 H6 G0 Z0.4
    S752 F0.9
    M3

    G82 G98 X0. Y0. Z-0.77 Q0.125 R0.1 P0 F0.9
    G80

    N100
    M98 P89995 (EXIT SUB PROG -CAPTURE G111 AT CONTROL)
    M30
    %

    -this what the exit sub routine in the control does-

    O89995
    M9
    M5
    G111
    G90 G40 G80 G0 X0. Y0. Z0.0
    M99

  2. #2
    Join Date
    Apr 2010
    Posts
    200
    You can put a line in the sub after the move to recall G54 if that's the normal offset used, but it would ned to be changed to reflect the WCS you are using:
    O89995
    M9
    M5
    G111
    G90 G40 G80 G0 X0. Y0. Z0.0
    G54 <---needs to be changed to match whatever WCS in the program
    M99

    Or edit the post to output the WCS after the sub callout. This way it would always be the WCS used:
    N100
    M98 P89995 (EXIT SUB PROG -CAPTURE G111 AT CONTROL)
    G54 (or G55, G56, etc.)
    M30
    %
    If you are just retracting the tool to clear it from the part, then you could just edit the post to put it right in the program instead of a sub.
    When I have an indexer in the machine or a tall part or a long tool, I have a post that moves the tool to a "safe" location for a tool change. I use G125 for the location:
    %
    O690 ( RING FIX OP1 )
    ( T10 - 1/4 SPOT )
    G17G40G80G90G0G54
    N10
    T10
    G90G0G125X0Y0
    G54
    M6
    ( OPERATION 1; HOLES )
    ( TOOL 10 )
    ( 1/4 SPOT )
    S6000M3
    G90G0G54X-3.25Y1.6
    G43Z2.H10M8
    G73G98X-3.25Y1.6Z-.075R.1Q.012F21.
    Y-.025
    Y-1.65
    Y-3.275
    G0G80Z2.
    M9
    G91G28Z0.M19
    G91G28Y0.
    T10
    G90G0G125X0Y0
    G54
    M6
    M30
    %
    This is for a Haas vertical, what kind of machine are you programming for?
    When you restart, do you use the restart function in the controller? It should pick up the active WCS. If it doesn't then there is something wrong.
    I never used G53 for anything other than sending the machine to it's home position. The same as G91G28Z0 = G53Z0.

  3. #3
    Join Date
    Sep 2005
    Posts
    28
    Hi Pondo, Thanks for the reply.

    I have a haas vertical mill. I do understand and have used your methods. I guess I am just being lazy but I want to try and avoid having the WPC stated more than once in the main program. I keep multiple setups and vises on the table and change the wpc often and sometimes save the offsets from a previous job and just edit for the next available wpc. I don"t always remember what WPC is available when posting out of surfcam. The closest method that works is when I post the program It prompts me for which wpc I want to use and it puts it at the top of the program and before the M30.

    The kind of mid start I use makes the Haas midstart setting go thru a bunch of motions that I don't want or need ( I will output the wpc before the m30 before turning on the midstart on setting)

    I like moving the spindle away to a random spot that clears the part, keeps coolant from dripping, and is easy to blow off part and just capture that location to the offset page.

    I almost have it the way I like, was just looking for a non modal work coordinate command

    Thanks for suggestions, any are always welcome

    %
    O777 (MOWER_SHAFTPULLEY_1.NCC 0:10:59)
    G54 G17 M0

    M99 P6 (T 6 - 0.3770 -0.7700)
    M99 P11 (T 11 .5 DIA MILL AROUND THD 0.5000 -0.1450)

    M99 P100 (END PROG POSITION)

    N6
    G90 G40 G80 M1
    T6 D6 M6
    /M8
    G91 G41 G1 X-.02 F100.
    G90 G0 X0. Y0.
    G43 H6 G0 Z0.4
    S752 F0.9
    M3

    G0 X0. Y0.
    G0 Z0.4

    G40
    G82 G98 X0. Y0. Z-0.77 Q0.125 R0.1 P0 F0.9
    G80
    G0 Z0.4


    N11
    G90 G40 G80 M1
    T1 D1 M6
    (.5 DIA MILL AROUND THD)
    /M8
    G91 G41 G1 X-.02 F100.
    G90 G0 X0.1425 Y0.
    G43 H1 G0 Z0.4
    S4000 F35.0
    M3

    G0 X0.1425 Y0.
    G0 Z0.4

    G0 Z0.1
    G1 Z-0.145 F10.0
    G3 X0.2425 I0.05 J0
    I-0.2425 J0 F35.0
    X0.1425 I-0.05 J0 F10.0
    G0 Z0.4


    G91 G40 G0 Y.05
    G90


    N100
    M98 P89995 (EXIT SUB PROG -CAPTURE G111 AT CONTROL)
    T1 M6 G54
    M30
    %

  4. #4
    Join Date
    Jul 2005
    Posts
    12177
    I have not read everything in detail in your posts but it sounds like you do not have Program Restart turned on in your machine. When this is turned on the machine scans the program ahead of the point you are restarting at and makes sure all the offsets are correctly set. This means that you cannot get an offset carried over from the previous cycle.

    Alternatively instead of using your G111 location you may be able to use G53 to park your machine using machine coordinates. G53 is a non-modal command that tells the machine to move to the specified location in machine coordinates; G53 X0. Y0. Z0. moves it home, G53 X-15. Y-8.0 Z3.0 moves the the center of the table and lifts the spindle above the tool change position on a VF2
    An open mind is a virtue...so long as all the common sense has not leaked out.

  5. #5
    Join Date
    Apr 2010
    Posts
    200
    I do the same thing. I run a couple repeat jobs and they have dedicated WPC's.
    All of the posts I use output the active WPC at the start of each tool, so when I restart I just search down to the tool # and hit cycle start. I don't use the restart in the controller often either for the same reason you said. Plus I have a bunch of program segments in MDI for moving to the tool touch off point, WPC XY0, setting the spindle speed for the edge finder, shuttling the pallets, etc. If restart is active it reads the M30's between them and won't do anything.
    If I have to change the WPC, I use the F1-search-find and replace text. That changes all of them in the program.
    Do you use the sub before each tool or just at the end? If it's just at the end, then have the WPC recalled at the end of the program, before the M30. You mention it posts out like that, do you edit it out?
    I have the mills go home in Z and Y at the end, and then I add a line to move the table to an X position for the same reasons you do as well. I just handwheel it to where I want it and put that location in at the end:

    G91G28Z0.
    G91G28Y0.
    G90G0X12.
    M30
    %
    Since 99% of the time I want the table towards me as far as possible, all I need is the X to be moved.

Similar Threads

  1. program exit sub routine
    By MMTechi in forum G-Code Programing
    Replies: 3
    Last Post: 06-11-2009, 10:51 PM
  2. G70 exit commands with a -u.
    By rapidtraverse in forum Haas Lathes
    Replies: 35
    Last Post: 01-14-2008, 04:34 AM
  3. Entry exit arc leaving bump
    By SIG in forum Fanuc
    Replies: 24
    Last Post: 12-21-2007, 12:57 PM
  4. How to exit large assembly mode?
    By interflexo in forum Solidworks
    Replies: 3
    Last Post: 09-25-2006, 09:21 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
  •