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

    Emergencyish stop

    Scheduled Pinned Locked Moved
    General Discussion
    4
    10
    383
    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.
    • davidvh86undefined
      davidvh86
      last edited by

      Just wondering if theirs any g code that can simply cancel the print. I know m112 rests the board but i wanted something just stopping a failed print.

      thanks

      1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User
        last edited by

        https://duet3d.dozuki.com/Wiki/Gcode#Section_M0_Stop_or_Unconditional_stop ?

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

          Pause and Cancel?

          Z-Bot CoreXY Build | Thingiverse Profile

          davidvh86undefined 1 Reply Last reply Reply Quote 0
          • davidvh86undefined
            davidvh86 @Phaedrux
            last edited by

            @Phaedrux
            yea mainly cancel. basically if i have a bad first layer i just want it to cancel the print and put some gcode to lower the z axis.

            fcwiltundefined 1 Reply Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt @davidvh86
              last edited by

              @davidvh86 said in Emergencyish stop:

              @Phaedrux
              yea mainly cancel. basically if i have a bad first layer i just want it to cancel the print and put some gcode to lower the z axis.

              And baby stepping doesn't meet your needs - at least it terms of completing the print?

              Frederick

              Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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

                https://duet3d.dozuki.com/Wiki/Gcode#Section_M1_Sleep_or_Conditional_stop

                The firmware finishes any moves left in its buffer, then it executes the macro file cancel.g if present, if the axes are homed and if a print is being cancelled. Otherwise it attempts to run sleep.g if present before all motors and heaters are turned off. It can still be sent G and M codes, the first of which will wake it up again. See also M0, M112.

                If Marlin is emulated in RepRapFirmware, this does the same as M25 if the code was read from a serial or Telnet connection, else the macro file sleep.g is run before all heaters and drives are turned off.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • davidvh86undefined
                  davidvh86
                  last edited by

                  @Phaedrux said in Emergencyish stop:

                  The firmware finishes any moves left in its buffer, then it executes the macro file cancel.g if present, if the axes are homed and if a print is being cancelled. Otherwise it attempts to run sleep.g if present before all motors and heaters are turned off. It can still be sent G and M codes, the first of which will wake it up again. See also M0, M112.
                  If Marlin is emulated in RepRapFirmware, this does the same as M25 if the code was read from a serial or Telnet connection, else the macro file sleep.g is run before all heaters and drives are turned off.

                  sorry im still fairly new to duet, what happens if a cancel.g or sleep.g are not present, and if they were what would they contain, like a list of my own gcode after the stop was triggered, such and shutting off the hotend, chamber since only the moves would be canceled ?

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

                    @davidvh86 said in Emergencyish stop:

                    what happens if a cancel.g or sleep.g are not present

                    I think the "before all motors and heaters are turned off. " covers the case where neither are present.

                    I don't use sleep.g myself, but I do have a pause.g and cancel.g

                    ; pause.g
                    ; called when a print from SD card is paused
                    G10		; retract filament
                    G91		; relative positioning
                    G1 Z5 F600	; lift Z by 5mm
                    G90		; absolute positioning
                    G1 X10 Y10 F10000	; go to X=0 Y=0
                    
                    ; cancel.g
                    ; Run when the print is paused, and then canceled.
                    G10 P0 R0 S0		; Set hotend temp to 0
                    M140 S0			; Set bed temp to 0
                    M106 S255 		; Fan at 100 to cool nozzle and bed
                    M220 S100		; Set speed factor back to 100% in case it was changed
                    M221 S100		; Set extrusion factor back to 100% in case it was changed
                    M204 P1000 T4000	; Set printing and travel accelerations
                    M566 X900 Y900 Z30 	; Set maximum instantaneous speed changes (mm/min) (Jerk)
                    G28 XY			; home XY
                    M84			; turn off steppers
                    G4 S60			; wait 1 minute for nozzle to cool
                    M107			; turn off the fan
                    

                    As you can see cancel basically just turns off the heaters and motors with a little bit of extra detail.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    davidvh86undefined 1 Reply Last reply Reply Quote 0
                    • davidvh86undefined
                      davidvh86 @Phaedrux
                      last edited by

                      @Phaedrux

                      sweet thanks examples are a huge help. I appreciate all your help btw, You made this project go a lot smoother, probably would have taken twice as long to finish lol.

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

                        No problem. Glad I could help.

                        The gcode wiki is a great resource. You should always have it open in a tab. Any time you're wondering if you can do something or how something works, searching the wiki there can be a big help.

                        https://duet3d.dozuki.com/Wiki/Gcode

                        Since everything is configured with gcode, and there is basically a gcode for everything, and anything can be configured on the fly, anything you can think of doing, you can probably do.

                        Z-Bot CoreXY Build | Thingiverse Profile

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