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

Real Time Position

Scheduled Pinned Locked Moved
Duet Hardware and wiring
m114 motion
9
19
1.4k
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
    Phaedrux Moderator
    last edited by 14 Jul 2020, 00:44

    It's not a closed loop system so I don't think you can get actual Real Time Position, just last commanded position as displayed on the PanelDue or DWC.

    Z-Bot CoreXY Build | Thingiverse Profile

    undefined 1 Reply Last reply 14 Jul 2020, 05:45 Reply Quote 1
    • undefined
      baird1fa
      last edited by 14 Jul 2020, 02:47

      Wouldnโ€™t there be something? If you pause a print it stops where it is and reports the coordinates of where it stopped. Or does it have to complete a move before it stops?

      undefined 1 Reply Last reply 14 Jul 2020, 03:04 Reply Quote 0
      • undefined
        Phaedrux Moderator @baird1fa
        last edited by 14 Jul 2020, 03:04

        @baird1fa I believe it has to complete the current move. Which is usually pretty short. Same goes for power loss recovery.

        Z-Bot CoreXY Build | Thingiverse Profile

        undefined undefined 2 Replies Last reply 14 Jul 2020, 03:13 Reply Quote 0
        • undefined
          baird1fa @Phaedrux
          last edited by 14 Jul 2020, 03:13

          @Phaedrux that is good to know. I have the ability to print some pretty long moves almost 400mm. So it would suck to need to pause midway.

          undefined 1 Reply Last reply 14 Jul 2020, 03:20 Reply Quote 0
          • undefined
            Phaedrux Moderator @baird1fa
            last edited by 14 Jul 2020, 03:20

            @baird1fa You're in a good position to test what actually happens then.

            Z-Bot CoreXY Build | Thingiverse Profile

            undefined 1 Reply Last reply 14 Jul 2020, 03:46 Reply Quote 0
            • undefined
              baird1fa @Phaedrux
              last edited by 14 Jul 2020, 03:46

              @Phaedrux Iโ€™ll give it try next time I have the opportunity.

              1 Reply Last reply Reply Quote 0
              • undefined
                arhi @Phaedrux
                last edited by 14 Jul 2020, 05:45

                @Phaedrux said in Real Time Position:

                It's not a closed loop system so I don't think you can get actual Real Time Position, just last commanded position as displayed on the PanelDue or DWC.

                Dunno if RRF can report the current position (real-time), but RRF certainly knows where it is even in the middle of the move :). It is just a question if we can extract this info somehow ๐Ÿ˜„

                Dunno why I'd need that info on a 3D printer where moves are rather quick (both fast and short) but it is something rather useful on a CNC where moves take time (as they are both long and slow). If you look at GRBL driver (or for e.g. smoothieware running in GRBL mode) it will real time report position during a move (both on the LCD and streamed trough serial port). It is rather useful when operating a CNC.

                Looking at the status data during a long move

                /rr_status:

                5faac625-4a20-45ba-8d9f-99f23ce63f73-image.png

                eb9dcdaf-f7fb-432e-884b-c311eb635d5a-image.png

                So as you can see you can read "current real-time" position of the axes in coords.machine[axisnumber] ๐Ÿ™‚

                now if you quickly refresh it it does not update non stop, only every x seconds, probbly web interface is caching something dunno, I'm sure dc42 can add more details ๐Ÿ™‚ but looks like data is already available. You can fetch model using G-code too (something like M409 F"v,n,d3" K"move.axes[0]" ) but the problem is that the G-code will have to wait for existing move to finish to return result so not very useful

                undefined 1 Reply Last reply 14 Jul 2020, 14:45 Reply Quote 0
                • undefined
                  dc42 administrators @Phaedrux
                  last edited by 14 Jul 2020, 06:00

                  @Phaedrux said in Real Time Position:

                  @baird1fa I believe it has to complete the current move. Which is usually pretty short. Same goes for power loss recovery.

                  A normal pause waits for the current move to complete, but a power loss pause doesn't.

                  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 1
                  • undefined
                    bot @arhi
                    last edited by 14 Jul 2020, 14:45

                    [...] RRF certainly knows where it is even in the middle of the move [...]

                    Is this the case, though? It seems like the problem of quantum physics observing the speed and location of a particle: if you know the speed, you can't know for sure the position, and if you know the position, you can't know for sure the speed.

                    In an open-loop system, you can know generally kinda what's going on, but to "ask" for the position of the stepper at a certain time in the middle of a move seems impossible. By the time your question has reached the "ears" of the machine, the time you were asking about has long passed. If the machine told you the position for whatever moment it happened to be, by the time it replied to you it would be incorrect.

                    Though, it could probably be close enough. ๐Ÿ˜›

                    *not actually a robot

                    undefined 1 Reply Last reply 14 Jul 2020, 18:19 Reply Quote 0
                    • undefined
                      arhi @bot
                      last edited by 14 Jul 2020, 18:19

                      @bot said in Real Time Position:

                      In an open-loop system

                      It does not matter if it's open or closed loop, you know where you want to be and where the system is if no steps are lost. Each step signal you send you know exactly where you are. If steps are lost the whole system becomes "unknown" and you will not know the position at the end of the move too.

                      undefined 1 Reply Last reply 14 Jul 2020, 18:23 Reply Quote 0
                      • undefined
                        bot @arhi
                        last edited by bot 14 Jul 2020, 18:23

                        @arhi Yeah, I was mostly making a joke.

                        It would be possible to get a close-enough position, but it would never be EXACTLY correct. That's fine.

                        However, implementing the feature to interrupt everything in order to probe position might be problematic. AFAIK, the way the code works, it's not as simple as "monitoring" for the position, you'd have to be like "hey sorry to bother you, but can you stop what you're doing for a moment and tell me where you are. Thanks!" And so that's probably a lot of effort for relatively little gain.

                        *not actually a robot

                        undefined 1 Reply Last reply 14 Jul 2020, 19:25 Reply Quote 0
                        • undefined
                          arhi @bot
                          last edited by 14 Jul 2020, 19:25

                          @bot dunno how the movement part is organized and if you can see externally what's going on there or not.... and yes, imo not very useful for fast short moves as we have with 3d printing but it is something quite expected on the cnc. I do not have enough experience to say how that's done normally, does linuxcnc/grbl/tormach..split the long slow move into shorter pieces and report position between them or it is done differently... but I see RRF in the rr_status have split the position of "named axes" (xyz) and "real position" (machine), it is just a question how often the real position is updated and how to retrieve the updated version (as it looks like rr_status caches this value for quite some time)

                          undefined 1 Reply Last reply 14 Jul 2020, 19:47 Reply Quote 0
                          • undefined
                            bot @arhi
                            last edited by bot 14 Jul 2020, 19:47

                            IMO, and I know next to nothing, so take this with ten kilos of salt, the easiest approach would be to approximate the position of the axis for display. Alongside the calculation of the steps, you could do some calculations which use the same accel/constant speed/decel parameters as the step generation to display a changing value on a display. So, you'd have to "segment" the display into three parts. First, approximate the time to go from starting position to the end of accel phase. Then, approximate the time to go to the decel phase, then approximate the decel time. During those times, "animate" the value of the position over the given phase time.

                            *not actually a robot

                            1 Reply Last reply Reply Quote 0
                            • 3DOesteundefined
                              3DOeste
                              last edited by 15 Jul 2020, 04:12

                              Industrial cnc systems show real-time position of the movements. What I donโ€™t know is if that position shown is read from the encoders or generated from the gcode. The control definitely knows encoder position off all axis and can make corrections.

                              1 Reply Last reply Reply Quote 0
                              • Lemundefined
                                Lem
                                last edited by 31 Jul 2023, 10:09

                                Can we read real position of tool in new RRF? Is it possible?

                                dc42undefined 1 Reply Last reply 31 Jul 2023, 17:18 Reply Quote 0
                                • dc42undefined
                                  dc42 administrators @Lem
                                  last edited by 31 Jul 2023, 17:18

                                  @Lem you can read near real time machine position in RRF 3.5.

                                  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

                                  willvundefined 1 Reply Last reply 9 Oct 2024, 21:21 Reply Quote 0
                                  • willvundefined
                                    willv @dc42
                                    last edited by 9 Oct 2024, 21:21

                                    @dc42 How so?

                                    dc42undefined 1 Reply Last reply 10 Oct 2024, 08:33 Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators @willv
                                      last edited by 10 Oct 2024, 08:33

                                      @willv see this post earlier in this thread https://forum.duet3d.com/post/166688

                                      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 1
                                      • First post
                                        Last post
                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA