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

Gcode: stop current move with deceleration (no emergency)

Scheduled Pinned Locked Moved
Firmware wishlist
11
23
3.0k
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
    avdoverflow
    last edited by 15 Feb 2023, 05:36

    @T3P3Tony Thanks for the response.

    I am testing out segmentation on Firmware 3.4.5. I am connected to my Duet 2 Wifi with both the web interface and YAT.

    I am trying to implement a CNC jog feature. For the CNC jog, I want to be able to:
    1.) Quickstop as mentioned in this thread, and
    2.) Poll the current machine position during any movement.
    I think segmentation might work, but I noticed something odd while testing.

    I first set my segmentation with "M669 S600 T0.05".
    Test 1:
    In Duet Web Control 3.4.5, I can do a move using the button.
    In YAT, I can send "M408 S3" to poll the current position anytime during the move. I immediately get a machine position response back.

    Test 2:
    In YAT, I send "G91 G1 X10" to move the X-axis.
    In Duet Web Control 3.4.5, I can send a console command "M408 S3" to poll the current position at anytime during the move. I immediately get a machine position response back.

    Test 3:
    In Duet Web Control 3.4.5, I can do a move using the button.
    In Duet Web Control 3.4.5, I can send a console command "M408 S3" to poll the current position. The M408 command stalls and does not respond until the move is almost complete.

    Test 4:
    In YAT, I send "G91 G1 X10" to move the X-axis.
    In YAT, I can send "M408 S3" to poll the current position. I do not get a response back until the move is almost complete.

    Is there a way to remove that delay in Test 4? I am writing a C# program that primarily communicates with Duet through serial.

    undefined 1 Reply Last reply 15 Feb 2023, 09:44 Reply Quote 0
    • undefined
      T3P3Tony administrators @avdoverflow
      last edited by 15 Feb 2023, 09:44

      @avdoverflow when a channel is executing a command, it wont process the next command on that channel which is why you are seeing this discrepancy in when you are getting results.

      www.duet3d.com

      undefined 1 Reply Last reply 15 Feb 2023, 16:43 Reply Quote 0
      • undefined
        avdoverflow @T3P3Tony
        last edited by 15 Feb 2023, 16:43

        @T3P3Tony
        1.) Is there a way to create multiple channels in a single interface (only USB or only WiFi) and then specify certain commands to each channel? For example one channel will be only for movement and the second channel will be only for reading position.

        2.) Or is there a way to execute a movement command without locking the channel up? For example, in Grbl I am able to use the "?" command to get a "Status report query" anytime during a movement command. In Marlin "M114" (Get Current Position) also works anytime during a movement command.

        Thanks for the help.

        undefined 1 Reply Last reply 15 Feb 2023, 20:38 Reply Quote 0
        • undefined
          timothyz @avdoverflow
          last edited by 15 Feb 2023, 20:38

          @avdoverflow I think the proper solution is to make a change to the interface to allow the commands to be buffered such that any commands in the buffer that are non motion commands could be executed on the fly/mid move? dc42 will need to confirm the possibility of this. I am very excited to see move segmentation added, does this mean that it will be possible to track the distance to go until the end of a move in DWC? If so that makes it one of the last fundamental features of a fully formed cnc controller.

          undefined 1 Reply Last reply 16 Feb 2023, 17:21 Reply Quote 1
          • undefined T3P3Tony moved this topic from Gcode meta commands 16 Feb 2023, 08:09
          • undefined
            dc42 administrators @timothyz
            last edited by 16 Feb 2023, 17:21

            @timothyz said in Gcode: stop current move with deceleration (no emergency):

            does this mean that it will be possible to track the distance to go until the end of a move in DWC?

            In RRF 3.5beta1 and beta2 the machine coordinates are updated during the move, whether or not you enable segmentation.

            GCode is essentially a serial protocol, so it's not possible to distinguish between commands that need to be buffered and those that don't. There would always be the possibility of a pending movement command blocking a status-requesting command. The correct way to resolve this is to use two separate command channels, which is in effect how DWC gets status updated even when it is waiting for a command to complete.

            I am fairly sure you will find that M114 in Marlin blocks if the input buffer is full. If the movement queue has commands in it (and perhaps is full) but the input buffer is not full, then both RRF and Marlin will respond to M114.

            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 21 Feb 2023, 23:23 Reply Quote 1
            • undefined
              avdoverflow @dc42
              last edited by 21 Feb 2023, 23:23

              @dc42
              Is there is guide or tutorial on how to create "two separate command channels?"

              Getting status updates while waiting for commands to complete is what I am looking for. Thanks in advance.

              undefined 1 Reply Last reply 22 Feb 2023, 12:00 Reply Quote 0
              • undefined
                dc42 administrators @avdoverflow
                last edited by 22 Feb 2023, 12:00

                @avdoverflow on what device are you looking to get status updates while commands initiated by that device are in progress, and how will that device be connected to the Duet?

                The usual way to implement jogging in a CNC pendant (such as the one described at https://docs.duet3d.com/en/User_manual/Connecting_hardware/IO_CNC_Pendant) is to send a small movement command each time the jogging wheel is moved. If you want to use a button instead of a wheel and move the axis while the button is held down, you could do a similar thing i.e. send small movement commands at intervals while the button is held down. Either way, if you avoid sending movement commands too fast to be executed in real time, movement will stop when pendant stops sending movement commands.

                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 2 Feb 2024, 07:20 Reply Quote 0
                • undefined
                  Dep @dc42
                  last edited by 2 Feb 2024, 07:20

                  @dc42 Is there any progress on this issue?

                  There is another idea - you can write a macro in which the submission of a micro movement command will be looped. In this cycle we can check the state of the pin and exit by pressing a button.

                  I need this to connect a weight sensor in a photopolymer printer.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Dep @dc42
                    last edited by 1 Apr 2024, 17:22

                    @dc42 Any news on this issue? I decided not to make a new topic so as not to create duplicates.

                    undefined 1 Reply Last reply 8 Apr 2024, 10:43 Reply Quote 1
                    • undefined
                      dc42 administrators @Dep
                      last edited by 8 Apr 2024, 10:43

                      @Dep right now our focus is on getting RRF 3.5 released. RC4 is almost ready and if no serious issues are found it it we expect to release 3.5.0 stable 1 to 2 weeks later.

                      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 2 Replies Last reply 10 Apr 2024, 16:04 Reply Quote 1
                      • undefined
                        Dep @dc42
                        last edited by 10 Apr 2024, 16:04

                        @dc42 Thank you! We are really looking forward to this feature.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Dep @dc42
                          last edited by 7 Jul 2024, 10:09

                          @dc42 What if the solution is to my question?

                          droftartsundefined 1 Reply Last reply 8 Jul 2024, 13:45 Reply Quote 0
                          • droftartsundefined
                            droftarts administrators @Dep
                            last edited by 8 Jul 2024, 13:45

                            @Dep There is a feature enhancement request for this already, along with various side issues, see:
                            https://github.com/Duet3D/RepRapFirmware/issues/745
                            https://github.com/Duet3D/RepRapFirmware/issues/746

                            Ian

                            T3P3 created this issue 24 Apr 2023, 18:52 in Duet3D/RepRapFirmware

                            open Feed hold #745

                            T3P3 created this issue 24 Apr 2023, 18:52 in Duet3D/RepRapFirmware

                            open Controlled deceleration when a homing switch is triggered #746

                            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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