cncjs-kt-ext
cncjs-kt-ext copied to clipboard
Add probe collision protection
Issue: Killed my CNC probe tip when starting the plug-In. While totally my own fault I suggest to add some level of protection to the code since it works with absolute G0 coordinate moves.
What happed: I zero'd out WCO of my machine to the vice surface. Then I added a piece of wood to the vice and forgot to redo Z-offset... Started the plug-in. The absolut move to Z2
by the plug-in - which was now 30 mm below the wood's surface - rammed the 3D probe tip into the material and broke it.
How to prevent: During start of plug-in add a test current position if Z-height from context is <= 2mm
and stop execution with Error
if current position is above.
Reasoning: Upward moves are typically safe while absolute downwards moves with G0-speed can lead to disasters ;-) So instead of unconditionally doing a G0 move the user should safely bring their probe's tip to a safe Z-starting point before auto-levelling starts. This way all G90 G0 moves are only upwards while all downward moves are protected due to usage of G38.2.
If implemented an additional usage note should be added. Something like "Note: This plug-in can only be started if the machine has already been moved to a safe starting Z-Position of 0..2mm before activation."