Something along these lines will work. The #2000 Var is set for testing ONLY. Please Note that the probe STOPPED axis dro position will never be the same as the trip position(#2000) so it is best to use the trip position to compare. Also note that IF you did not calibrate the probe then the trip position is NOT the same as the actual touch point. it will be OFF by the switch travel to trip value.
'Macro to Probe, Compare values to stop
SetVar(2000,.4)
SetVar(100,1)
SetVar(200,1)
Code"G31 X#100 Y#200 F20"
While Ismoving()
Wend
If GetVar(2000) >= GetVar(100) Then
Message" Target Missed Mach3 will stop "
DoButton(3)
End
End If
If GetVar(2000) < (GetVar(100)-.5) Then
Message " Premature Target Strike Mach3 will Stop"
DoButton(3)
End If
End
(;-) TP