avoid crashing the bed if probe fails
-
Hello. Im having an issue with bltocu on other post, but that issue brought this question: I have my bltocuh defined like this (actually taken from documentation)
M558 P9 C"io7.in" F100 H5 R0.2 T6000 A5 B1
This defines as probing dive height 5mm
At the end of my homez.g I set the Z position at 6mm
lets say a new print is launch, position is Z6 if the probing is done, shouldnt stop if after going down for 5 mm probe is not triggered?
Since my offsets are: G31 X-27 Y-4 Z1.76 P25 ; bltouch offsets, the nozzle will actually crash at Z4.24 if probe is not deployed/triggeredIs there any way to avoid the nozzle crashing into the bed if probing is not triggered?
-
@Tinchus RRF already does what it can to avoid crashing the probe into the target. But in some situations that is not always possible if the probe malfunctions. For instance if you are using G30 to set Z=0 then by definition the actual Z location of the target is unknown and so there is no way to know at what height to stop the probe operation.
For other probing operations like for instance G29 the dive height is a critical part of the process. With G29 you are probing to detect the shape of the bed, this means you need to be able to detect spots on the bed that may be below the current z=0 point. For some types of probe this will require a physical component of the probe to move below the z=0 point (for instance if you are using the nozzle as the probe the actual nozzle will need to move below z=0). When performing these operations RRF will not move lower than the probe trigger height minus the dive height. So if your probe is one like an inductive probe or bl-touch in which the trigger height is such that the nozzle is above the z=0 point when the probe triggers you can avoid the nozzle going below z=0 by setting a dive height that is smaller than the trigger height. If you have things set up this way and the nozzle reaches "trigger point - dive height" without the probe triggering then the move will stop and RRF will report "Probe was not triggered during probing move"). See: https://github.com/Duet3D/RepRapFirmware/blob/3.6-dev/src/GCodes/GCodes4.cpp#L930 for more details).
There are some downsides to setting a small dive height. Firstly the starting point of the probing operation is set to be trigger height plus dive height so in some situations like G32 operations (which may have a very tilted bed) this may limit how much of a tilt the system can adjust for (or could even crash the nozzle into the bed). Secondly if you set the dive height too low then you may not be able to probe a deep "dip" in the bed. Finally some probes (like some inductive probes) have a hysteresis in that they will not untrigger until you move them away some extra distance from the trigger point, so for that type of probe it needs to be large enough to ensure the probe is not triggered at the start of the probe operation. Finally you need to remember that often probes like the bl-touch are mounted offset from the nozzle, in that case if there is a high point on the bed in the "wrong" place then the nozzle may still hit the bed even though it is above z=0.
The bottom line is that probing is tricky and can be destructive if things go wrong. I'd certainly consider lowering the motor current during probing operations.
-
From the docs..,
The H parameter defines the Z probe dive height, which is the height above the trigger height from which probing starts. The default is 3mm or 5mm depending on firmware version. You may wish to increase it during initial calibration. When using mesh bed compensation or running G30 commands with specified XY coordinates (for example from the bed.g file), the firmware moves the Z probe to this height above where it expects the bed to be before commencing probing. The maximum depth of probing from this position is twice the dive height.I think you'll find on straight G30 Z home, the dive height is ignored as the height is unknown.
Otherwise you would never be able to home from any height.
About the best you can do is check for typical errors before you start using the object model.I use this macro which is called before any Z homing or bed leveling
check BL Touch var probeOK = true if sensors.probes[0].value[0]=1000 ; if probe is in error state set var.probeOK = false echo "Probe in error state- resetting" M280 P0 S160 ; reset BL Touch G4 S0.5 if state.gpOut[0].pwm < 0.05 set var.probeOK = false echo "Probe is already deployed - retracting" M98 P"0:/sys/retractprobe.g" G4 S0.5 if sensors.endstops[2].triggered set var.probeOK = false echo "Probe is already triggered - resetting" M280 P0 S160 ; reset BL Touch G4 S0.5
I also use this check in my homeall.g to cancel the print if any errors occur during homing
Any successful command should return a value of 0G30 ; home Z by probing the bed if result !=0 abort "Print cancelled due to probe error"
Outside that, you'd have to have a secondary switch, pressure sensor or similar attached I'd think.