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

    PanelDue ATX power supply on off toggle?

    Scheduled Pinned Locked Moved Solved
    PanelDue
    4
    9
    421
    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.
    • CNCModellerundefined
      CNCModeller
      last edited by CNCModeller

      Hi All,
      Is there an "ATX power supply" on off button on the panel due?

      I only installed my new PD over the weekend and couldn't find one like you get on the web interface.

      Many thanks
      Barry M

      Polar Duet3 Mini + 1HCL
      https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
      Wanhao D4S: Duet2
      https://forum.duet3d.com/post/296755
      K40 Laser, Duet2
      https://forum.duet3d.com/post/312082
      Wanhao D5S
      https://www.youtube.com/CNCModellerUK

      infiniteloopundefined 1 Reply Last reply Reply Quote 0
      • marvineerundefined
        marvineer
        last edited by marvineer

        Hi,

        Unfortunately, this button does not currently exist.
        But: You can write a macro that you save directly in the /macros folder, e.g. ATX toggle.

        if state.status == "off" 
        	; turn on power
        	M80
        elif state.status != "processing"
        	; turn off power
        	M81
        
        

        This will then be displayed on the Control tab of your PanelDue.

        CNCModellerundefined 1 Reply Last reply Reply Quote 2
        • infiniteloopundefined
          infiniteloop @CNCModeller
          last edited by

          @CNCModeller I noticed early that some options will always be missing from the crammed interface of the PanelDue, so I added some physical push buttons which allow me to trigger deliberate actions - one of them is to toggle ATX Power on/off (after a confirming dialog).

          CNCModellerundefined sinned6915undefined 2 Replies Last reply Reply Quote 0
          • CNCModellerundefined
            CNCModeller @marvineer
            last edited by

            @marvineer said in PanelDue ATX power supply on off toggle?:

            Hi,

            Unfortunately, this button does not currently exist.
            But: You can write a macro that you save directly in the /macros folder, e.g. ATX toggle.

            if state.status == "off" 
            	; turn on power
            	M80
            elif state.status != "processing"
            	; turn off power
            	M81
            
            

            This will then be displayed on the Control tab of your PanelDue.

            Thanks, I had created two macros one for on and off, but this is much better.
            Many thanks
            Barry M

            Polar Duet3 Mini + 1HCL
            https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
            Wanhao D4S: Duet2
            https://forum.duet3d.com/post/296755
            K40 Laser, Duet2
            https://forum.duet3d.com/post/312082
            Wanhao D5S
            https://www.youtube.com/CNCModellerUK

            1 Reply Last reply Reply Quote 0
            • CNCModellerundefined
              CNCModeller @infiniteloop
              last edited by

              @infiniteloop nice idea, I'll do this on my printer too.
              Many thanks
              Barry M

              Polar Duet3 Mini + 1HCL
              https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
              Wanhao D4S: Duet2
              https://forum.duet3d.com/post/296755
              K40 Laser, Duet2
              https://forum.duet3d.com/post/312082
              Wanhao D5S
              https://www.youtube.com/CNCModellerUK

              1 Reply Last reply Reply Quote 0
              • mfs12undefined mfs12 marked this topic as a question
              • mfs12undefined mfs12 has marked this topic as solved
              • sinned6915undefined
                sinned6915 @infiniteloop
                last edited by sinned6915

                @infiniteloop said in PanelDue ATX power supply on off toggle?:

                @CNCModeller I noticed early that some options will always be missing from the crammed interface of the PanelDue, so I added some physical push buttons which allow me to trigger deliberate actions - one of them is to toggle ATX Power on/off (after a confirming dialog).

                How did you do this? I assume that you have some sort of switch connected to an I/O pin?

                I was contemplating the same thing, then came here to search if someone had already done something similar. I thought about actually polling the voltage, not status.

                if boards[0].vIn.current < 23
                    M291 S2 R"Power State" P"Turn Printer Power On?" 
                    M292 P0
                    M80
                    G4 P1000        ; wait 1 second for power to stabilize
                elif boards[0].vIn.current > 23
                    M291 S2 R"Power State" P"Printer Power Off?" 
                    M292 P0
                    M81
                else
                    M81 
                
                infiniteloopundefined 1 Reply Last reply Reply Quote 0
                • infiniteloopundefined
                  infiniteloop @sinned6915
                  last edited by infiniteloop

                  @sinned6915

                  I assume that you have some sort of switch connected to an I/O pin?

                  I've provided four physical buttons. From my config.g:

                  ; Define endstops for physical console buttons (from top to bottom):
                  M950 J6 C"^duex.e6stop"  ; input #6 (endstop E6): button 1
                  M950 J5 C"^duex.e5stop"  ; input #5 (endstop E5): button 2
                  M950 J4 C"^duex.e4stop"  ; input #4 (endstop E4): button 3
                  M950 J3 C"^duex.e3stop"  ; input #3 (endstop E3): button 4
                  M581 P6 S0 T6 R0  ; #6: active low, ‘trigger6.g’, always enabled (button 1)
                  M581 P5 S0 T5 R0  ; #5: active low, ‘trigger5.g’, always enabled (button 2)
                  M581 P4 S0 T4 R0  ; #4: active low, ‘trigger4.g’, always enabled (button 3)
                  M581 P3 S0 T3 R0  ; #3: active low, ‘trigger3.g’, always enabled (button 4)
                  

                  Button 4 (aka "duex.e3stop") toggles ATX power, that's the macro 'trigger3.g':

                  ; trigger#3
                  
                  ; Physical button #4 on the console (counted from top)
                  
                  M400
                  M300 S4000 P70  ; beep
                  
                  if state.atxPower == false
                  	M291 P"Leistungselektrik einschalten?" R"12V Power" S3
                  	M80  ; ATX power on
                  else
                  	M291 P"Leistungselektrik ausschalten?" R"12V Power" S3
                  	M81  ; ATX power off
                  
                  ;EOF
                  
                  sinned6915undefined 1 Reply Last reply Reply Quote 1
                  • sinned6915undefined
                    sinned6915 @infiniteloop
                    last edited by

                    @infiniteloop i have an optocoupled relay triggerd by PS_ON pin on the Duet2 board and always on 5V power supply.

                    I see how you have configured the pin state for enabling the PSU, now I am wondering how to combine the two functions- the screen macro and physical button.
                    This could apply to say dust collection on a CNC machine too.

                    infiniteloopundefined 1 Reply Last reply Reply Quote 0
                    • infiniteloopundefined
                      infiniteloop @sinned6915
                      last edited by

                      @sinned6915

                      @sinned6915 said in PanelDue ATX power supply on off toggle?:

                      i have an optocoupled relay triggerd by PS_ON pin on the Duet2 board and always on 5V power supply.

                      Same here.

                      I see how you have configured the pin state for enabling the PSU, now I am wondering how to combine the two functions- the screen macro and physical button.

                      I'm not sure to understand: a button press triggers the dialog which then requests a confirmation. What do you want to combine more than that?

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