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

    Reporting variables

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    5
    235
    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.
    • St Tawundefined
      St Taw
      last edited by

      Having calibrated my four tool corexy I would like to report the offsets it has found.
      I currently echo the variables by calling a macro

      echo "Camera X",global.CameraX, " Y", global.CameraY, " Z",global.CameraZ
      echo "T0Offset X",global.T0OffsetX," Y", global.T0OffsetY," Z",global.T0OffsetZ
      echo "T1Offset X",global.T1OffsetX," Y", global.T1OffsetY," Z",global.T1OffsetZ
      echo "T2Offset X",global.T2OffsetX," Y", global.T2OffsetY," Z",global.T2OffsetZ
      echo "T3Offset X",global.T3OffsetX," Y", global.T3OffsetY," Z",global.T3OffsetZ

      This results in the console
      03/01/2024, 10:13:40 M98 P"0:/macros/Calibration/Report Offsets.g"
      Camera X 6.577 Y 96.720 Z 0
      T0Offset X 0 Y 0 Z 0
      T1Offset X 0.060 Y 2.200 Z 0
      T2Offset X 0.220 Y 3.620 Z 0
      T3Offset X -0.043 Y 0.120 Z 0

      However not all the lines are always reported. Sometimes T2 and T3 lines are missing. Why could this be?

      What I would really like to do is report the variables with a Message dialog and require the user to Ok the message to continue. Like using a M291. However I have not found a way of reporting variables and putting them on multiple lines using M291.

      Any suggestions?

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

        @St-Taw I suggest you create a feature request on github, to allow M291 to create multi-line messages, perhaps by including \n or similar in the message string.

        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

        St Tawundefined 1 Reply Last reply Reply Quote 0
        • St Tawundefined
          St Taw @dc42
          last edited by

          @dc42
          Thank you for reply.

          I will make the suggestion. However before I do, I have been unable to get a single line message reporting variables. Have tried

          M291 P "Camera X"^global.CameraX S2

          The documentation does not describe anything other than P"message" with no example of variables.

          Also I have an associated question.

          I would like to find out what the current offsets I have applied via the G10 command are during the calibration.

          As a test via the console I did
          G10 P0 X-22
          Then I move tool 0
          G1 X40

          Looking in the object model I find

          move|axes|0|machine position 62
          move|axes|0|userPosition 40
          So I can deduce it believes offset is 40-62 = -22

          Are the offets for all the tools visble in the object model specifically and without selecting the tool?

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

            @St-Taw whenever a parameter to a GCode command is an expression, the whole parameter expression must be enclosed in { }. So try this:

            M291 P{"Camera X"^global.CameraX} S2

            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

            1 Reply Last reply Reply Quote 0
            • St Tawundefined
              St Taw
              last edited by

              Yes that works. So I'll make the request for multi-line.

              Any views on the object model enquiry?

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