a million and one ways to skin a cat but wouldn't it just be easier to make the program a subroutine to update the workoff. If you wanted to add a "tweak" number so that you can shift all positions a certain amount but adding a variable like #(SHIFTX), and #(SHIFTY), then added that to each O1485 call [4] [0]. Making it look like O1485 call [4+#(SHIFTX] [0+#SHIFTY]
G54 Would be anchor location. Everything would be relative from this location. Probe or sweep in this location.
Code:
O1485 sub
G10 L2 P2 X[#1+#5221] Y[#2+#5222] (updates G55 to offsets passed from main routine )
( Pass thru number + anchor location )
(REPLICAPARTS.COM)
(RPC-0005)
(SEATBELT TRIM RING)
N100G90G80G40G0
T10M6(5/8 DIA. END MILL)
G55X.75Y-1.S3000M3
G43Z.1H10T11D31
N45G92X0Y0
X-.375Y1.
G1Z0F30.M8
...
...
**REST OF THE MACHINE CODE***
O1485 endsub
In the main routine you have
Code:
O1480
(REPLICAPARTS.COM)
(RPC-0005)
(SEATBELT TRIM RING)
(ON FIXTURE 10 AT A TIME.)
( calls subprogram O1485 )
( FIRST POSITION )
O1485 call [0] [0]
( 2ND POSITION )
O1485 call [2] [0]
( 3RD POSITION )
O1485 call [4] [0]
( 4TH POSITION )
O1485 call [6] [0]
( 5TH POSITION )
O1485 call [8] [0]
( 2nd ROW )
( FIRST POSITION )
( 1ST BRACKET X, 2ND Y )
O1485 call [0] [-2]
( 7TH POSITION
O1485 call [2] [-2]
( 8TH POSITION )
O1485 call [4] [-2]
( 9TH POSITION )
O1485 call [6] [-2]
( 10TH POSITION )
O1485 call [8] [-2]
M30
%
a nice thing i like about doing it this way would be that you can skip a location pretty easy. Just go the which ever position you want and block skip it. This makes things a lot easier if other people are going to be running the program as well.