Delay in Cancelling Prints

When i hit cancel on a print, it takes a long (random amount of) time to cancel.

This is really hard to work when calibration and failed first layers. There are situations where the nozzle is too close(my fault setting z-offset in gcode) and it has ripped through my bed an i can't stop it in time to prevent damage.

I've looked in various places and i see that there are a few explanations. For example, the buffer for octopi needs to run out.

There is also a suggestion to install the 'emergency stop' plugin. I've tried this but it seems overkill and it requires a restart of the entire system to get things up and running again.

Are there any other solutions that i can try so that when i hit cancel, it is more snappy to stop?
Also, could cancel return home rather than freezing still and causing a giant clogged blob in my extruder?


I found enabling the EMERGENCY_PARSER option in Marlin helped with with, specifically with cancelling during blocked heat up. I do not know if it makes a difference elsewhere or not.

You could add the gcode to do this in the GCODE Scripts section under After print job is cancelled before the default settings there. Something like

G91 ; set relative motion
G1 Z10 ; raise hot end by 10mm
G90 ; set absolute motion
G1 X0 ; move hot end to x = 0

before the ; disable motors

Hi Thanks for your reply Jneilliii,

The tip on the cancel gcode is great, thanks.

as far as EMERGENCY_PARSER, i believe this the the M112 command which is what i'm trying to avoid. this shuts down all the things in the same way the Emergency Stop plugin works.

My specific use case was relative to M108 actually because that's what is sent to the printer automatically on cancel if EMERGENCY_PARSER option is enabled within firmware and reports it as part of it's capabilities. There may be more things that it does as well or interrupts, but it definitely does not shut down my connection in an "EMERGENCY STOP" kind of way. That's what my power plugins are for...