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

    auto save on loss of power from a different pin (endstop?)

    Scheduled Pinned Locked Moved
    General Discussion
    3
    13
    1.5k
    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.
    • T3P3Tonyundefined
      T3P3Tony administrators @dragonn
      last edited by T3P3Tony

      @dragonn What you might want to do is use pause in combination with other steps within your trigger.g so pause first (with the associated head parking etc (at higher current on the motors etc) then turn off/down what you want.

      www.duet3d.com

      1 Reply Last reply Reply Quote 0
      • dragonnundefined
        dragonn
        last edited by

        You mean use M226 in trigger.g? But when I run this first it will block executing that macro? I could move head back a the point where pause.g moves it, the lower motors current, standby heater and then run M226.

        Will it be possible to configure a second trigger to resume printing?

        1 Reply Last reply Reply Quote 0
        • T3P3Tonyundefined
          T3P3Tony administrators
          last edited by

          Yep should run pause.g... need to check if M226 save the position (I think it does but I have not tested that). Pause is not permanently blocking though, once the macro has finished running you can then carry out other commands.

          I would not have an automatic resume unless you are 100% sure that it wont cause issues. What about different bed temps in different prints, or if the power is down for long enough that the UPS runs out of power, the HB cools down and the print detaches?

          www.duet3d.com

          1 Reply Last reply Reply Quote 0
          • dragonnundefined
            dragonn
            last edited by

            Hmmm not sure, I think when I configure the resume trigger to rising edge it should not trigger when the UPS loss it power - since the input will be already high before Duet even boots up.

            Only problem will be when a next power cycles goes, this could trigger it.
            But yeah - I wont automatic resume only when the power doesn't go down.

            Different bed temps should be a problem since I will keep the bed on to it's set temperature when running from UPS.

            1 Reply Last reply Reply Quote 0
            • T3P3Tonyundefined
              T3P3Tony administrators
              last edited by

              fair enough. you can test all of this using a switch plugged into the chosen pin before using the UPS so you can see if the ressuract file is being saved.

              www.duet3d.com

              1 Reply Last reply Reply Quote 0
              • dragonnundefined
                dragonn
                last edited by

                Trigger is already working. Some questions more:
                as far I know it is not possible to have different macros for rising and falling edge? It would be nice to put in on the firmware wish list.
                But I have a different idea - can I use in trigger2.g M583 to wait for E1 endstop to go back to high? When M583 stops executing the macro I could put the restore commands after it.

                And one question more. How can I suspend the hotend so I can restore it temp after power goes back? I see they is a M144 but it only works with beds.

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

                  Yes you can have different macros for rising and falling edge.

                  If you have only one hot end then you can do T-1 when pausing to put the hot end in standby. To reselect it, send T0 (assuming it is tool 0) followed by M116 to wait for it to reach temperature.

                  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

                  dragonnundefined 1 Reply Last reply Reply Quote 0
                  • dragonnundefined
                    dragonn @dc42
                    last edited by

                    @dc42 Wait.. just use next trigger so it runs trigger3.g. Didn't think about that.
                    Yes I have one hotend for now so it will work.

                    But thinking further it would be better to use M583 then a second trigger. This would prevent any triggering when the UPS batteries run out of power and the power goes back. Other option would be to enable the restore trigger in the power save trigger. And with S-1 I can disable a trigger I am right?

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

                      @dragonn, yes you can disable a trigger with S-1 in the M581 command.

                      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
                      • dragonnundefined
                        dragonn
                        last edited by

                        It works! Only problem with I had was M226 didn't work, seems like it doesn't stop executing the macro until pause.g is finished. But M25 works perfectly fine, posting this because maybe it will be useful for someone else.

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

                          M226 is intended for use in the GCode file being printed, for example to pause after a particular layer has completed. So it waits until all the moves in the queue have been completed. M25 is intended for use from a different source of GCodes.

                          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 2
                          • T3P3Tonyundefined
                            T3P3Tony administrators
                            last edited by

                            @dc42 said in auto save on loss of power from a different pin (endstop?):

                            M226 is intended for use in the GCode file being printed, for example to pause after a particular layer has completed. So it waits until all the moves in the queue have been completed. M25 is intended for use from a different source of GCodes.

                            I have updated the gcode documentation to reflect this.

                            www.duet3d.com

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