Pause / Kill printer

I’m up and cutting with RH and EstlCam, but I notice that the Pause/Kill functionality in RH isn’t working with my SKR Pro board, and I can’t find a config setting to tell it how.

How are folks pausing or killing jobs aside from the Big Red Button?

That pause (through RH) just stops sending commands. The controller keeps a buffer of a few commands (it has to, to be able to plan smooth transitions between lines). But that means that pausing in RH still has to finish the commands in the buffer. On a tiny print, it isn’t noticable, because each command is mm long. On a CNC project, a command could be 100mm long, so a few could take a while.

I always assumed it killed the power. But RepRapFirmware could use the physical button to trigger a Macro that can pause, lift Z, kill the spindle, park etc… I don’t think Marlin can do this but I could be wrong. In any case I would not 100% trust a software solution. That’s why I have a power kill switch. Just a surge protector switch or a light switch that controls the outlet the machine is on.

1 Like

I’m definitely planning on an electrical kill switch, as it’s saved my butt on both my lathe and mill.

However I’d like a software solution for those times when I don’t need the ultimate solution.

Researching the RH Documentation, it appears as you can indeed program the pause button with a custom gcode sequence. Still trying to figure out what’s behind the kill button.

If you are looking for g-code emergency stop, it is M112. As Jeff mentioned, this g-code gets put in the buffer, so may need to wait a bit for the job to be killed. There is a workaround. Marlin has an emergency parser that looks at a few g-code commands before they go in the buffer. The V1 maintained builds have this feature disabled. In configuration.h, see this block of code:

/**
 * Emergency Command Parser
 *
 * Add a low-level parser to intercept certain commands as they
 * enter the serial receive buffer, so they cannot be blocked.
 * Currently handles M108, M112, M410, M876
 * NOTE: Not yet implemented for all platforms.
 */
//#define EMERGENCY_PARSER

So, if you reflash your board with this setting turned on, you should get an immediate stop with an M112. Note that this kills the job, and it may require you to cycle your control board before y ou can do another job. This is not a pause you can then resume from.

I had implemented a pause function in Marlin, hooked up to an external button. The good part is, it can resume when the button is released, so if you are halfway through a job and you realize you’re about to cut into one of your clamps, you can pause, move the clamp, and resume.

The bad part is, it stops and resumes without acceleration, so depending on your feed rate, it could skip steps.

Within the software it works by altering Marlin’s perception of time (sorta) and all the regular machinery for queueing and interpolating stays in place unchanged, just temporarily frozen in time.

I was thinking even better would be an analog control on a knob that could stretch time and decrease feed rate by any amount, not just pause/resume. Then you could stop and start with acceleration, by turning the knob. Even better, if you had a load cell or a spindle RPM sensor, you could set up roughing operations to be unreasonably fast and automatically decrease feed rate based on the physical resistance encountered.

Unfortunately this is too low on my list and it will probably never get done, but I think it would be cool.

Thanks for the input guys. I dove a bit deeper and found some old threads you’d posted similar info in, and that helped too.

I found the emergency parser snippet in Configuration_adv.h, and that will take care of the software based kill I think.

I really like your pause switch idea jamie! I notice your video uses a momentary switch. I assume a latch switch would work as well, and would be my preference. I notice you reference “pin 41”. What controller is that referring to? I’m using a SKR Pro 1.2, and I’m scratching my head over how to add the wiring.

On RAMPS and similar, pin 41 is the button that’s made available on the LCD, which is ordinarily a kill button.

Fun twist, I am using MKS Gen L 1.0, which is a RAMPS-like Atmega board, and I discovered on that board, the LCD button is not connected to pin 41 of the controller, but is instead hard-wired to a reset line, so it does a hard reset and can’t be configured otherwise. I wired it to some other GPIO for the purpose of the demo. Any unused GPIO should work equally well.

I agree a toggle switch is much better than a momentary button, or else you will have only one hand free while the machine is paused.