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

      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
                      • dc42undefined
                        dc42 administrators
                        last edited by

                        Are you sure that the "insufficient axes homed" message was produced by cancel.g, or could it have been produced at the start of the print?

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

                          omg! I now found the problem! 😂 😌

                          In my homex.g I told the machine to travel 370 to reach the endstop. But as I pause the extruder at X0 Y0 and then move the extruder to X-20 I have to move at least 390... 😂

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

                            @dc42 So cancel.g will only run if pause.g was executed before and never else? (Need to know so I could modify the G-Code a little)

                            greetings kuhni

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

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

                              @dc42 So cancel.g will only run if pause.g was executed before and never else? (Need to know so I could modify the G-Code a little)

                              greetings kuhni

                              What actually happens is that when the firmware receives the M0 command when an SD card file is being printed, it closes the file. Then it looks for cancel.g if the print was in the Paused state, and stop.g otherwise. If the file is not found then it takes default action, which is basically turning all the heaters off.

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