Il problema è questo: in maniera casuale quando cerca lo 0 invece che andarci piano piano ci va "di corsa" con il conseguente rischio di spaccare la fresa
Codice: Seleziona tutto
CurrentFeed = GetOemDRO(818)
PlateThickness =19.5
ProbeFeed = 100
ZSal = PlateThickness + 5.0
Code "G90 F" &ProbeFeed
If GetOemLed (825)=0 Then
'Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-5 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 Z" & ZSal
'Code "G0 Z2.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