• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Querying Z-probe value

Scheduled Pinned Locked Moved
Gcode meta commands
3
6
256
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    DDD
    last edited by 1 Sept 2023, 14:41

    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.

    undefined 1 Reply Last reply 1 Sept 2023, 16:45 Reply Quote 0
    • undefined
      chrishamm administrators @DDD
      last edited by 1 Sept 2023, 16:45

      @DDD I suppose you need sensors.probes[1].value[0]. You can also enable the Object Model plugin in DWC to browse the object model interactively.

      Duet software engineer

      undefined 1 Reply Last reply 4 Sept 2023, 07:42 Reply Quote 0
      • undefined
        DDD @chrishamm
        last edited by 4 Sept 2023, 07:42

        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?

        undefined undefined 2 Replies Last reply 4 Sept 2023, 07:47 Reply Quote 0
        • undefined
          chrishamm administrators @DDD
          last edited by 4 Sept 2023, 07:47

          @DDD The first probe is probe[0]. Maybe that is the culprit? Did you enable the Object Model plugin in DWC as I recommended? That's certainly the easiest way to get the right value.

          You can output arbitrary values using the echo command, see here:

          echo sensors.probes[1].value[0]
          

          Duet software engineer

          1 Reply Last reply Reply Quote 0
          • undefined
            dc42 administrators @DDD
            last edited by dc42 9 Apr 2023, 08:10 4 Sept 2023, 08:09

            @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]
            

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            undefined 1 Reply Last reply 4 Sept 2023, 09:56 Reply Quote 0
            • undefined
              DDD @dc42
              last edited by DDD 9 Apr 2023, 11:02 4 Sept 2023, 09:56

              @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.

              1 Reply Last reply Reply Quote 0
              1 out of 6
              • First post
                1/6
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA