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

    power loss with UPS

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    13
    557
    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.
    • sinoleundefined
      sinole
      last edited by

      I connected a power loss sensor to my printer and wrote a trigger file for it but trigger pauses the print very slowly and doesn't immediately turn of my bed and hotend so my capacitor runs out of power. does anyone know how to make the trigger to react faster.
      I put this at the end of config.g
      M950 J3 C"nil"
      M950 J3 C"PWRDET" ; input 1 e0 filament sensor
      M581 P3 T3 S0 R1 ; PLR sensor P1 triggers Trigger3.g always (R0) TRIGGER OFF

      and following is the trigger 3
      M140 S0 R0 ; set bed temperature to 0C
      M140 S-1 ; set bed temperature to 0K to turn it off
      M104 S0 T0 ; set extruder temperature to 0C
      M107 ; turn off fan
      M913 X0 Y0 Z0.3 ;turn motors off
      M226 ; Pause the print
      G91 ;Set to Relative Positioning
      M83 ;Set extruder to relative mode
      G1 Z5 E-5 F1000 ;raise Extruder 5mm

      please help me fix this. my apartment have crazy power fluctuation because of over population of this area.

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

        @sinole

        Triggers 2 and up don't react until the current move is finished - that may be what you are seeing.

        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

        sinoleundefined 1 Reply Last reply Reply Quote 0
        • sinoleundefined
          sinole @fcwilt
          last edited by

          @fcwilt thanks, so if the move is long it wont trigger on time to save the print.

          deckingmanundefined fcwiltundefined sinoleundefined 3 Replies Last reply Reply Quote 1
          • deckingmanundefined
            deckingman @sinole
            last edited by

            @sinole M226 is the wrong command to use in this situation as it will wait for all moves in the queue to be completed. Use M25 instead which will take a maximum of one move plus 2 seconds.

            In fact, the macro "pause.g" will run after movement stops so all you need to have in your trigger3 file is that one M25 command, then move all the other commands into the pause.g file which will be tidier. You might also want to do the G1 Z move before you reduce the motor currents. Better still, use M84 at the end of pause.g.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            gloomyandyundefined sinoleundefined 2 Replies Last reply Reply Quote 1
            • fcwiltundefined
              fcwilt @sinole
              last edited by

              @sinole said in power loss with UPS:

              @fcwilt thanks, so if the move is long it wont trigger on time to save the print.

              There is a command (which I cannot remember) which will breakup long moves so they are done as a series of short moves.

              This will reduce the time before the trigger is acted upon but it still won't be immediate.

              I think the only trigger that is immediate is trigger 0

              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

              1 Reply Last reply Reply Quote 0
              • gloomyandyundefined
                gloomyandy @deckingman
                last edited by

                @deckingman If all the trigger file does is M25 it may be better to just use trigger 1, which according to the docs...

                " Trigger number 1 causes the print to be paused as if M25 had been received. "
                
                deckingmanundefined 1 Reply Last reply Reply Quote 1
                • sinoleundefined
                  sinole @sinole
                  last edited by

                  @sinole I have tried M25 as well, It was same.

                  1 Reply Last reply Reply Quote 0
                  • sinoleundefined
                    sinole @deckingman
                    last edited by

                    @deckingman M669 S1 t1?

                    deckingmanundefined 1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman @gloomyandy
                      last edited by

                      @gloomyandy said in power loss with UPS:

                      @deckingman If all the trigger file does is M25 it may be better to just use trigger 1, which according to the docs...

                      " Trigger number 1 causes the print to be paused as if M25 had been received. "
                      

                      Good point!

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      1 Reply Last reply Reply Quote 0
                      • deckingmanundefined
                        deckingman @sinole
                        last edited by

                        @sinole said in power loss with UPS:

                        @deckingman M669 S1 t1?

                        Hmm - that's a fairly recent addition with limited documentation so I'm unable to comment. Give it a try but use with caution. I wouldn't go for too short a segment length say 10mm as a minimum?

                        Ian
                        https://somei3deas.wordpress.com/
                        https://www.youtube.com/@deckingman

                        jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                        • jay_s_ukundefined
                          jay_s_uk @deckingman
                          last edited by

                          @deckingman I run M669 S1 T1 on my CNC no issue

                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                          deckingmanundefined 1 Reply Last reply Reply Quote 1
                          • sinoleundefined
                            sinole
                            last edited by

                            if I want to write a "if" function how should I address endstop swtich status. like

                            if {endstop.swtich[n] == 1}

                            it want to just do everything in pause.g and not write a trigger that addresses pause. according to gloomyandy that doesn't work great. with the "if" I can make pause.g to also turn of bed and motors when switch is triggered. and in case of normal pause just pauses.

                            1 Reply Last reply Reply Quote 0
                            • deckingmanundefined
                              deckingman @jay_s_uk
                              last edited by

                              @jay_s_uk said in power loss with UPS:

                              @deckingman I run M669 S1 T1 on my CNC no issue

                              Good to know - thanks.

                              Ian
                              https://somei3deas.wordpress.com/
                              https://www.youtube.com/@deckingman

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