M884
DoButton(24)
DoButton(23)
DoButton(22)
Code "G53 G0 X4.0 Y1.25 X-2"
While IsMoving()
Wend
DoOemButton(1008)
DoOemButton(1009)
M885
DoButton(22)
Code "G53 G0 X4.0"
While IsMoving()
Wend
DoOemButton(1008)
M886
DoButton(23)
While IsMoving()
Wend
DoOemButton(1009)
M887
DoButton(24)
Code "G53 G0 Z-2"
While IsMoving()
Wend
DoOemButton(1010)
Typically, you don't want to zero the axis in the homing macro.
Normally, if the machine loses position, you can home it to get position back, and continue.
When you zero the axis after homing, you can no longer do this, as you then need to "find" your origin again.