3D printer G-code · Marlin
M413: Power-loss recovery (Marlin)
Power-loss recovery — Turns power-loss recovery on or off. With it on, Marlin writes the print state to the SD card so that a print can continue after a power cut. It causes extra writes to…
On this page
| Property | Value |
|---|---|
| Command | M413 |
| Function | Power-loss recovery |
| Firmware | Marlin |
| Group | Print control |
| Syntax | M413 S<0|1> |
What does M413 do?
Turns power-loss recovery on or off. With it on, Marlin writes the print state to the SD card so that a print can continue after a power cut. It causes extra writes to the card and short pauses on some printers.
Parameters
| Parameter | Meaning |
|---|---|
S | 1 on, 0 off |
Example
M413 S1Tips from practice
- Resume only if the part did not come off the bed and the nozzle can reheat without melting into it.
Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.
Related commands
More print control commands
| Command | Function | Firmware |
|---|---|---|
M220 | Speed factor | Marlin and Klipper |
M600 | Filament change | Marlin |
M412 | Filament runout sensor | Marlin |
M84 | Disable motors (M84 / M18) | Marlin and Klipper |
M400 | Finish moves | Marlin and Klipper |
M112 | Emergency stop | Marlin and Klipper |
M25 | Pause SD print (M25 / M24) | Marlin |
EXCLUDE_OBJECT | Cancel one object | Klipper |
PAUSE | Pause, resume, cancel | Klipper |
Test it before you print
Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.
Open the simulator