[FR] Emergency Endstop (physical) additionally to virtual

Problem
Sometimes during modifying the printer or configuration it could be possible that there is a missing task before printing starts. For example bed leveling via probe (accidentally not added start GCODE) or something else missing that causes the head crashing into the bed.

Solution
A second endstop or “emergency endstop” parameter should be added to Z-Axis (or all?) that leads into a emergency shutdown. It should fire if the endstop triggered and the head should move below an defined offset. Like if endstop Z1 triggered and the head should move 1mm lower the printer should stop immediately. This is actually not possible with the offset. The GPIO can be read to trigger a M112 only which is perhaps too early.

Usage
[emergency_z]
endstop_pin: ^!PL7
endstop_offset: 0.5

If there is such function I would be happy if somebody could share it.

Cheers,
Nils

1 Like

FYI, you can do something like that today with:

[gcode_button shutdown_on_switch]
pin: ^!PL7
press_gcode:
    { action_emergency_stop("Custom endstop switch triggered") }

Of course, if you want to use that endstop switch for anything else, then that could be a challenge to implement.

-Kevin

2 Likes

That ‚workaround‘ I know, many thanks for the example. I plan to level the bed higher and use it like this but would be much nicer to have a Offset to avoid levelling the bed again.

Nice! Super simple solution.

Though, I could see the advantage of having actual secondary endstops at the top/bottom of the Z axis.

They’d be especially useful whenever a fault occurs and I need to lower the bed to get a failed print off the build plate. Those obstructions prevent normal homing.

As is I may be able to use the gcode button with sensorless homing on my Z-steppers. It would minimize the damage from accidentally crashing the Magneto X build plate down too far. I have to use a force move to deal with that build plate situation, so some extra safety is always nice.