Still playing with the Ref All Home button script. I would like the Z axis to go up to work coordinate of 1, then the X,Y axis moves to the home position and then the Z axis go down to work coordinate 0. And in that order. What is happening is the Z axis will go up to 1 and then down to 0 and then the X, Y axis moves to the home position. Close but not quit there.
Here is the script that I used:
Code("G0 Z1.000")
' Wait for movement to complete
While IsMoving()
' Sleep, so other threads can run while we’re waiting
Sleep(100)
Wend
' Done
RefCombination(3)
' Wait for movement to complete
While IsMoving()
' Sleep, so other threads can run while we’re waiting
Sleep(100)
Wend
' Done
Code("G0 Z0.000")
DoOEMButton(133)
DoOEMButton(134)
Thanks.
Rick