ATX PS On Pin: Pulse a Heartbeat Signal for External Watchdog?
-
If I decide to add firmware support for a heartbeat on PS_ON, what frequency would you want, and what duty cycle?
-
JustDave, makes sense and its a novel approach.
-
Frequency of one cycle per second is sufficient, and a duty cycle of 50% is fine.
-
I think the problem is that the M81 command waits for all movement to stop before it executes.
Instead of using M80/M81 and the ATX power pin, I suggest you use one of the pins on the expansion header, then you can use M42 commands to set it low and high. See https://duet3d.com/wiki/Using_servos_and_controlling_unused_I/O_pins.
This worked beautifully until I upgraded from 1.18.1 to 1.20RC3, now once again my heartbeat stops until macros such as auto-calibrate and home-all are completed.
-
Is this the reason that my 1.18.1 M42 commands are now waiting for macros to complete before executing?
Version 1.18.2/Bug Fixes…
"M42 gcode commands were not synchronised with movement"If so, is there some other command I can use that will execute during a macro instead of waiting for it to complete?
-
Why not send the M42 command before calling the macro, or at the beginning of the macro?
-
Original intent was a heartbeat of 1 cycle per second to prove the processor was healthy, which worked great in 1.18.1. Now the M42 has to wait for a long move to complete, which can take up to 20 seconds at first layer speeds. I would rather not wait that long to cut power to a non-responsive Duet board.
What about a M400 parameter (S-1?) that forces "do it now" rather than "wait for current moves to finish"?
Or, back to my original request of a heartbeat on the PS_ON pin…
If I decide to add firmware support for a heartbeat on PS_ON, what frequency would you want, and what duty cycle?
-
I figured out a way to get a perfect heartbeat…
M307 H3 A-1 C-1 D-1 ; Disable heater 3 to make it available for Watchdog timer
M42 P3 S0.50 F2 ; Switch I/O pin 8 (HEATER3) on expansion header at 50% PWM at 2 HzWorks great; inspired by this posting: https://www.duet3d.com/forum/thread.php?id=1866#p17119
Gotta love this forum.
-
Ok, but bear in mind that the PWM on that pin is generated by a hardware peripheral inside the MCU, so it's presence doesn't mean that the firmware is still running correctly.
-
At this point, I’ll take what I can get. I appreciate the feedback. Any way I can rescind the “answer” token?
Edit: marked as unsolved