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

Polling the position of the printer

Scheduled Pinned Locked Moved
General Discussion
3
6
399
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.
  • undefined
    Garth_42
    last edited by 14 Dec 2021, 00:47

    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?

    undefined undefined 2 Replies Last reply 14 Dec 2021, 08:01 Reply Quote 0
    • undefined
      o_lampe @Garth_42
      last edited by o_lampe 14 Dec 2021, 08:01

      @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
      • undefined
        dc42 administrators @Garth_42
        last edited by dc42 14 Dec 2021, 08:45

        @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

        undefined 1 Reply Last reply 15 Dec 2021, 00:40 Reply Quote 0
        • undefined
          Garth_42 @dc42
          last edited by 15 Dec 2021, 00:40

          @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?

          undefined 1 Reply Last reply 15 Dec 2021, 08:03 Reply Quote 0
          • undefined
            o_lampe @Garth_42
            last edited by 15 Dec 2021, 08:03

            @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.

            undefined 1 Reply Last reply 15 Dec 2021, 14:44 Reply Quote 0
            • undefined
              Garth_42 @o_lampe
              last edited by 15 Dec 2021, 14:44

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

              1 Reply Last reply Reply Quote 0
              • undefined deme referenced this topic 28 Jan 2022, 16:12
              4 out of 6
              • First post
                4/6
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA