'simple Z-probe
GageH = 20 'enter the gauge height here
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZNew = GetOemDro(802) - 30 'probe down 30mm
Code "G31 Z" &ZNew & " F10" 'do the probing with 10mm/s
While IsMoving()
Wend
Call SetDro (2,GageH)
Code "G91 G0 Z10"
Code "G90"
Code "F" &FeedCurrent 'restore starting