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

    Object model data resolution M409....

    Scheduled Pinned Locked Moved Solved
    General Discussion
    2
    5
    229
    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.
    • audryhomeundefined
      audryhome
      last edited by

      Hi,

      I am in the process of developing a new CNC pendant for a very old CAMM3 Roland machine, using the original 3 jogs panels which I appreciate very much.

      For this, I use a PICO2, FreeRTOS and coreJSON to provide the glue between the origianl panel and a DUET6 HC .

      I noticed that when I issue M114, I receive a data result with 3 digit accuracy for coordinates, both machine and user.

      Since the answer ( RRF 3.6.0-beta.2+3) is packed in a json string, I try to simplify my request using a M409 , that would give me more information on the axes within a single IO serial transaction with duet. (Machine coords, User coords, homed, ....

      Examples:
      X:-12.500 Y:-22.000 Z:169.905 E:0.000 Count 60001 44801 226484 Machine 37.500 28.000 169.905 Bed comp 0.000 -> using M114
      {"key":"move.axes[2].machinePosition","flags":"a0","result":170} -> using M409

      My understanding from M409 documentation is that limiting buffer size on RRF force to split the answer in multiple chunks (a0 flag) when using k"move.axes[] for instance.

      This is not the case for me since I issue
      M409 k"move.axes[2].machinePosition" for getting the value.

      this should answer 169.905, but it spits 170.

      BTW DWC also displays 170, which is not really accurate....![alt text](image url)

      3988863e-1c64-4e8f-bdff-b56a5f821da1-image.png

      Question: Is there any way to obtain the full resolution using M409 or do I have to use M114 with a ugly string scanning?

      Many thanks

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

        @audryhome this is a bug in 3.6beta. Axis positions are supposed to be reported to 3 decimal places, although trailing zeros in the decimal part are always omitted in the JSON response. I will fix it in the next build.

        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

        audryhomeundefined 1 Reply Last reply Reply Quote 0
        • audryhomeundefined
          audryhome @dc42
          last edited by

          @dc42 Thanks, so I will pursue with a full json solution!!

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

            @audryhome I believe this is already fixed in 3.6beta3. The object model returns 3 decimal places for both user and machine position of all axes (with trailing zeros in the decimal part suppressed); however DWC only displays 2 decimal places.

            m409 k"move.axes[].machinePosition"
            {
                "key": "move.axes[].machinePosition",
                "flags": "",
                "result": [
                    0.045,
                    -7.955,
                    9.894,
                    129
                ],
                "next": 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

            audryhomeundefined 1 Reply Last reply Reply Quote 0
            • audryhomeundefined
              audryhome @dc42
              last edited by audryhome

              @dc42 Installed the beta, everything is fine!

              M409 k"move.axes[]" f"f"
              {
              "key": "move.axes[]",
              "flags": "f",
              "result": [
              {
              "machinePosition": 2.652,
              "userPosition": 0.102
              },
              {
              "machinePosition": 5.511,
              "userPosition": 0.102
              },
              {
              "machinePosition": 180.17,
              "userPosition": -0.03
              }
              ],
              "next": 0
              }

              Many Thanks!

              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