I'm just learning this script stuff in order to have touch plate zeroing capabilities. it seems to me that this routine attempts to touch the plate within 2" of down travel. if it never reaches the plate it still resets the Z DRO just as if it had reached it. should there not be a logic path for the situation of not registering a touch? I have looked at several different scripts and have the same question, i.e. what happens if the tool never touches? say you start the probe and the tool is 2.01" from the plate. it will appear to have touched, but it didn't, and no msg tells you the probe failed. am I missing something?
Message( "Auto Zeroing Z..." )
SetOEMDRO(ZaxisDRO, 0.0000)
Sleep 1000
If IsSuchSignal (22) Then
code "G31 Z-2 F10"
While IsMoving()
Sleep 100
Wend
' the thickness of the z touch plate described in this document is .180 inches
Call SetOEMDRO(ZaxisDRO, .180)
Sleep 100
code "G1 Z1"
End If