Protected Moves with a Touch Probe
-
@chrishamm A feature I've had in MillenniumOS (probing macro package for RRF, for use with touch probes on CNC machines) is protected moves.
The concept is pretty simple, rather than using
G1
to move to calculated positions around the workpiece, every travel move is actually a probing move (usingG38.3
) as well - so if the touch probe hits something unexpected, like a clamp or vise then the move will stop instantly and mostly avoid any damage.However - we still use the DWC MovementPanel and Dialog Boxes for jogging to the probe starting location, which leaves a big 'unprotected' gap as these features only ever send a
G1
command.I actually damaged my first probe by missing a Y- jog button and hitting the Z-25 button instead.
I'd like to implement protected movements in DWC when in CNC mode, and I think this would take either 1 or 2 settings - a probe ID selector to pick the probe to watch during moves, and potentially a toggle to enable or disable protected moves (this could be done as 1 input where the probe ID is set to -1 if protected moves are disabled).
Given that touch probes can be installed / removed, I think it's necessary to have the option to enable / disable protected moves via the movement panel and / or jog buttons in the dialog window directly, rather than it being in the machine settings page or something like that.
I'm happy to implement this and submit it as a PR, but I'd like to know if:
- Would this be something you'd likely accept as a new feature to DWC?
- Do you have any particular feelings about where these settings should go, or any thoughts on how this behaviour should function?
cc @jay_s_uk
-
@NineMile I'm sorry but my CNC machine isn't operational at the moment so I cannot really check your PR. Perhaps @Sindarius can comment on this, he developed the CNC frontend, too.
I've got a touch probe as well but it will take some more time before I have it working.
-
@chrishamm said in Protected Moves with a Touch Probe:
@NineMile I'm sorry but my CNC machine isn't operational at the moment so I cannot really check your PR. Perhaps @Sindarius can comment on this, he developed the CNC frontend, too.
I've got a touch probe as well but it will take some more time before I have it working.
That's no issue I haven't written the code (for DWC) yet - currently my protected move code is only in RRF macros.
I'm talking here about a proposed addition to DWC, completely separate to my existing macro code, that would switch the gcode sent from the movement panel and movement dialogs so that if the user selects to protect their moves with a particular probe, the jog buttons would use
G38.3
with the configured probe ID instead.I was curious if you have any input on this before I write the code.
On the testing front, there's a ton of Milo CNC owners using DWC with touch probes who I think would be more than happy to test the changes if that would help.
-
@NineMile an alternative would be to build your own UI with btncmd plugin
-
@oliof said in Protected Moves with a Touch Probe:
@NineMile an alternative would be to build your own UI with btncmd plugin
My end goal is to complete a DWC plugin (currently in progress) that acts as the user interface for the MillenniumOS probing macros (pre this plugin, the "interface" was driven by
M291
dialogs) - adding protected jogging is a feature that I would add to this plugin in lieu of any other option.I think protected jogging is a generic enough feature for CNC owners that integrating it into the CNC movement panel is the best approach, and while I think BtnCmd is great, I also think it would be great for the "default" UI to cater to more advanced CNC use cases.
-
@NineMile fully agree that it would be a good default feature; just wanted to mention the alternative way to add it
-
For people not having that touchprobe thing, would it help to use modified "sensorless homing" moves as crash protection?
You'd check for contact , but don't set coords to whatever your homing coodrs are -
@o_lampe said in Protected Moves with a Touch Probe:
For people not having that touchprobe thing, would it help to use modified "sensorless homing" moves as crash protection?
You'd check for contact , but don't set coords to whatever your homing coodrs areThat'd be interesting. There's a
P10
probe type which meansuse Z motor stall detection as the Z probe trigger
, so in theory that could be used with the same straight probes that I use to implement touch probe collision prevention, but whether or not that works for non-Z axes is an important question - there's no way to configure axis on the probe itself, but I wonder if runningG38.2 K<z-stall-detection-probe> X<target>
automatically switches to monitoring the X axis stall sensor?If it was possible to configure the command used for movement sent by DWC then that would make everything easier but that opens a large can of worms and possible screwups.
Whether or not motor stalling will stop you from damaging anything though is another question. The Z axis on my CNC happily snapped my touch probe tip clean off before the motor even stalled, so depends on your axis power I guess.
I started looking at the touch probe move protection yesterday, adding a button to the CNC movement panel to allow the protection to be configured / unconfigured:
Doing this reminded me why protected moves was a pain to implement in the first place -
G38.2
moves do not respect machine limits, and they appear to always run in absolute co-ordinates (although the docs say that was fixed in v3.11? ) - so there needs to be some validation of the current machine position and generation of the target absolute co-ordinate rather than being able to just send a static gcode like the current buttons do.This means I'd need to refactor the way the button gcode is generated slightly - not a particular issue, but might make it a little more complex than I remembered
Gonna keep working on it and see what it looks like when fully implemented.
-
@NineMile I'm a little puzzled as to how this will work. Most probes will only detect an object when approaching from a particular direction (so from above in the case of a standard Z probe), is that not the case for the probes you are using here? In which case you will only get this protection in those cases? Also when performing probing moves are the coordinates not based on the probe end point rather than the normal tool position? Will this not cause a jump in the "current location" when switching from normal moves to "protected moves"?
As to using stall detection you will normally need to ensure that a number of things are in place for this to work reliably (so motor operating mode stealthchop/spreadcycle depending on the driver in use), motor operating current plus minimum motor speed etc. I'm not sure how safe it would be to switch these various parameters on the fly.
-
@NineMile Last time I tried, you could use sensorless homing/stall detection on any axis.
But you are right, you'd have to reduce motor current for those moves, but at the same time it needs a minimum speed to be succesful.
I wouldn't like to see my 50$ router bits crashing in a clamp.
Maybe a regular endstop-config would be a better choice? When the routerbit itself gets electric contact to the metal clamp it doesn't wait for so_many missed steps to trigger alarm.
@gloomyandy That kind of metal2metal contact probes would trigger in any direction, but you wouldn't know where the obstacle is. No problem for an emergency-stop IMHO -
@gloomyandy As mentioned, this is intended for use with a '3D' CNC Touch Probe, they can indeed detect contact in 3 axes. Generally the ones in use on the Milo and other CNCs look something like this internally:
These are installed in place of the cutting tool so generally don't have an X/Y offset.
When trying to probe a workpiece, the usual workflow is to position the probe near to the feature to be probed - either inside a pocket, over a corner, inside a hole or centrally over a rectangular block.
The probe tips and mechanics are incredibly sensitive, and overtravel of a few millimeters will easily damage the probe tip or the internals.
The idea behind the protection is to make sure the probe status is watched while the user is moving the probe around (manually) to position it near the relevant feature.
Accidentally jogging in the wrong direction might cause the probe to make contact with an unintended surface and when protected, that would cause the move to stop rather than continue to the target position and damage the probe.
-
Implemented limit checks and machine position calculation so the moves work properly, this is how it works in practice: video