I’ll share an outline of what I did for my “pan-pan” button (i.e. almost-an-emergency stop) that I have in addition to my “mayday” button (a.k.a. the nuclear option).
Positive from the power supply runs up through the NC (normally closed) side of the e-stop button, then through the small switch (which I mounted alongside of the e-stop button), and down to the IoT Relay. Negative connects straight to the IoT Relay. The router then plugs in to a normally off receptacle on the IoT Relay.
I used the connector from my Shapeoko Touch Probe’s pigtail (not needed with the newer controller boards) to connect to the well-labeled FEED_HOLD pin pair on the top right of the controller. The wire pair goes up to the NO (normally open) pins on the e-stop button.
In normal use, the e-stop button is unlocked and ready to be slammed. The router power is controlled by the small switch next to the e-stop button. If things start going wrong, I hit the e-stop button, which breaks the circuit to the IoT Relay, killing the router’s power, and triggers the FEED_HOLD circuit on the controller. I can then clear the issue I was about to encounter, then unlock the e-stop button and continue.
My pan-pan button, which basically pauses the machine and lets me deal with something before everything goes completely pear-shaped, is not a substitute for a mayday button. If you’re grinding into a clamp and throwing white-hot sparks all over your dusty workspace, you don’t want a “pause and contemplate” button like I described above. You want an “Oh, [expletive]!” option that kills everything dead now. That can be a big switch, power cable, second “really e-stop” button with an IoT Relay, or whatever.
If you catch something about to happen, having a pan-pan button to pause everything and then resume is great. Once you’ve crashed and skipped steps or whatever, you’ve got to start back from homing, so killing all power is logical. Oh, and at least a few times, I’ve painted myself into a corner and, while I hit my kinder, gentler button to pause before something bad happened, there was no recovery that wouldn’t involve crashing, so with the machine stopped, I calmly and quietly leaned over and turned off the Shapeoko power.
(Sometimes I’ll also add a “tool change” to the G-code at the end of my jobs, right before the M5/M30 tail. At least with Carbide Motion, that pauses execution and waits for me to click to continue, which is convenient for cleaning up the back of the machine or removing inconveniently necessary clamping before the machine heads away to the ends of Y.)
I’ve actually mused a couple times on actual limit switches (as opposed to homing switches) which would stop the machine from attempting to travel outside the box. I figure I could just wire them in parallel with FEED_HOLD, so if a job is attempting to run off the rails, it’d automatically enter a feed hold (at which point I’d shut it down and contemplate the error of my ways). I’d have to sacrifice a small amount of travel at the extreme ends in order to add switching, but it would make it a lot more forgiving if I, say, forgot to reset zero before the job.