Alright! Found one of the problems. The one that destroyed my probe and also snapped apart one of the micro-switches in my intermediate probe after I thought I'd fixed the issue.
The issue lies in the psng_probe_table.ngc and surfaced when I started using the probe_z_minus_wco.ngc. I added diagnostics in the form of (PRINT, ) statements.
Here's a piece of it.
Code:
o<psng_probe_table> sub
; BEGIN PSNG PREAMBLE
M73 ; Save and autorestore model states. This will be used only in case of error, otherwise we will invalidate it.
o<_psng_modal_save> call
o<_psng_hook> call [3]
; END PSNG PREAMBLE
; Save current Z position
#<z>=#<_z>
; Ensure we're in G90 / absolute mode
G90
; Probe Table
o<_psng_probe_z> call [-#<_hal[probe.ps_probe_max]>]
Notice the save current Z position. This is the sort of documentation that is so typical in a lot of software. I can see they are saving the Z position. Not why. It's like a Pascal Statement like Pi := 3.14; And the comment reads Assigning PI into the variable Pi. Duh!
Now once the probing is complete which called _psng_probe_z.ngc which in turn called probe_z_minus_wco.ngc where the #4000 new G54 (or whatever co-ordinate system was active) was updated since we now have a new zero position.
Come back to psng_probe_table.ngc and here's the fault. I added a test and message to prevent future switch damage.
Code:
; Move off the Table
(PRINT, Move off Table: <z> is #<z>
O2 if [#<z> GT 0.000]
G0 Z#<z>
O2 else
(PRINT, <z> is negative, would move into probe)
O2 endif
So why is it happening?
Well when the <z> value is saved it may well be say -2.0
While probing the knee moves up slowly, switch opens and then knee moves down again until switch closes again. Now the G38.2 is done and it's moved down just far enough for that clearance parameter.
The probe touched the top of the 1-2-3 block and that becomes our new 0.0000 since G54.Z has now been changed. The probe is above the work by the #<z_clearance>]
And then for some undocumented reason the code, at full G0 speed heads to that saved <z> location in the psng_probe_table.ngc G-Code.
A negative move, by convention is towards the tool. So our tool (the probe) is still 0.2" above the test point and then the knee is told to move to -2.0 at full 150 IPM.
After crushing the tool and switch assembly pressing hard now against whatever was probed (1-2-3 block on table) the servo drive faults with a following error since it's telling the motor to go to -2.0 but the knee can't go any higher since the probe can't crush any thinner.