Multiple Work offsets in PP

Results 1 to 12 of 12

Thread: Multiple Work offsets in PP

  1. #1
    Registered
    Join Date
    Dec 2012
    Location
    United States
    Posts
    161
    Downloads
    0
    Uploads
    0

    Default Multiple Work offsets in PP

    I’m writing a program to probe the center of 10 different parts on a fixture and am wondering the best way to set my zeros. Currently, I have my fixture in a G54 coordinate system and move to G55 for each part. I move the expected center of the part in G54 and run my probe routine. The probe routine switches to G55, finds the center and the sets the center to X0 Y0 in G55. I then move to this position and exit the subroutine. I change to back to G54, record the current position as a variable (x_1,y_1) and move to the next hole.



    O<probe> sub

    G55 (Switch to G55)

    .... probe finds center position and records values as #<center_x2>, #<center_y2>....

    G10 L2 P #5220 X #<center_x2> Y #<center_y2> (Changes coordinates so center is X0, Y0)

    G01 X0 Y0 (Move to hole center)
    G54 (Return to G54)

    O<probe> Endsub

    (Program Start)
    N1 G00 G90 G40 G98 (Absolute coordinate, cancel cutter comp and canned cycles)
    N2 G54 (start in G54)

    G00 x1 y1 (go to rough location of first hole)

    O<probe> Call

    #<x_1> = #5420 (Current X Location) (sets x hole center in G54)
    #<y_1> = #5421 (Current Y Location) (sets y hole center in G54)




    When I run the part I move to <x_1>, <y_1> in G54, switch to G55, set x=0, y=0 and run another subroutine for the part. I feel like there is a better/more efficient way to do this, but what is it? I would like to know a way to accomplish without using work offsets other than G54/G55, since PP maxes out at 9 (G59.3) and I may have high part fixtures in the future.

    Similar Threads:


  2. #2
    Member popspipes's Avatar
    Join Date
    Jun 2014
    Location
    United States
    Posts
    1780
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    I make multiple parts here but the Z0 is the same for all of them. I make a drawing in CAD of the multiple parts, then CAM them and cut as a G54 for all of them, I make 4 or 5 at a time, I dont know if this is what you had in mind or if they are different Z heights?

    mike sr


  3. #3
    Registered
    Join Date
    Dec 2012
    Location
    United States
    Posts
    161
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    That is what I do for the first side. When I flip the parts, I want to probe the center of all of them. My CAM doesn't support probing, so I have to figure something else out.



  4. #4
    Member popspipes's Avatar
    Join Date
    Jun 2014
    Location
    United States
    Posts
    1780
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    Quote Originally Posted by FuriousGeorge View Post
    That is what I do for the first side. When I flip the parts, I want to probe the center of all of them. My CAM doesn't support probing, so I have to figure something else out.
    Mine doest either, I put a center hole thru the stock piece and indicate off that on the reverse side. I dont use a probe, I use a coaxial indicator.

    wont the Pathpilot probing routine work for the reverse side?

    mike sr


  5. #5
    Registered
    Join Date
    Dec 2012
    Location
    United States
    Posts
    161
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    It will, but not if you want to set zeroes beyond G59.3. I'm trying to write a standalone probing G-code where I hit a button once and can have (n+1) unique zeroes for a fixture containing (n) parts.



  6. #6
    Member mountaindew's Avatar
    Join Date
    Nov 2007
    Location
    earth
    Posts
    2151
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    I would consider a strategy much like pop suggests combined with a fixture plates to hold the large number of small parts. The fixture plate would have a predefined location for each and every part in cam. When you flip the parts over to machine 2nd side all the parts would be located on center pins mounted to fixture plate. With the x,y,z, locations set to some easy to find place on plate and the cam program does the rest with numbers . This would avoid probing all those locations and the possible variance you would get. I find locating to be one of the more difficult tasks to perform with accuracy and repeatability although path pilot has improved this by a factor or two in my case anyway. I will admit I am a offset junky and use g55-g59 liberally in each and every one of my programs, in this case I would try to locate as few places as possible.

    Now On the subject of automatic probing to find locations like pp has built in. I like this idea and would like to program or include this behavior in my cam programs . In the past I researched how to include such things and decided it was above my skill level to develop at this point. I will follow any progress you post on this subject anyway
    Hope this helps



  7. #7
    Member popspipes's Avatar
    Join Date
    Jun 2014
    Location
    United States
    Posts
    1780
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    +1 on the fixture plate.

    My small parts are cut out of a solid bar on side a, for side b I mount a fixture, indicate it, bolt the bar of parts to the plate and machine side b, they separate into individual parts when side b is machined.

    If you are machining individual parts on side b then MD is right on with a fixture.

    mike sr


  8. #8
    Registered
    Join Date
    Dec 2012
    Location
    United States
    Posts
    161
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    Ask and ye shall receive...

    This is a test program that has two components. The first is a subroutine that finds the center of a pocket. This is a copy of Tormach's code with several changes made to it. It looks fairly complicated and cumbersome because it is designed to find and record a center position in any coordinate system. If you want the code to work that way, simply delete the G55 at the top and the G54 at the bottom of O<center_probe>. I put those two lines in there because I wanted to find a center while in G55 and record the value in G54. The code would look a lot simpler if it was designed to ONLY work in one coordinate system.

    The sub program locates a center position, sets that as the origin in the current workspace (G55 in this case) and then moves there. When the sub program exits, its current position is located as a variable. I figured out how to accomplish this without moving the the new origin to save time, but I believe it is better practice to do it the way it is. Having a program automatically change values for you seems dangerous to me and I think every effort should be made to mitigate the risk of crashes.

    The actual main program locates the 5 center holes of a 1-2-3 block set in a vice as pictured. Set the lower left corner to your origin and let her rip. The probe purposely moves slightly off center. The main program moves in G54, switches to G55 for probing and moves back. The final part of the program goes to the center hole of the block, changes to G55 and sets it as the origin. I've used the G10 command for this. Again, WATCH OUT CHANGING COORDINATE POSITIONS!!!! I used the command "G10 L20 P0 X0 Y0" Which will set wherever the machine currently is to zero, regardless of workspace. There are many ways to set a coordinate system to zero, but I think this is the safest.

    One final thing to note (that took me longer to realize than I care to admit). If you are using a cheap 1-2-3 block from Enco/Tormach/Whatever, The positional accuracy of the holes is TERRIBLE!!! I had one that was 0.015" off center in Y.

    Multiple Work offsets in PP-1_2_3-jpg

    O<center_probe> Sub

    (Probe to find center of a circular pocket)
    (rough probe and then fine probe 4 points, West, North, South, East)
    (this is designed to start near a center point dictated by a master program in G54)
    (Program will find exact center and label it in a G59.x coordinate plane)


    N1 G55 (sets G55 for sub routine)

    #<feed_ruff> = 20 (set rough feed rate to 20. I find this works well.)
    #<feed_fine> = [#<feed_ruff> / 20]


    (Get current position so we know where to return when done)
    #<x_int> = #5420 (Current X Location)
    #<y_int> = #5421 (Current Y Location)



    (This block of code checks to see if units are metric or imperial)

    o100 if [#<_metric> EQ 1] (check units)
    #<unit_conv> = 25.4
    o100 else
    #<unit_conv> = 1
    o100 endif


    (This block checks which workspace (G54-g59.3) you are currently in.)
    (Not really nescesarry since we are in G55 by default, but still good practice)

    o110 if [#5220 EQ 1] (G54, 5520 = current work space ID 1-9)
    #<workspace_x> = #5221
    #<workspace_y> = #5222
    o110 elseif [#5220 EQ 2] (G55)
    #<workspace_x> = #5241
    #<workspace_y> = #5242
    o110 elseif [#5220 EQ 3] (G56)
    #<workspace_x> = #5261
    #<workspace_y> = #5262
    o110 elseif [#5220 EQ 4] (G57)
    #<workspace_x> = #5281
    #<workspace_y> = #5282
    o110 elseif [#5220 EQ 5] (G58)
    #<workspace_x> = #5301
    #<workspace_y> = #5302
    o110 elseif [#5220 EQ 6] (G59)
    #<workspace_x> = #5321
    #<workspace_y> = #5322
    o110 elseif [#5220 EQ 7] (G59.1)
    #<workspace_x> = #5341
    #<workspace_y> = #5342
    o110 elseif [#5220 EQ 8] (G59.2)
    #<workspace_x> = #5361
    #<workspace_y> = #5362
    o110 elseif [#5220 EQ 9] (G59.3)
    #<workspace_x> = #5381
    #<workspace_y> = #5382
    o110 else (default to G54)
    #<workspace_x> = #5221
    #<workspace_y> = #5222
    o110 endif



    (This section of code determines the max positional values of the probe in X and Y.)
    (This is set to stop at the limit switches. In the future, code should be written)
    (to allow the user to input an expected value/diameter of the hole being probed.)



    #<x_max> = [[#<_ini[AXIS_0]MAX_LIMIT> - #<workspace_x> - .001] * #<unit_conv>]
    #<x_min> = [[#<_ini[AXIS_0]MIN_LIMIT> - #<workspace_x> + .001] * #<unit_conv>]
    #<y_max> = [[#<_ini[AXIS_1]MAX_LIMIT> - #<workspace_y> - .001] * #<unit_conv>]
    #<y_min> = [[#<_ini[AXIS_1]MIN_LIMIT> - #<workspace_y> + .001] * #<unit_conv>]



    (Set probe retract parameters)

    #<retract> = [.15 * #<unit_conv>]
    #<ruff_ret> = [.050 * #<unit_conv>]



    (west)
    G0 X #<x_int> Y #<y_int>
    F #<feed_ruff>
    G38.2 X #<x_max> (rough probe +X side)
    #<x_plus_ruff> = #5061
    G38.6 X [#<x_plus_ruff> - #<ruff_ret>]
    F #<feed_fine>
    G38.2 X #<x_max> (finish probe)
    #<x_w>=#5061 (save results)
    F #<feed_ruff>
    G38.6 X #<x_int> (return to start)

    (north)
    G0 Y #<y_int>
    G0 X #<x_int>
    F #<feed_ruff>
    G38.2 Y #<y_min> (rough probe)
    #<y_minus_ruff> = #5062
    G38.6 Y [#<y_minus_ruff> + #<ruff_ret>]
    F #<feed_fine>
    G38.2 Y #<y_min> (finish probe)
    #<y_n>=#5062 (save results)
    F #<feed_ruff>
    G38.6 Y #<y_int> (return to start)

    (east)
    G0 X #<x_int>
    G0 Y #<y_int>
    F #<feed_ruff>
    G38.2 X #<x_min> (rough probe +X side)
    #<x_minus_ruff> = #5061
    G38.6 X [#<x_minus_ruff> + #<ruff_ret>]
    F #<feed_fine>
    G38.2 X #<x_min> (finish probe)
    #<x_e>=#5061 (save results)
    F #<feed_ruff>
    G38.6 X #<x_int> (return to start)

    (south)
    G0 Y #<y_int>
    G0 X #<x_int>
    F #<feed_ruff>
    G38.2 Y #<y_max> (rough probe)
    #<y_plus_ruff> = #5062
    G38.6 Y [#<y_plus_ruff> - #<ruff_ret>]
    F #<feed_fine>
    G38.2 Y #<y_max> (finish probe)
    #<y_s>=#5062 (save results)
    F #<feed_ruff>
    G38.6 Y #<y_int> (return to start)


    (Calculate hole Center. "Workspace" is here to make program safer)
    (Workspace variable allows you to set the correct origin regardless of which coordinate system is used)

    #<workspace_x2> = [#<workspace_x> * #<unit_conv>]
    #<workspace_y2> = [#<workspace_y> * #<unit_conv>]
    #<center_x> = [[#<x_w> + #<x_e>] / 2]
    #<center_x2> = [#<center_x> + #<workspace_x2>]
    #<center_y> = [[#<y_n> + #<y_s>] / 2]
    #<center_y2> = [#<center_y> + #<workspace_y2>]

    (Sets origin. This is done in a cumbersome way, but it is seems like the best practice.)
    (This sets The correct zero for any workspace)

    G10 L2 P #5220 X #<center_x2> Y #<center_y2>

    F #<feed_ruff> (restore original feed rate)


    (This moves to the hole center. Set to SLOW SPEED for testing)

    G01 X0 Y0 F5 (Test procedure. Feel free to change to G00!)

    G54 (Return to G54)

    O<center_probe> Endsub

    (/////////////////////////////////////////////////////////////////////////////////)
    (\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\)
    (/////////////////////////////////////////////////////////////////////////////////)
    (\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\)

    (This program travels to the rough position of each of the center holes on a 1-2-3)
    (block. The block is placed in a vice so that the 3" length is parallel to the x-axis)
    (and the 1" width is parallel to the y axis. On my 1-2-3 block, this leaves 5 holes)
    (to probe. I jog Z down so that Z=0 is below the surface of the block and the Probe)
    (tip will make good contact with the block. X positions are purposely off center to test)




    (Program Start)

    (Set zero on lower left corner of 1-2-3 block!!!!!!!!)

    N1 G00 G90 G40 G98 (Absolute coordinate, cancel cutter comp and canned cycles)
    N2 G54 (start in G54)




    (hole 1)

    G01 Z2 F15
    G01 X 0.375 Y0.5
    G01 Z0

    O<center_probe> Call (For Test call, we will start at Z0 in the center of a hole)

    #<x_1> = #5420 (Current X Location)
    #<y_1> = #5421 (Current Y Location)


    (hole 2)
    G01 Z2 F15
    G01 X 0.915 Y0.56
    G01 Z0

    O<center_probe> Call (hole2)

    #<x_2> = #5420 (Current X Location)
    #<y_2> = #5421 (Current Y Location)


    (hole 3)
    G01 Z2 F15
    G01 X 0.915 Y0.52
    G01 Z0

    O<center_probe> Call (For Test call, we will start at Z0 in the center of a hole)

    #<x_3> = #5420 (Current X Location)
    #<y_3> = #5421 (Current Y Location)


    (hole 4)
    G01 Z2 F15
    G01 X 2.065 Y0.48
    G01 Z0

    O<center_probe> Call (For Test call, we will start at Z0 in the center of a hole)

    #<x_4> = #5420 (Current X Location)
    #<y_4> = #5421 (Current Y Location)

    (hole 5)
    G01 Z2 F15
    G01 X 2.595 Y0.496
    G01 Z0

    O<center_probe> Call (For Test call, we will start at Z0 in the center of a hole)

    #<x_5> = #5420 (Current X Location)
    #<y_5> = #5421 (Current Y Location)

    G01 Z2 F15


    G00 X #<x_3> Y #<y_3> (sends probe to center of middle hole)


    (This block sets a new origin. This is the "safer" way to do it.)
    (The same thing could be accomplished by omitting the G55 command and)
    (saying "G10 L20 P2 X0 Y0 :Where the "P-number" sets the coordinate system)
    (G54=P1, G54=P2... G59.3=P9)

    G55 (Switch to G55)
    G10 L20 P0 X0 Y0 (this sets the current position as the origin)

    M02 (end program)

    Attached Thumbnails Attached Thumbnails Multiple Work offsets in PP-1_2_3-jpg  
    Last edited by FuriousGeorge; 07-29-2015 at 01:24 PM.


  9. #9
    Member vmax549's Avatar
    Join Date
    Oct 2005
    Location
    Lady Lake
    Posts
    1145
    Downloads
    3
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    Probe the holes and store the XYZ Values as #vars When you are ready to work at that location retrieve the #var values Apply a G92 offset and get with it. You never have to leave G54.

    Just a thought, (;-) TP



  10. #10
    Member
    Join Date
    Dec 2008
    Location
    Switzerland
    Posts
    740
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    I was browsing through the PP probing routines and came across a "G38.6". I've never seen that before, so I tested it on my mill, and from what I could see it just appears to be a straight move to the given coordinate without any reaction to a probe contact at any time. So why does this code exist?
    Searching the net, the only reference I could find was in this post:

    Quote Originally Posted by FuriousGeorge View Post
    ...
    (west)
    G0 X #<x_int> Y #<y_int>
    F #<feed_ruff>
    G38.2 X #<x_max> (rough probe +X side)
    #<x_plus_ruff> = #5061
    G38.6 X [#<x_plus_ruff> - #<ruff_ret>]
    F #<feed_fine>
    G38.2 X #<x_max> (finish probe)
    #<x_w>=#5061 (save results)
    F #<feed_ruff>
    G38.6 X #<x_int> (return to start)
    ...
    So does anyone have any idea what's so special about this G38.6?
    Thanks
    Step



  11. #11
    Member
    Join Date
    Dec 2008
    Location
    Switzerland
    Posts
    740
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    Quote Originally Posted by TurboStep View Post
    So does anyone have any idea what's so special about this G38.6?
    Ok, sorry, just a case of RTFM!
    A more refined search just pointed me to the Tormach manual:
    "G38.6 – move away from the workpiece ignoring probe input"

    So why not just use a G0 as in the example from the manual?
    Step



  12. #12
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Multiple Work offsets in PP

    A little Google finds that G38.6 is a Rogge addition. Is it the start of having probe contact activate Feed Hold to avoid breaking the probe? If you activate Feed Hold on a probe contact then a G0 or whatever would do nothing so there would be no way to move out of contact. Just guessing...



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Multiple Work offsets in PP

Multiple Work offsets in PP