This is what I have as my script, it is set up as a metric script. you can change the plate to whatever thickness of plate you have. After you have finished setting up auto tool zero and are testing it make sure the touch plate will stop the Z axis by touching the plate, with your clip before testing it by lowering to the work piece. Also when testing auto tool Z lower the Z axis to near the work piece, then zero the Z axis before you press the auto tool zero, if the Z axis travels in the wrong direction you may have forgot to zero the Z axis I got caught out with this when I first tried it.
I am pretty sure this is how I have the script, but I will check later on today. Hope this helps.
Z zeroing macro by Scott Worden - Timber Lake Creations (and a little "Probe Var" tip from Brian ;-).
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = 0.80
ProbeFeed = 100
Code "G90 F" &ProbeFeed
If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-15 F" &ProbeFeed
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z12.0" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If