Klipper stopped print without any error during printing of edited gcode for power loss recovery

Basic Information:

Printer Model: Custom made
MCU / Printerboard:SKR PICO
klippy (2).log (1.5 MB)
printer (1).cfg (2.9 KB)

I’ve lost power during a 16h print so i followed a guide and measured the height then deleted lines from homing to the layer last printed and printed the gcode.
I don’t have clearance for xyz homing but i can home it separately so i did like that.
It seems that the printer is trying to do first instruction and then automatically stops the print.
What is the problem here is it associated with homing?. how could i avoid the error?.
Any special gcodes?.
Thank you for any help to resume the print.

Hello @anands9288 !

Can you also share the mentioned gcode file (zipped).

Here is the gcode that i edited Gdrive gcode file
I have also tested
[force_move]
enable_force_move: True
with SET_KINEMATIC_POSITION X=0 Y=200 Z=100.
still it instantly stops.

Can you pleas upload the zipped file here. I can’t do google drive.

Here it is.

CFFFP_skull_art_big.zip (4.15 MB)

I’ve added homing xy and then z to the gcode then set force_move with set kinematic position.
This time I’ve got the error on terminal.
!! Move exceeds maximum extrusion (1741.756mm^2 vs 2.000mm^2)

This is because you use absolute extrusion.

...
G1 F3600 X63.785 Y61.226 E923.74492
G1 X63.894 Y61.377 E923.75119
G1 X65.142 Y60.665 E923.79958
...

When you want to recover a print, you always have to use relative extrusion. When you start at the “issue-point”, Klipper does not know how much filament already has been printed.

1 Like

I’ve created a python code using chatgpt to offset all extruder values from 0.

import re

subtraction_value = 923.74492

# Open the input and output files
with open("CFFFP_skull_art_big.gcode", "r") as input_file, open("output.gcode", "w") as output_file:
    # Iterate over the lines in the input file
    for line in input_file:
        # Check if the line starts with "G1"
        if line.startswith("G1"):
            # Use regular expression to extract the E parameter
            match = re.search(r"E([0-9\.]+)", line)
            if match:
                # Get the value of the E parameter
                e_value = float(match.group(1))
                # Subtract 100mm from the E parameter
                e_value -= subtraction_value
                # Replace the E parameter in the line with the new value
                line = re.sub(r"E[0-9\.]+", "E{:.4f}".format(e_value), line)
        # Write the line to the output file
        output_file.write(line)

still I’ve got the error.
After that i’ve created a new gcode using cura by just putting -ve height at z position and used SET_KINEMATIC_POSITION.
it worked but it’s a lot of work a better solution would be great how do i convert it for relative positioning?.

Try issuing a M82 before starting your recovery print or add it in the respective location of the gcode file.