On occasion, my switch used on the G31 probe would stick, either due to crud that had managed to get in there or something had jammed in there keeping the torch raised slightly, basically meaning the digitise input was active before I zero'ed for a cut.
When this happened Mach3 would sort of hang for a while, then output a message to say Probe ignored, but then the axis would actually move at a very slow rate and the DRO's go at a different rate. It meant that I would need to hit stop, remove the obstruction and then try and reset the position back up on the table as it was prior to the zero heigh macro.
Anyway, not knowing why Mach3 did as it did, I have changed my macro M800.m1s to the one below, It will check for active probe before doing the zero action, if Active it does an "M1" to stop everything and sticks a message in the status window, but at least it does not then go on to move the axis around, giving me the chance to remove the obstruction, back step a line and try again.
Code: Select all
' Adrian Hodgson M800.m1s
' Update 15/06/17 revised 16/06/17
APH = 2.50 ' Define Above Pierce Height
HA = -3.6 ' Define the Height Adjustment
If GetOemLed(825) Then ' The probe LED is already on
Code "M1" ' Code out the M1 to stop the machine if set to allow
Message "Probe input error!" ' notify
Else ' probe not set
Message "" ' clear message
Code("G31 Z-30.0 F600") ' probe surface
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend ' Wait end
ZprobePos = GetVar(2002) ' get contact point
Code("G0 Z " &ZprobePos) ' return to point to remove overshoot
While (IsMoving()) ' Wait For movement To complete
Sleep(100) ' Sleep, so other threads can run While we wait
Wend ' Wait end
Call SetOEMDRO(802, HA) ' Set Z DRO = 0.00
Code("G1 Z "& APH &" F600") ' go to just above pierce height
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend ' Wait end
End If ' End
Adrian