Hello everybody !

My DIY router is 99% finished but setting the Z probe proves to be a pain in the … .
After 3 weeks of reading, testing and so on, I manage to write a script based on M31 example from CSMIO site.
All seems to work fine except the fact that I could not reset the z value to zero in Mach3 screen. I give a try to G92 (it’s working) but there are too many warnings of how I should use this g code.
Any suggestion to solve this problem will be much appreciated.

This is part of my code:
If(GetUserDRO(1510) = 1) Then
Message("M31 Probe hit.")
Call SetDro (2, ZOffset)
Code "(Z zeroed)"
Sleep(1000)
Code "G0 Z20 F50"
Code "G4 P10"
Code "G0 Z-10 F50" (Touch plate has 10mm)