Custom E-stop behavior

I have been doing alot of trial and error figuring out aluminum with my larger build. As I am “learning” I have noticed that it would be helpful to have something like a “non-emergency” emergency stop.

I use octopi to control my machine. I use a power strip as my serious E-stop. In octopi, if I hit cancel, it asks for confirmation, the executed whatever commands are still pending, then cuts power to the motors. This is especially an issue since my z likes to fall when unpowered.

It many of these non emergencies, it would be useful of the machine moved to safe z, and remembered it’s position.

Is it possible to add a custom behavior to and e stop? In octopi or otherwise? Bonus points if it is a hardware button, but not a deal breaker. Any one have experience with this. I’m not far enough along in software and all that to really diy it.

Thanks!

I implemented an instant pause function that can be hooked up to a button on a spare pin. It’s not in Marlin so you would have to patch yourself.

The trouble with anything at the gcode level (or pi) is that the movement queue could be 15 or 30 seconds worth of movements if you have lots of straight line segments. It’s not nearly quick enough for some cases where you need to adjust something, and any emergency stop loses the progress and can’t be resumed. That was the motivation for the instant pause.

It does carry some risk because it doesn’t decelerate or accelerate smoothly, so it’s possible that it could lose steps when used.

1 Like

Thanks! I’m gonna look into this tonight