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

    Cancel.g doesn't do what I want :-)

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    8
    24
    3.2k
    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.
    • kuhnikuehnastundefined
      kuhnikuehnast
      last edited by

      Hi there,
      am I right that after cancelling a print job (after pause was pressed) the cancel.g file is started? Because the printer doesn't do what I tell him in this file...? Or what subroutine is started after cancel is pressed?

      greetings kuhni

      1 Reply Last reply Reply Quote 0
      • Stealthy_TTundefined
        Stealthy_TT
        last edited by

        Correct, I have mine set to turn off hotend and bed then move X and Y to 0.

        What are you trying to get it to do?

        1 Reply Last reply Reply Quote 0
        • kuhnikuehnastundefined
          kuhnikuehnast
          last edited by

          Really strange... Tried to switch of the part cooling Fan (m107 and tried also M106), a G1 X320 Y320 and also wanted to switch of the Stepper Motors. But the only thing that is done is a G1 X320 move and X and Y are disabled. The part cooling fan stays enabled and, the z motors also and the Y movement doesn't work...?

          mloidlundefined Stealthy_TTundefined 2 Replies Last reply Reply Quote 0
          • mloidlundefined
            mloidl @kuhnikuehnast
            last edited by mloidl

            @kuhnikuehnast
            Can you post your cancel.g and also pause.g?

            On my machine i'm doing similar things and they are working as expected

            1 Reply Last reply Reply Quote 0
            • Stealthy_TTundefined
              Stealthy_TT @kuhnikuehnast
              last edited by Stealthy_TT

              @kuhnikuehnast said in Cancel.g doesn't do what I want 🙂:

              Really strange... Tried to switch of the part cooling Fan (m107 and tried also M106), a G1 X320 Y320 and also wanted to switch of the Stepper Motors. But the only thing that is done is a G1 X320 move and X and Y are disabled. The part cooling fan stays enabled and, the z motors also and the Y movement doesn't work...?

              I use

              M104 s0 ; hotend off *
              M140 s0 ; bed heat off*
              M106 s0 ;fan off
              G1 x0 y0 f5000 ; move hotend away from print*
              M84 ; motors off

              “*” means I also use it in my end script in Slic3r

              1 Reply Last reply Reply Quote 0
              • denkeundefined
                denke
                last edited by denke

                The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.

                I have this /cancel.g and it works:
                ; called when a print is cancelled after a pause.
                M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
                G28 ; home all towers

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

                  Can you confirm that the cancel.g file is in the /sys folder of 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
                  • mloidlundefined
                    mloidl
                    last edited by

                    Maybe you have something in your pause.g which prevent calling cancel.g?

                    1 Reply Last reply Reply Quote 0
                    • Lakkoundefined
                      Lakko @denke
                      last edited by

                      @denke said in Cancel.g doesn't do what I want 🙂:

                      The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.

                      I have this /cancel.g and it works:
                      ; called when a print is cancelled after a pause.
                      M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
                      G28 ; home all towers

                      the fan is disabled even if it is a thermostatic fan?

                      denkeundefined 1 Reply Last reply Reply Quote 0
                      • denkeundefined
                        denke @Lakko
                        last edited by

                        @lakko said in Cancel.g doesn't do what I want 🙂:

                        @denke said in Cancel.g doesn't do what I want 🙂:

                        The usual dumb question ... you named it "cancel.g" ...? Because I think it is case sensitive.

                        I have this /cancel.g and it works:
                        ; called when a print is cancelled after a pause.
                        M106 P0 S0 ;Set fan 0 (part cooling fan) to 0%
                        G28 ; home all towers

                        the fan is disabled even if it is a thermostatic fan?

                        I don't know, I didn't try it yet

                        1 Reply Last reply Reply Quote 0
                        • kuhnikuehnastundefined
                          kuhnikuehnast
                          last edited by

                          cancel.g is in the /sys folder (same folder as config.g)
                          This is my cancel.g file:
                          ; stop.g
                          ; called when a print is cancelled after a pause.
                          M140 S0 ; heated bed heater off (if you have it)
                          M104 S0 ; Extruder off
                          G91 ; relative positioning
                          G1 E-1 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
                          G1 Z+0.5 E-3 X-20 Y-20 F9000 ; move Z up a bit and retract filament
                          G90 ; absolute positioning
                          G28 X0 Y0 ; move X/Y to min endstops so the head is out of the way
                          G1 X320 Y320 ; parks X head pushes bed out to front so you can pull part
                          M106 P1 S0 ; fan off
                          M84 ; steppers off

                          and this is my pause.g

                          ; pause.g
                          ; called when a print from SD card is paused
                          ;
                          ; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
                          M83 ; relative extruder moves
                          G1 E-10 F3600 ; retract 10mm of filament
                          G91 ; relative positioning
                          G1 Z5 F360 ; lift Z by 5mm
                          G90 ; absolute positioning
                          G1 X0 Y0 F6000 ; go to X=0 Y=0

                          Really strange...??? Any ideas?

                          1 Reply Last reply Reply Quote 0
                          • kuhnikuehnastundefined
                            kuhnikuehnast
                            last edited by

                            btw: just found another file on the /sys folder called stop.g ? Where is the difference between these 2 files? (Also posted in the stop.g the same code as in cancel.g but with no effect... )

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

                              stop.g will be run if you send the M0 command.

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

                              Z-Bot CoreXY Build | Thingiverse Profile

                              1 Reply Last reply Reply Quote 0
                              • kuhnikuehnastundefined
                                kuhnikuehnast
                                last edited by

                                Just looked at the console:
                                Cancelled printing file XXXX.gcode, print time was 0h 23m G0/G1: insufficient axes homed

                                But there is no gcode that disables the steppers before???

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

                                  The "insufficient axes homed" may indicates that your homex.g or homey.g file isn't right. Try sending G28 X0 Y0 from the console and see if you get the same message.

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

                                    M25 executes macro file pause.g
                                    M24 executes macro file resume.g
                                    M0 executes macro file stop.g

                                    I know that after I press ""pause print"" in DWC and press cancel, its executes macro file stop.g, which in my case includes these commands:

                                    ;Stop Printing (M0)
                                    G10 P0 S0; 	Turn off extruder heater
                                    M140 S0; 	Turn off bed heater
                                    M106 P2 S0; 	Turn off cooling Fan
                                    M300 S100 P500;	Sound beep using PanelDue buzzer, frequency Hz (Snn), Duration (Pnn) 
                                    

                                    I don't have cancel.g file in my sys folder,
                                    What am I missing?

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

                                      If you press Pause and then Cancel, it runs cancel.g. Whereas if the print terminates by executing M0 at the end of the file, it runs stop.g.

                                      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

                                      kuhnikuehnastundefined 1 Reply Last reply Reply Quote 1
                                      • Guyarosundefined
                                        Guyaros
                                        last edited by

                                        Thank you very much.

                                        1 Reply Last reply Reply Quote 0
                                        • kuhnikuehnastundefined
                                          kuhnikuehnast
                                          last edited by

                                          @dc42 tried G28 X0 Y0. This works just fine. Don't get any error messages and the extruder homes properly. Any other idea why this problem occurs?
                                          Here my homex.g:

                                          ; homex.g
                                          ; called to home the X axis
                                          ;
                                          ; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
                                          G91 ; relative positioning
                                          M98 Pretractprobe.g ; retract mechanical Z probe
                                          G1 Z5 F6000 S2 ; lift Z relative to current position
                                          G1 S1 X+370 F1800 ; move quickly to X axis endstop and stop there (first pass)
                                          G1 X-5 F6000 ; go back a few mm
                                          G1 S1 X+370 F360 ; move slowly to X axis endstop once more (second pass)
                                          G1 Z-5 F6000 S2 ; lower Z again
                                          G90 ; absolute positioning

                                          and my homey.g:
                                          ; homey.g
                                          ; called to home the Y axis
                                          ;
                                          ; generated by RepRapFirmware Configuration Tool on Fri Mar 23 2018 20:49:13 GMT+0100 (Mitteleuropäische Zeit)
                                          G91 ; relative positioning
                                          M98 Pretractprobe.g ; retract mechanical Z probe
                                          G1 Z5 F6000 S2 ; lift Z relative to current position
                                          G1 S1 Y370 F1800 ; move quickly to Y axis endstop and stop there (first pass)
                                          G1 Y-5 F6000 ; go back a few mm
                                          G1 S1 Y370 F360 ; move slowly to Y axis endstop once more (second pass)
                                          G1 Z-5 F6000 S2 ; lower Z again
                                          G90 ; absolute positioning

                                          1 Reply Last reply Reply Quote 0
                                          • kuhnikuehnastundefined
                                            kuhnikuehnast
                                            last edited by

                                            strange thing is, that the cancel.g is exactly the same code as I use in the end-script in simplify3d. And there it works just fine!

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