CurrentFeed = GetOemDRO(818)
DoSpinStop()

Cur = GetDro(0)
Move = Cur+20.0 'Maximum detection depth 20.0
Offset = Abs(GetOEMDRO(1000))/(-2) 'edge finder radius
Sal = Offset - 2.0 'After the completion of the knife, leaving the workpiece 2.0

If GetOemLed (825)=0 Then
Code "G4 P2.5"
Code "G31 X"& Move & "F25"
While IsMoving()
Sleep(200)
Wend
Probepos = GetDro(0)
Call SetDro(0, Offset)
Code "G4 P1"
Code "G0 X" & Sal
Code "(X zeroed)"
Code "F" &CurrentFeed

Else
Code "(Check Ground Probe)"
End If

Exit Sub   