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

    end.g is possible?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    9
    21
    2.0k
    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.
    • Anidalundefined
      Anidal
      last edited by

      Only runs the file and does not do any other action?
      Based on the description of the command M0, the printer still starts cancel.g, turns off stepper motors, heaters and only then starts stop.g.
      Somewhat not the behavior that would be desirable.

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

        Yes, if stop.g is present then M0 just waits for all moves to complete, sets the printer state to "idle", and runs the file. Even if stop.g isn't present, M0 doesn't turn the motors 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 0
        • fmaundefined
          fma
          last edited by

          I have to admit that the use of M0, M1 is confusing, and does not allow enough freedom.

          Why not only execute the corresponding macro, and provide a default one with what is described in the documentation? This way, we could tune it to match our exact needs...

          Frédéric

          1 Reply Last reply Reply Quote 0
          • Anidalundefined
            Anidal
            last edited by

            Fine! Probably, it is necessary to update the documentation so that there are no discrepancies.

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

              I'll review the M0/M1 code before the next beta and update the documentation. The intended behaviour is:

              • Wait for all moves to complete.
              • Close the SD print file and change the printer status to Idle.
              • If M0 was received while the printer was paused, execute cancel.g if it exists, else stop.g.
              • If M0 was received while the printer was not paused, execute stop.g.
              • If M1 was received, execute sleep.g.
              • If the appropriate macro file is not found, take default action, which is to turn all heaters off. Motors are left on (but as always, if they are all idle for the idle timeout period then the motor currents will be reduced to the idle percentage).

              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

              Phaedruxundefined Skimmyundefined 2 Replies Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator @dc42
                last edited by

                @dc42 said in end.g is possible?:

                I'll review the M0/M1 code before the next beta and update the documentation. The intended behaviour is:

                • Wait for all moves to complete.
                • Close the SD print file and change the printer status to Idle.
                • If M0 was received while the printer was paused, execute cancel.g if it exists, else stop.g.
                • If M0 was received while the printer was not paused, execute stop.g.
                • If M1 was received, execute sleep.g.
                • If the appropriate macro file is not found, take default action, which is to turn all heaters off. Motors are left on (but as always, if they are all idle for the idle timeout period then the motor currents will be reduced to the idle percentage).

                I would say this seems to be the case. I use M0 to call stop.g. I haven't tested the other behaviours in quite some time though.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • ctilley79undefined
                  ctilley79
                  last edited by

                  I know this is probably a nitpicky issue, but it would be nice to have an automatic trigger so you don't have to call M0 in the slicer end code. I try to decouple as much from the slicer as possible, so there are a couple use cases where this could be polished. start.g and stop.g is one of them.

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

                    @ctilley79 said in end.g is possible?:

                    I know this is probably a nitpicky issue, but it would be nice to have an automatic trigger so you don't have to call M0 in the slicer end code. I try to decouple as much from the slicer as possible, so there are a couple use cases where this could be polished. start.g and stop.g is one of them.

                    You waited two years to respond?

                    You must have really given it a lot of thought first. 😉

                    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

                    ctilley79undefined 1 Reply Last reply Reply Quote 0
                    • ctilley79undefined
                      ctilley79
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • ctilley79undefined
                        ctilley79 @fcwilt
                        last edited by

                        @fcwilt said in end.g is possible?:

                        @ctilley79 said in end.g is possible?:

                        I know this is probably a nitpicky issue, but it would be nice to have an automatic trigger so you don't have to call M0 in the slicer end code. I try to decouple as much from the slicer as possible, so there are a couple use cases where this could be polished. start.g and stop.g is one of them.

                        You waited two years to respond?

                        You must have really given it a lot of thought first. 😉

                        Frederick

                        I figured two years was enough time to let the thought simmer in DC42's mind lol

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

                          Whoever reads this, you might vote this one up: https://forum.duet3d.com/topic/20708/start-g-end-g
                          Sorry have not seen this post when I put my request in the wishlist so I opened another post! Since my usecase is more detailed then here, I recommend to swap over to my request?

                          1 Reply Last reply Reply Quote 0
                          • Skimmyundefined
                            Skimmy @dc42
                            last edited by

                            @dc42 If I execute stop.g via M0 at the end of my gcode-file, is it ok to have M0 inside of stop.g again to shut off the heaters?

                            my blog: https://www.well-engineered.net

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

                              @skimmy said in end.g is possible?:

                              @dc42 If I execute stop.g via M0 at the end of my gcode-file, is it ok to have M0 inside of stop.g again to shut off the heaters?

                              That's a good question! I haven't tested it.

                              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
                              • abearundefined
                                abear @dc42
                                last edited by

                                Hi @dc42 ,

                                I thought maybe, given how old this thread is, this had already been implemented, so I updated firmware. But alas no. I just tested and it does not. Hence my print ends with the hot end sitting against my print, still hot for 2 hours until I wake up.

                                Adding M0 manually to the end of the gcode via the slicer is a poor implementation.
                                M0 is a STOP or Unconditional STOP. Which that's exactly what it should do. STOP. Not, oh run this other gcode now.
                                In addition, I print from multiple printers and often use different slicers. Not only do I not want to apply this change to every slicer, I have different requirements for the end of a print for each machine. Therefore, it makes vastly more sense for the firmware to have a machine specific end.g to be appended to the end of each job. This way, I can customise the end print for each machine and don't have to have multiple machine profiles (so much) for each slicer.

                                I vote this UP. Please provide the facility to append the content of an end.g file to the end of every job.

                                Thanks
                                Adrian

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

                                  @abear in the RRF3.5beta series stop.g is called when a print completes normally regardless of whether M0 is used.

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