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

    End Gcode is ignored or not executed with Cura

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    2
    3
    743
    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.
    • Toonundefined
      Toon
      last edited by

      I configured Cura to send M0 when the print is done. But M0 => stop.g is not executed. But the end-gcode is ignored
      I also tried to paste this code in the Cura box for end-gcode same result.
      The carriage just stops at the last gcode instruction and the console states that the print is finished. This results in a huge meld pod on top of a print.

      Cura 3.5.1
      RepRapFirmware for Duet 2 WiFi/Ethernet version 1.21 running on Duet WiFi 1.02 or later

      Content of stop.g

      ; stop.g
      ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
      M220 S100 ; set speed back to 100%
      G28 X; home
      M140 S0 ; turn off bed temperature
      M141 S0 ; turn off chamber heater
      M104 S50 ; set nozzle below GTT
      M116 ; wait
      M84 ; disable motors
      M106 S0 ; part fans off
      M81 ;PSU off
      

      Last lines of the gcode file exported by cura

      G0 F3600 X230.933 Y213.962
      G1 F2400 X229.608 Y212.637 E0.09349
      G0 F3600 X230.173 Y212.637
      G1 F2400 X230.933 Y213.397 E0.05362
      G0 F3600 X230.933 Y212.831
      G1 F2400 X230.739 Y212.637 E0.01369
      ;TIME_ELAPSED:199.079837
      G1 F1500 E-1
      M82 ;absolute extrusion mode
      M0; call stop.g
      M83 ;relative extrusion mode
      M104 S0
      ;End of Gcode
      

      2_1539796395316_IMG_6693.jpeg 1_1539796395316_IMG_6692.jpeg 0_1539796395316_IMG_6691.jpeg

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

        M0 causes the print to be terminated and stop.g to be run, if it exists. So any lines in your slicer end GCode that follow the M0 command won't be executed.

        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

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

          @dc42
          Found the issue. In stop.g I call G28 X which executes homex.g.
          It contained G1 S1 Z3 which didn't work because the Z probe was triggerd.
          Changing it to G1 S0 Z3 solved this.
          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