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

    Polling the position of the printer

    Scheduled Pinned Locked Moved
    General Discussion
    3
    6
    397
    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.
    • Garth_42undefined
      Garth_42
      last edited by

      Re: Polling Position of Printer

      Hi all,

      We are trying to integrate a laser scanner into the 3D print process at work and we need a "real-time" way to understand the exact position of the gantry during a linear move to poll the scanner and position of the axes (1000x or more during a 100mm move) to get a high resolution scan. Is there currently a way to poll a Duet board to get this position data and synchronize it with a laser scanner?

      o_lampeundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @Garth_42
        last edited by o_lampe

        @garth_42
        AFAIK, you can't poll the Duet 1000 times a second ( assuming 100mm/s speed) . IIRC, regular polling speed is 4 times/sec and the data you receive always lags behind.
        Maybe it's possible in combination with closed loop steppers, if you were able to read their encoder signals? But you'd also have to get ahead of the actual position to get rid of latency. (knowing, where it will be in the next 0.1sec)
        That takes a lot of math, given the acceleration/deceleration or jerk phases of a move. "Real time" data sometimes isn't enough.

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

          @garth_42 one way would be to feed the stepper driver step pulses to an external counter.

          Another would be to put a linear encoder on the axis, for example https://www.renishaw.com/en/linear-incremental-encoders--11156 or https://www.renishaw.com/en/linear-absolute-encoders--10940.

          Alternatively, if you know what movement speed, jerk and acceleration are being used then you can use dead reckoning to work out the position at a given time after the start of a move. Using Duet 3 you can get this information over CAN bus. For example, you could use a SAMMYC21 to do the calculation and configure RRF to have additional virtual drivers on it for the axes that you want to track.

          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

          Garth_42undefined 1 Reply Last reply Reply Quote 0
          • Garth_42undefined
            Garth_42 @dc42
            last edited by

            @dc42 Thank you both for the responses. As to using the Sammy, if I understand you correctly, we would:

            1. get the accel, jerk, and feedrate settings of the printer, latest position of the printer, and next movement position in the queue
            2. do the calculations on the Sammy board in real time and update the virtual drives controlled by the Sammy to those positions as the move is happening
            3. poll the Sammy at the desired frequency to get the virtual drive positions

            Is this correct?

            o_lampeundefined 1 Reply Last reply Reply Quote 0
            • o_lampeundefined
              o_lampe @Garth_42
              last edited by

              @garth_42 said in Polling the position of the printer:

              poll the Sammy at the desired frequency to get the virtual drive positions

              If I understood David correctly, the Sammy should send the trigger impuls for the laser scanner ahead of the desired position. (latency of the scanner trigger input?)
              Polling the Sammy would bring you behind real-life position again.

              Garth_42undefined 1 Reply Last reply Reply Quote 0
              • Garth_42undefined
                Garth_42 @o_lampe
                last edited by

                @o_lampe Ah I see, that is quite clever. Thank you for the clarification.

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