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

    Current position

    Scheduled Pinned Locked Moved
    Firmware developers
    3
    6
    1.2k
    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.
    • Trampasundefined
      Trampas
      last edited by

      Is it possible to get the current machine position before a move is completed?

      Also out of curiosity what does the DDA stand for?

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

        Currently, no. The position is updated at the end of each move.

        The DDA class existed before I got involved with the firmware. If I ever knew what it stood for, I've forgotten.

        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
        • Trampasundefined
          Trampas
          last edited by

          I think it might be for digital differential analyzer, see https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
          and https://en.wikipedia.org/wiki/Digital_differential_analyzer_(graphics_algorithm)

          The machine I am using homes the Z at the top, then does Z probing. I wanted to turn on the Z probe and then slow down the probing as the Z axis got close to the bed. I will see if I can figure out to find the correct DriveMovement object for the Z axis and get the height.

          Thanks

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

            If you use a Z probe with an analog output that increases as it gets nearer to the bed, then the probing speed will be automatically reduced to 1/3 of its initial value when the probe output reaches 90% of the trigger value.

            Alternatively, use a macro to home the printer to Z max, then move to e.g. Z=5, then probe. For G32 and G29 probing, this is automatic, you set the height at which probing starts in the M558 H parameter.

            If you want to tinker with the firmware to get the current position, the DriveMovement objects are pointed to from an array in the DDA indexed by axis. Take a look at the StopDrive function. After stopping the drive, it looks at the nextStep variable to calculate how far the move has progressed.

            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
            • Trampasundefined
              Trampas
              last edited by

              I did see the code for the analog output, but my sensor is digital.

              I had thought about moving the Z axis but the way my probe works it is important that the bed is moving when the probe is turned on.
              I will try getting the distance and see if I can drop the speed and turn on the probe when we hit the dive distance.

              Right now I am trying to understand the code enough to feel comfortable making the changes.

              Thanks

              1 Reply Last reply Reply Quote 0
              • jmlundefined
                jml
                last edited by

                I would also be interested in a way to get the current position (triggered by an input being made high or low, or when an analog sense pin reaches a certain value). Maybe looking at the firmware code for how the endstops/homing works can help.

                This was available in Marlin and was very useful for my printer. Hopefully get_position() can be incorporated into RRF.

                1 Reply Last reply Reply Quote 0
                • demeundefined deme referenced this topic
                • btmclainundefined btmclain referenced this topic
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA