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.