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

    [3.6.0beta.2] Unable to Access Object for positionError

    Scheduled Pinned Locked Moved Solved
    Beta Firmware
    2
    6
    138
    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.
    • Paskiundefined
      Paski
      last edited by

      I'm attempting to calibrate an axis using the encoder position error(with 1HCL board). To achieve this, I need to access the boards[].drivers[].closedLoop.positionError parameter.

      Initially, I found it located at:
      boards[1].drivers[0].closedLoop.currentFraction.positionError

      However, when I try to retrieve its value using boards[1].drivers[0].closedLoop.currentFraction.positionError.value with echo, it doesn't return anything.

      Could someone guide me on how to properly access and read the encoder error value?

      Paskiundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • Paskiundefined
        Paski @Paski
        last edited by

        Thanks in advance!

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @Paski
          last edited by

          @Paski remove the ".value" from your expression.

          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

          Paskiundefined 1 Reply Last reply Reply Quote 0
          • Paskiundefined
            Paski @dc42
            last edited by

            @dc42
            It's curious that when accessing the average error (boards[1].drivers[0].closedLoop.currentFraction.avg), the output is a value. However, for positionError, it seems to return an object.

            Interestingly, both are specified as value in the object model of the DWC.

            Am I correct in assuming that the real-time PID error is part of the positionError? How can i acess that?

            Thanks!

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @Paski
              last edited by dc42

              @Paski are you running the Duet in standalone or SBC mode? If SBC mode have you checked that you are running the same versions of RRF, DSF and DWC?

              You can use M409 to see what fields RRF provides in the object model, e.g. M409 K"boards[1].drivers[0].closedLoop". The fields shown in the DWC Object Model Browser should be the same if you are running compatible software versions.

              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

              Paskiundefined 1 Reply Last reply Reply Quote 0
              • Paskiundefined
                Paski @dc42
                last edited by

                Hi @dc42,

                I was running in standalone mode.
                Thanks for the "M409 K"boards[1].drivers[0].closedLoop" command; it revealed an incompatibility with the DWC, which was resolved after an update.

                BR.

                1 Reply Last reply Reply Quote 0
                • dc42undefined dc42 marked this topic as a question
                • dc42undefined dc42 has marked this topic as solved
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA