G31 Z Probe Trigger Value
-
Was wondering if someone could help clarify something for me. I have searched high and low and cant find a clear answer. In the G31 gcode command what exactly is the Pnnn Trigger value? I have found comments such as "when the probe reaches this value the probe is triggered". If I enter G31 P500 command what exactly is the 500? 500 what? Is this a probe sensitivity setting like in a M672 command? Where would I find what this P setting parameter should be for my setup? I have an SE300 hot end (with strain gauge) on a RostockMAX v3.2 printer.
Thanks for any help -
@KevinDelta the trigger value is only relevant when using probe types P1 (simple analog), P2 (modulated analog) and P5 (filtered digital) in the M558 command. Almost all Z probes these days have a digital output, so they are used with type P8 in the M558 command and the threshold setting is not relevant.
When using P1 or P2, the value is the sensor output value above which it is considered triggered, with a scale of 0 to 1000 corresponding to output voltage of 0V and 3.3V. When using P5 the digital sensor output is converted to a value of 1000 when the sensor is triggered and 0 when it is not. That signal is then passed through a low-pass filter and the probe is considered triggered when the filter output is or exceeds the trigger threshold. So a low threshold will give a faster response, and a high threshold will give a slower response but be resistant to false triggering caused by interference spikes.
-
@KevinDelta There are two kinds of probes; digital and analog. Digital probes just tell you when the probe triggers, ie it's 'on' or 'off', eg microswitch, BLTouch. This equates to 0 and 1000 reported in DWC for the Z probe. Analog probes can give a range of outputs depending on how far they are from the target; hall effect sensors, IR sensors, force sensors etc. However, most of these have internal circuitry that sets when it is reliably triggered (ie in it's most effective and accurate range) that makes it repeatable. This is what M672 adjusts on the SmartEffector. Most of these probes are set as digital probes as well, and report either 0 or 1000 in DWC. For the different types of probe, see https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_connecting
RRF does support the connection of analog probes. For these, the response is also reported in the Z probe, in the range of 0 to 1000.
The P parameter sets the threshold for the trigger, because the firmware doesn't really care if the probe is digital or analog. It just wants to know when the probe is over that threshold. The only thing you want to avoid is false triggering due to noise/interference in the wiring. If you choose a P value of 1 or 999, you may get false triggers even on a digital probe. So 500 is probably best. Noise/interference can also make analog probes less accurate, as you set the trigger value to a specific number, and it will be less accurate/repeatable if there is interference.
The M672 command programs the sensitivity of an analog probe (usually the SmartEffector), setting the threshold for the digital response to the firmware. Doing this at the probe negates the effect of interference in the wiring. It needs to be programmable because users have different setups on the SmartEffector, so having a direct drive extruder mounted on one causes it to react differently from having a remote extruder.
Edit: Ninja's by @dc42!
Ian
-
@droftarts Thank you both for clarifying. It makes a whole lot more sense now.