Re: Help with offset macro!
Not sure if this would what you are looking for
The n2222 will take machine co-ordinates and put them into g54
if you are tramming a fixture point then adding multiple work offsets i use g54 as the base and add to get the work offset (#7001=#5221+3.000 x axis distance from g54 add3.00 to use g54.1p1 for the part work offset)
G54=#5221X
#5221Y
#5223Z
#5224A
I run a subroutine to do my work offsets to keep them within the program
M98Q2222 ( GOTO N2222 at the end of my programs run it once then bracket) or it could be done with the G65 command
IF[ABS[#5221-15.00]GT.02]GOTO999
blah,blah,blah
N999#3000=1(X WORK OFFSET OFF)
m30
N2222
#5221=15.000(x axis value for g54)
#5222=7.000(y axis value for g54 )
#5223=4.000(z axis value for g54)
#5224=0.00(a axis value for g54)
%