5
« on: December 30, 2006, 06:40:34 PM »
I have a Z-zeroing routine that touches off a plate. With version R2.0.030, when the plate is touched and the Z is supposed to retract to a set height of 2" it goes to approx. 3.5". If run a second time, it retracts even further. I can't seem to find what may have changed in the latest version that may be causing this, but it seems to have something to do with G31 probing in any axis. I reverted back to version R2.0.029 and it works fine. I have a custom screen set with some added DRO's for this zeroing routine, but I don't see anything that should conflict with it.
Here's the script for the Z-zero routine.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.
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
Call SetOemDro (802, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
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
Regards,