Querying Z-probe value
-
Dear Duet Team:
I'm trying to read a Z-probe for tool probing. When the probe is triggered, this gets reflected in the Z-probe section of the Status. When using G38.2 and G38.4 I have no problem working with such a probe. However, when I try to query the probe value via Object Model "sensors.probes[1].value[0]" is always zero even when the Status says otherwise. I get the actual probe value by using M409 K"sensors.probes[1].value[0].value". Unexpectedly, using "sensors.probes[1].value[0].value" with metacommands I received an error.
-
@DDD I suppose you need
sensors.probes[1].value[0]
. You can also enable theObject Model
plugin in DWC to browse the object model interactively. -
Thanks for your answer @chrishamm. I tried the Object model plugin and sensors.probes[1].value[0] is always 0. Even when the status section displays 1000 for probe 1, this happens for any probe. I have firmware 3.4.5 installed. Everything else works but this. How can I query the Z-probe value via gcode?
-
-
@DDD said in Querying Z-probe value:
However, when I try to query the probe value via Object Model "sensors.probes[1].value[0]" is always zero even when the Status says otherwise.
How were you querying the probe value? Please provide the context.
Does the following report the correct probe status?
echo sensors.probes[1].value[0]
-
@dc42 After looking at my code, I was querying the wrong probe. The sensors.probe[1].value works, the problem was between the keyboard and the chair.
However, using the Object model plugin, no probe value gets updated at sensors.probes[#].value[0]. Even when meta-commands and the status board shows the right value.
Add: The JSON file gets updated but requires refreshing the website for the values to be updated into the Object model plugin.