Site Navigation

Your Account

Choose Language

Setting up to resume a print after a power failure

These instructions relate to RepRapFirmware 1.20. The auto-save facility was first introduced in version 1.19, however improvements in 1.20 necessitated changes to the configuration mechanism.

Limitations ¶ 

  • You should use 24V power, not 12V. This makes it much more likely that there will be sufficient power left to lift the print head when power failure is detected.
  • You must be able to re-home the printer (possibly using a different homing sequence from normal) with a print on the bed.
  • If the print becomes detached from the bed while the power is off due to loss of bed heat, you won't be able to resume the print.
  • The head must not drop down onto the print when power is removed.

How it works ¶ 

  • Any time you pause a print from SD card, the state of the print is saved to a special file on the SD card, sys/resurrect.g
  • On the Duet WiFi and Duet Ethernet, you can also also use the M911 command in config.g to enable automatic pause and state saving when low VIN voltage is detected
  • You must set up file sys/resurrect-prologue.g to home the printer, taking account of the fact that there will be a print on the bed
  • When the power supply voltage drops below the auto-pause threshold voltage, the heaters are turned off to conserve power, the state of the print is saved to file sys/resurrect.g on the SD card, the power fail script specified in the M911 command is run, and the print is left in a paused state
  • After the power is restored, you can use command M916 to resume the print from where it stopped. This command runs file sys/resurrect.g which calls sys/resurrect-prologue.g at an appropriate point to home the printer

Configuring auto-pause ¶ 

Use the M911 command. Example for a 24V Cartesian printer:

M911 S21.0 R23.0 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000"

In this example, the power fail procedure is execute if VIN drops below 21.0V. It does the following:

  • Set X and Y motors to zero current (M913 X0 Y0). This is to make the power last longer. Don't do this on a delta printer.
  • Set relative movement mode (G91)
  • Set relative extrusion mode (M83)
  • Simultaneously lift the head and retract filament (G1 Z3 E-5 F1000)

Setting up the sys/resurrect-prologue.g file ¶ 

When you print file sys/resurrect.g it performs the following operations:

  • Set bed and chamber heater temperatures
  • Set all tools and heaters to their saved temperatures and other parameters, and set tools to active or standby as needed (without executing tool change macros)
  • Call sys/resurrect-prologue.g
  • Restore fan speeds, move the head to where it stopped printing, and resume the print

At the very least, your sys/resurrect-prologue.g file must do the following:

  • Home the printer, without crashing the head into the print. On a delta, or on a Cartesian or CoreXY printer with a Z max homing switch, you can home all axes. On other types of printers you may have to skip homing Z and use a G92 command to tell the printer the current Z coordinate. If you choose not to home an axis, then even if the print head hasn't moved since power down, the motor positions will change by up to 4 full steps compared to their position at power down.
  • Execute M116 to wait for all heaters to reach operating temperature. You may do this either before or after homing axes.
  • If your power fail procedure in the M911 command retracts filament and your printer has a single nozzle, you may wish to undo the retraction.

Example for a delta printer:

M116 ; wait for temperatures
G28 ; home all towers
M83 ; relative extrusion
G1 E4 F3600 ; undo the retraction that was done in the M911 power fail script


Add Comment

View Statistics:

Past 24 Hours: 15

Past 7 Days: 85

Past 30 Days: 436

All Time: 2,244