I am trying to write a macro to zero my Z. I want the spindle to home itself up at the limit switch, then move to a specified location, then move down to the touch plate.
Here is my macro. It was working for a while, now it does the steps out of order. It moves in XY before doing the G28.1 Z0
Code "G28.1 Z0"
Code "G0 X0.44 Y-0.46"
Code "G31 Z-4.0 F9"
While IsMoving()
Sleep(200)
Wend
Call SetDro (2, 0.6324)
Code "G1 Z0.8"
Code "G0 Y1"
Code "G0 Z0"