PanelDue ATX power supply on off toggle?
-
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 -
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.
-
@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).
-
@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 -
@infiniteloop nice idea, I'll do this on my printer too.
Many thanks
Barry M -
-
-
@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
-
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
-
@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. -
@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?