Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    M226 Pause Gcode ignored

    General Discussion
    5
    23
    2832
    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.
    • totalitarian
      totalitarian last edited by

      I have a corexy printer running a duet wifi. When I run directly via the duet controller, this part of my gcode will pause the printer after auto levelling.

      G28 ; home all axes
      G29; Auto Level
      M226 ; pause
      G1 X40 Y10 F6000; move to prime position

      Now, as I also run a Mosaic Pallet, in order to get digital pinging working, I stream gcode to the duet via octprint. The issue i'm facing is that the M226 pause is completely ignore. Any idea why that would be?

      OctoPrint 1.3.9 running on OctoPi 0.15.1 / Duet 2.02RC3(RTOS) (2018-10-17b2)

      1 Reply Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator last edited by

        https://duet3d.dozuki.com/Wiki/GCode#Section_M226_Gcode_Initiated_Pause

        M226: Gcode Initiated Pause
        Example
        M226
        Initiates a pause in the same way as if the pause button is pressed. That is, program execution is stopped and the printer waits for user interaction. M226 is intended for use in the GCode file being printed, for example to pause after a particular layer has completed. So it waits until all the moves in the queue have been completed. M25 is intended for use from a different source of GCodes (Like the web interface console, PanelDue or a Macro) so if you need to pause from those use M25 instead.

        I think the issue is that the M226 is being sent over USB rather than being run from an onboard gcode file on the SD card. Try M25 instead?

        https://duet3d.dozuki.com/Wiki/GCode#Section_M25_Pause_SD_print

        M25: Pause SD print ¶
        Example
        M25
        The machine pauses printing at the current position within the file. To resume printing, use M24. Do not use this code to pause the print in the currently printing G-code file, use M226 instead. M226 is intended for use in the GCode file being printed, for example to pause after a particular layer has completed. So it waits until all the moves in the queue have been completed. M25 is intended for use from a different source of GCodes (like the web interface console, PanelDue or Macro)

        Prior to pausing, the macro file pause.g is run. This allows the head to be moved away from the print, filament to be retracted, etc.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • totalitarian
          totalitarian last edited by

          I think you are right. It worries me it says not to use M25 code to pause the print in the currently printing G-code file though

          dc42 1 Reply Last reply Reply Quote 0
          • Phaedrux
            Phaedrux Moderator last edited by

            Yeah I'm not sure what the real intention is there.

            You might be able to find some more context by searching the forum for M226 and M25. I know it's been discussed a few times. @dc42 would have to answer on the best way to implement a pause for the Mosaic Palette. Perhaps better support could be implemented if what's available doesn't already fit the need.

            Z-Bot CoreXY Build | Thingiverse Profile

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

              @totalitarian said in M226 Pause Gcode ignored:

              I think you are right. It worries me it says not to use M25 code to pause the print in the currently printing G-code file though

              M25 is an asynchronous pause (i.e. pause as soon as possible). It used not to work inside the GCode file being printed, but I fixed that about 2 years ago. So it should be OK now.

              Whereas M226 is a synchronous pause (i.e. wait until all preceding moves have been completed, then pause), and only works when used within the GCode file being printed.

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

                Thanks, M25 indeed pauses. How to resume the print from DWC though?

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

                  @totalitarian said in M226 Pause Gcode ignored:

                  Thanks, M25 indeed pauses. How to resume the print from DWC though?

                  Pressing the Resume button should work, just as for any other type of pause. Doesn't it?

                  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

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

                    @dc42 The resume button doesn't appear when the command is sent via usb

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

                      Like I said, M226 on!y works from within a file being printed from within the SD card.

                      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
                      • Phaedrux
                        Phaedrux Moderator last edited by

                        You could create a macro to send M24 to resume.
                        https://duet3d.dozuki.com/Wiki/GCode#Section_M24_Start_resume_SD_print

                        Z-Bot CoreXY Build | Thingiverse Profile

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

                          I've decided to allow M226 (and M600) even when no SD card print is in progress. This will allow it to be used in GCode files streamed over USB as well as within SD card print files. I'll implement this in 2.02RC6.

                          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

                          JRDM totalitarian 2 Replies Last reply Reply Quote 0
                          • JRDM
                            JRDM @dc42 last edited by

                            @dc42 Does that mean this will now work on a macro too? I found that M25 and M226 both get ignored in macros at least when run within DWC.

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

                              @dc42 You sir are a true gentleman. Thanks

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

                                @jrdm said in M226 Pause Gcode ignored:

                                @dc42 Does that mean this will now work on a macro too? I found that M25 and M226 both get ignored in macros at least when run within DWC.

                                M25 should already work from within a macro. Please try it again.

                                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

                                JRDM 1 Reply Last reply Reply Quote 0
                                • PlasticMetal
                                  PlasticMetal last edited by

                                  I've recently run into an intermittent problem, where hitting 'resume' from the DWC after an M226 (manually inserted in gcode file) will sometimes drop the Duet Ethernet (v1.03) from the network. This is similar to what others have described, other than it isn't guaranteed to fail. Unfortunately, when it does, the build is ruined. Yesterday, resume worked once and failed twice. I'm running 2.01.

                                  My pause & resume macros are pretty much stock from the configuration tool.

                                  Pause.g:
                                  M83
                                  G1 E-3 F3600
                                  G91
                                  G1 Z10 F5000
                                  G90
                                  G1 X0 Y130 F6000

                                  Resume.g:
                                  G1 R1 Z5 F6000
                                  G1 R1
                                  M83
                                  G1 E2.5 F3600

                                  Thanks for any suggestions!

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

                                    @plasticmetal said in M226 Pause Gcode ignored:

                                    I've recently run into an intermittent problem, where hitting 'resume' from the DWC after an M226 (manually inserted in gcode file) will sometimes drop the Duet Ethernet (v1.03) from the network. This is similar to what others have described, other than it isn't guaranteed to fail. Unfortunately, when it does, the build is ruined. Yesterday, resume worked once and failed twice. I'm running 2.01.

                                    My pause & resume macros are pretty much stock from the configuration tool.

                                    Pause.g:
                                    M83
                                    G1 E-3 F3600
                                    G91
                                    G1 Z10 F5000
                                    G90
                                    G1 X0 Y130 F6000

                                    Resume.g:
                                    G1 R1 Z5 F6000
                                    G1 R1
                                    M83
                                    G1 E2.5 F3600

                                    Thanks for any suggestions!

                                    Please try the just-released 2.02RC6 release (carefully - and read the upgrade notes) because this may have been be fixed already.

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

                                      Thanks, David. It worked three times yesterday with the new release, so hopefully it's good to go.

                                      Now to just find a quality heater cartridge...

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

                                        @dc42

                                        OK I tried again. I did the full update to RC6 yesterday and this still happens:

                                        Error: M25: Cannot pause print, because no file is being printed!

                                        I'm calling the macro by clicking the button in DWC

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

                                          @jrdm said in M226 Pause Gcode ignored:

                                          @dc42

                                          OK I tried again. I did the full update to RC6 yesterday and this still happens:

                                          Error: M25: Cannot pause print, because no file is being printed!

                                          I'm calling the macro by clicking the button in DWC

                                          Calling which macro?

                                          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

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

                                            @dc42 it's in a macro I wrote that's in my DuetM's standard macro folder.

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

                                              You mean you have M25 in a macro, and you are invoking that macro from DWC or PanelDue? I've just tested that, and it works for me.

                                              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

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

                                                @dc42 Yes. To test it in isolation, I just now put M25 in its own macro to test it by itself. I invoked it by clicking it from the DWC Machine Control panel, the User-Defined Macro list and I still get:

                                                M98 P"0:/macros/Pause"

                                                Error: M25: Cannot pause print, because no file is being printed!

                                                My board and firmware versions:

                                                Firmware Name: RepRapFirmware for Duet 2 Maestro
                                                Firmware Electronics: Duet Maestro 1.0
                                                Firmware Version: 2.02RC6(RTOS) (2018-12-15b2)
                                                Web Interface Version: 1.22.5

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

                                                  Were you definitely printing from the SD card on the Duet at the time?

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