[FR] Recover/Resume print after error

Would be nice to continue a print after restart firmware after an error

From time to time it happends that i get an error (no error text, nothing in logs) and i could just resume the print aftter firmware restart. It seems like some communication or timing error.

This issue explains exactly my problem: communications dropouts · Issue #5216 · Klipper3d/klipper · GitHub

yes an error is an error and should be fixed but i´m out of ideas and the printer works perfectly fine and these errors are very rare, but when they occur they often are a waste of time and filament.

So having the option to resume the print would be awesome.

Hello @wuast94 !

That, in many ways, is not quite that easy:

When there is an issue, for what reason ever, and an error status is raised, Klipper usually shuts down the communication to the MCU.

This means: Everything that is controlled by the MCU is shut off: Heaters, steppers etc. Only the fans are set to 100% for safety reasons (cooling).

This implies, that the position of the printhead is not sure to be determined. Even if Klipper would save the last position, the real position will be off. One reason: Microstepping. If a stepper is on a microstep position when the power is turned off, the stepper will snap to the nearest full step position.

The result is, that a homing has to be performed. Hardly possible with a model on the print bed.

the realy important value is z height, after reset just heat all up again, set z to previous value, move bed down and home XY.

from there the important thing to know is where does the gcode had stopped and thats the point where we have to start again.

that way i recover actually in that case, the diffrence is that i have to compare the model with the gcode to determine on which layer i have to start. (could be saved easy) and the other diffrence, i can just resume layer by layer, so if the layer has been printed 60 % i have to reprint tthe first 60% or just start with the next layer. saved gcode state (wich could be done easy) makes it possible to resume a print were it was.

sure you have to understand gcode, execute some commands before (relative/absolute positioning etc), trim gcode file down and so on, but its totally possible. butt at the moment very difficult, could be way more easy and confortable

GitHub - The--Captain/plr-klipper: Power Loss Recovery for Klipper GitHub - The--Captain/plr-klipper: Power Loss Recovery for Klipper