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.
    • DDDundefined
      DDD
      last edited by

      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.

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @DDD
        last edited by

        @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

        DDDundefined 1 Reply Last reply Reply Quote 0
        • DDDundefined
          DDD @chrishamm
          last edited by

          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?

          chrishammundefined dc42undefined 2 Replies Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @DDD
            last edited by

            @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
            • dc42undefined
              dc42 administrators @DDD
              last edited by dc42

              @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

              DDDundefined 1 Reply Last reply Reply Quote 0
              • DDDundefined
                DDD @dc42
                last edited by DDD

                @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
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA