Power fail and resume testing fails

  • Okay so first attempt at using power restore not very successful.

    My kossel XL runs from a 120w laptop supply so not huge, but the bed and chamber heater are 240v. As it doesn't have particularly large capacitors I added a 10000uf 63v electrolytic can, in parallel with the PSU. During printing my Vin never drops below 23.9v even with hotend heater on full PWM.

    My powerfail.g, powerrestore.g, and resurrect-prologue.g are the default suggestions from the wiki https://duet3d.com/wiki/Setting_up_to_resume_a_print_after_a_power_failure.

    My config.g has

    M911 S17.0:23.6:23.7

    near the top.

    I started a print, a small cube. After the first 4-5 layers I hit the RSD test button to kill the 240v. No head movement or retract, nozzle still in contact with the print.
    Then powered back up. Ressurect.g was written and seemed correct it looked like this:

    ; File "0:/gcodes/Large Kossel_kostka20x20.gcode" resume print after auto-pause at 2017-10-06 14:59
    M141 S80.0
    G10 P99 S-273 R-273
    G10 P0 S240 R-273
    T0 P0
    G29 S1
    M98 Presurrect-prologue.g
    M106 P0 S0.88
    M106 P3 S0.00
    M106 P4 S0.00
    M106 P5 S0.00
    M106 P6 S0.00
    M106 P7 S0.00
    M106 P8 S0.00
    M106 S224.40
    M290 S0.000
    M23 0:/gcodes/Large Kossel_kostka20x20.gcode
    M26 S33360
    G92 E0.00000
    G0 F1200 Z4.700
    G0 F6000 X8.64 Y-8.64
    G0 F1200 Z2.700
    G1 F3600.0 P0

    I downloaded it and uploaded it as a gcode file to print (be nice to have a way of just clicking "resume" but I suppose that's a small change).
    The chamber heater came on, the nozzle heated back up, it homed, the bed heater did not turn back on, then the head slowly descended and began printing around 5mm to the right of where the cube was sat on the bed.


    1. Why did the bed heater not turn back on?
    2. I think I know why the nozzle did not reposition correctly - because my delta parameters in config_override.g and those used during the current print may not always be concurrent, as I run a delta autocalibration before each print and I do not always copy the values back or do an m500 routinely. But figuring that would be an issue during this process I re-enabled m500 at the end of bed.g to ensure the delta parameters are saved (I usually leave this commented out, in case of a probing issue giving me a poor calibration, and then autosaving it compounding the error for next time). However this was just after the print began (but before bed.g executed).
    3. I presume I just don't have enough surplus power in the event of a full mains power disconnection to get the head movement and retract - would a bigger capacitor help?

  • administrators

    Thanks for trying this out.

    1. Thanks to your report I spotted a bug in the code, whereby if you have a chamber heater configured, the bed temperature settings are not written to file. Will be fixed in next beta.

    2. Are you sure you did an auto calibration before the print? If you did, then the M665 and M666 settings should have been written to the resurrect.g file too. I presume you homed the printer, either after turning it on again or in resurrect-prologue.g.

    3. Yes a bigger capacitor would help. However, before the 1.20 release is finalised, I intend to terminate the print in 'panic mode' when power is lost, rather than trying to finish at least the current move as the code does now. So it will stop the existing move immediately (possibly resulting in skipped steps) and try to execute powerfail.g immediately. The complicated bit is restarting from the middle of the interrupted move.

  • I definitely did an autocalibration, but I'm logging now so I will check. Yes I homed in resurrect-prologue.

    The changes in 3. sound great, I the meantime I'm going to go scavenging for large capacitors.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.