Emergency Stop and reset
-
I have an emergency stop switch I wanted to wire into my printer and was looking for some advice. The switch has 4 contacts numbered 1-4. The switch is a push on/push off switch. When it is in the ON position, pins 1-2 have continuity. When in the E-stop position, 3-4 have continuity. I want to have it so when I press it, the printer executes M112 and stops. When I release the switch, I want it to reset the Duet board. I have a Duet 3 Mini 5+.
I know that if I wire pin 1 to Gnd and 2 to my io(x).in pin, I can use the following in my config.g to trigger M112 properly
M950 J0 C"io4.in" M581 T0 P1 S1 R0
What I haven't figured out is how I can reset the board when I release the e-stop switch. I had thought that I could potentially wire 3&4 to Gnd and the Reset pin on the LCD Ext2 connector which should hold the processor in reset, but I'm not sure if that would work right as I don't think it would even have a chance to execute the M112 stop first. I would use the e-stop to simply disconnect the 24v supply, but the e-stop switch I have is only rated for 5A so I can't run all the current through it.
Hopefully this makes some sense. I'm dealing with nonstop migraines lately so it's hard to focus.
-
Have you seen this?
https://docs.duet3d.com/en/User_manual/Connecting_hardware/IO_E_stop
-
Here is what I did. I have a mushroom button type of E Stop button, that is a single normally closed switch. I have a relay that is controlled by the Atx on /off in DWC.
I used e1stop pin to act as a trigger. I do not use the M112 command., I use the M999 command.
Here is the entry in the config.g file
M81 C"pson" ; allocate the PS_ON pin to power control but leave power off
M950 J1 C"^e1stop" ; Assign Pin1 to e1stop the terminals on the E stop switch is wired to the GND and E1 stop pin on the Duet board
M581 P1 T10 S1 R0 ; Enable Emergency Stop
M582 T10 ; when triggered run trigger10.gHere is the contents of the trigger file.;testing the trigger system
M81 ; SHUT THE POWER OFF
M291 P"E STOP ACTIVATED" S1 T5 ;Lets me know something happened
G4 S2 ;This give the power supply time to drop and stops the error messages as the VIN drops
M999 ; reboots the duet board
;END
It stays in a loop until the E stop switch is reset. Hope this helps.