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

    STOP.g

    Scheduled Pinned Locked Moved
    General Discussion
    4
    11
    1.7k
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by Phaedrux

      Stop.g can contain whatever you want to happen when your print is finished. It can be called with M0 in your slicer end gcode.

      For example, mine contains this

      ; stop.g
      ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
      ; Also called by slicer end gcode by M0
      ;
      M400			; Finish move queue
      M104 S0 		; Extruder heater off
      M140 S0 		; Bed heater off
      M106 S255 		; Fan at 100 to cool nozzle and bed
      G91			; Relative positioning
      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
      G1 E-2			; Retract filament 2mm
      G1 X5 Y5		; Wipe nozzle 
      G1 Z5			; raise nozzle 5mm from printed part
      G90			; Absolute positioning
      M104 S35		; Set hot end low and wait
      G4 S300			; Wait 5 minutes
      M116			; wait for temp to drop
      M106 S0			; Fan off
      M104 S0			; extruder heater off
      G28 X Y			; Home X and Y
      G28 X Y			; Home it again, Sam.
      M84			; Steppers off
      M98 P"ZSpeedsNormal.g"	; Load normal z speed settings again.
      
      ;Play a little beep beep beep to show print ended.
      M400			; Clear queue again before jingle
      G4 S1
      M300 P250 S750
      G4 P251
      M300 P200 S1250
      G4 P201
      M300 P250 S750
      G4 P251
      M300 P200 S1250
      G4 P201
      M300 P250 S2500
      G4 P251
      M300 P150 S2000
      G4 P151
      M300 P150 S2500
      G4 P151
      M300 P350 S3700
      G4 P351
      

      I'm not sure what you mean by the latest g files.

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 1
      • jmlundefined
        jml
        last edited by jml

        By latest I just was thinking that perhaps there was a standard Stop.g file with stuff in it to start as a starting point for modifying.

        During homing, my STOP button works from DWC, but not from the PanelDue. Do these 2 different stop buttons run different files?

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

          @jml I believe the emergency stop buttons send a halt and restart command. They don't run stop.g.

          Does the button on the paneldue do anything when you touch it?

          Z-Bot CoreXY Build | Thingiverse Profile

          jmlundefined 1 Reply Last reply Reply Quote 0
          • jmlundefined
            jml @Phaedrux
            last edited by

            @phaedrux it normally resets the board. But if I am setting up my printer and I press home, and I realize it is homing in the wrong direction, I should be able to hit the stop button in order to stop/reset the printer at that moment. I think it waits until the current move is done.

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

              Yes I think that may be a limitation.

              You may want to look into getting a true emergency stop button that can kill the power immediately. Like a big red plunger button.

              Hitting the power switch will do the same.

              Z-Bot CoreXY Build | Thingiverse Profile

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

                The stop button on PanelDue has the drawback that the command it sends gets queued like other commands, so it will wait for the homing command to finish first. It's on my list to have it send an out-of-band signal that can bypass the queue.

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

                  Ah I see, that explains it. I guess I'll get a big emergency stop button until then!

                  1 Reply Last reply Reply Quote 0
                  • Stevoundefined
                    Stevo
                    last edited by Stevo

                    Hey

                    If I have a similar stop.g file In my sys file and I wanted to trigger this at the end of a print created in simplify 3d all I do is add M0 to the ending script tab on its own it will execute it at the end of the print ?

                    Thanks

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

                      @stevo said in STOP.g:

                      Hey

                      If I have a similar stop.g file In my sys file and I wanted to trigger this at the end of a print created in simplify 3d all I do is add M0 to the ending script tab on its own it will execute it at the end of the print ?

                      Thanks

                      That's right. M0 in the slicer end code will call stop.g if it exists. This is what I use and it works well.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      Stevoundefined 1 Reply Last reply Reply Quote 0
                      • Stevoundefined
                        Stevo @Phaedrux
                        last edited by

                        @phaedrux

                        Thank you

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