There is really something I am not getting here. I have gone back to this simple way of scripting a work offset from a button but something is not right within my Mach Program.
As you can see below DRO's should read the same as the LoadMat x y and z values but it does not.\
If I have a LoadMatY value=328.3940 and hit my button the dro's read 328.3921! when the axis stops moving.
I have tried a variety of numbers in and around the value I acutually want and get a variety of DRO readings. If I 328.4000 gets you 328.4041? If I then enter 328.4041 the DRO's concur. It just seems random.
another question Is there a place to store a G92 offset?
I removed the last bit that zeros the DrO's to see where the axes actually come to a stop.
LoadMatX = GetUserDRO(1017)' read the stored values
LoadMatY = GetUserDRO(1018)
LoadMatZ = GetUserDRO(1019)
DoButton(24)
RefCombination (1 + 2)
While IsMoving()
Wend
Code ("G53 G1 X" & LoadMatX & " Y" & LoadMatY & " F1500")
While IsMoving()
Wend
Code ("G53 G01 Z" & LoadMatZ & " F600")'
While IsMoving()
Wend
DoOemButton(1008)
DoOemButton(1009)
DoOembutton(1010)
Frustrating to say the least and confusing all at the same time