Basic Information:
Printer Model: Custom
MCU / Printerboard:Octopus Pro
Host / SBC : Raspberry Pi
klippy.log :klippy (23).log (182.1 KB)
Describe your issue:Hello Everyone
I am trying to generate PLR file after sudden power loss and able to generate half file having initial instructions.But not able to generate the remaining file from where the print stopped.I followed this link https://github.com/The–Captain/plr-klipper and did the necessary changes.
I am attaching the script also.
SD_PATH=/home/4DS/printer_data/gcodes
TEMP_FILE=/tmp/plrtmpA.$$
# Load the saved variables
source /home/4DS/save_variables.cfg
# Process the input G-code file
cat "${SD_PATH}/${last_file}" > ${TEMP_FILE}
# Extract the layer height where print was interrupted
cat ${TEMP_FILE} | sed -e '1,/Z'${power_resume_z}'/ d' | sed -ne '/ Z/,$ p' | grep -m 1 ' Z' | sed -ne 's/.* Z\([^ ]*\)/SET_KINEMATIC_POSITION Z=\1/p' > ${SD_PATH}/plr.gcode
# Add G-code commands for resuming print
echo 'G91' >> ${SD_PATH}/plr.gcode
echo 'G1 Z5 F1500' >> ${SD_PATH}/plr.gcode
echo 'G90' >> ${SD_PATH}/plr.gcode
echo 'G28 X Y' >> ${SD_PATH}/plr.gcode
echo "M104 S${print_temp}" >> ${SD_PATH}/plr.gcode
echo 'M190 S50' >> ${SD_PATH}/plr.gcode
echo "M109 S${print_temp}" >> ${SD_PATH}/plr.gcode
echo 'G92 E0' >> ${SD_PATH}/plr.gcode
echo 'G91' >> ${SD_PATH}/plr.gcode
echo "G1 Z-5 F1500" >> ${SD_PATH}/plr.gcode
echo 'G90' >> ${SD_PATH}/plr.gcode
# Add the remaining G-code commands
cat ${TEMP_FILE} | sed -e '1,/ Z'${power_resume_z}'/ d' | sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode
# Clean up
rm ${TEMP_FILE}
I want help on this.