No Extrusion When Resuming Failed Print After Gcode Edit

I was trying to print some long working parts in PETG in a vertical orientation, and the print failed at 60%. However one of the parts on the plate was still printing well, so I thought I’d try to save it.

I managed to resume the object that failed at the right coordinates, but ran into another problem; no filament was being extruded. Detailed steps below.

I edited the gcode as described by this video that was linked in a different thread on the topic:

First I went back to the project in Bambu Lab and deleted the objects that failed from the plate, being careful not to re-arrange the plate or move the object I wanted to save. Then, I sliced the plate, used the slider on the right to find the Z height of the layer I needed to resume at, and exported the slice file. I unzipped the exported 3mf and found the “plate_1.gcode” file in the metadata folder, which I opened in notepad for editing.

Per the above video (and others on the topic) I deleted all lines between what configs looked necessary and the layer height I was trying to resume at (Z77.48). The splice looks like this:

-unedited config section-
===== prepare print temperature and material end =====

G28 XY
Z77.48
-resume of unedited gcode at desired layer height-

I loaded the gcode file onto the SD card, put the card in the printer and told it to print from said file.

Everything went OK at first. The printhead moved to the correct location on the print and appeared to be moving properly. I thought I was successful until I noticed that no filament was being extruded. I can’t figure out what went wrong, but I’d really like to.

I assume I deleted more of the config section than I should have, perhaps the section that tells the extruder how to function, but I can’t figure out what I should’ve left in. When I tried leaving all of the config section in place except the bed leveling code, the printhead crashed into the print and I quickly threw the power switch, but with the splice as shown above everything went great except the extruder wasn’t pushing filament (and the printhead temp wasn’t correct). I feel like I’m really close to figuring this out, but I don’t know enough about manual gcode editing to know what the problem is.

Can anyone tell me what I’m missing?

1 Like

It would be interesting to see what gcode you have cut out before the start of the layer 0 printing and what lines are still there. As I think only a few of the pre layer 0 gcode lines will still be required - but they may well be mixed in with lines that need to be removed.

Then obviously you will have needed to cut out all of the layer 0 to the layer you want the print to resume at lines of gcode.

Even if you can get the extruder to work I think it will be tricky to get this technique to work reliably on a Bambu due to all of the auto z offset and bed levelling stuff that it won’t be able to do if there is a print already on the bed and the power has been off.

I guess measuring with the print head would help - but that would be tricky with a corexy - and may require the lid to be off the top to avoid the print hitting it.

This is what was cut before the start of layer 0:

-unedited config section-
;===== prepare print temperature and material end =====

-CUT BEGINS HERE-

;===== wipe nozzle ===============================
M1002 gcode_claim_action : 14
M975 S1
M106 S255
G1 X65 Y230 F18000
G1 Y264 F6000
M109 S205
G1 X100 F18000 ; first wipe mouth

G0 X135 Y253 F20000 ; move to exposed steel surface edge
G28 Z P0 T300; home z with low precision,permit 300deg temperature
G29.2 S0 ; turn off ABL
G0 Z5 F20000

G1 X60 Y265
G92 E0
G1 E-0.5 F300 ; retrack more
M73 P2 R171
G1 X100 F5000; second wipe mouth
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X90 F5000
G0 X128 Y261 Z-1.5 F20000 ; move to exposed steel surface and stop the nozzle
M104 S140 ; set temp down to heatbed acceptable
M106 S255 ; turn on fan (G28 has turn off fan)

M221 S; push soft endstop status
M221 Z0 ;turn off Z axis endstop
G0 Z0.5 F20000
G0 X125 Y259.5 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y262.5
G0 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y260.0
G0 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y262.0
G0 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y260.5
G0 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y261.5
G0 Z-1.01
G0 X131 F211
G0 X124
G0 Z0.5 F20000
G0 X125 Y261.0
G0 Z-1.01
G0 X131 F211
G0 X124
G0 X128
G2 I0.5 J0 F300
G2 I0.5 J0 F300
G2 I0.5 J0 F300
G2 I0.5 J0 F300

M109 S140 ; wait nozzle temp down to heatbed acceptable
G2 I0.5 J0 F3000
G2 I0.5 J0 F3000
G2 I0.5 J0 F3000
G2 I0.5 J0 F3000

M221 R; pop softend status
G1 Z10 F1200
M400
G1 Z10
G1 F30000
G1 X230 Y15
G29.2 S1 ; turn on ABL
;G28 ; home again after hard wipe mouth
M106 S0 ; turn off fan , too noisy
;===== wipe nozzle end ================================

;===== bed leveling ==================================
M1002 judge_flag g29_before_print_flag
M622 J1

M1002 gcode_claim_action : 1
G29 A X78.2961 Y78.3147 I99.4077 J99.3706
M400
M500 ; save cali data

M623
;===== bed leveling end ================================

;===== home after wipe mouth============================
M1002 judge_flag g29_before_print_flag
M622 J0

M1002 gcode_claim_action : 13
G28

M623
;===== home after wipe mouth end =======================

M975 S1 ; turn on vibration supression

;=============turn on fans to prevent PLA jamming=================

M106 P2 S100 ; turn on big fan ,to cool down toolhead

M104 S225 ; set extrude temp earlier, to reduce wait time

;===== mech mode fast check============================
G1 X128 Y128 Z10 F20000
M400 P200
M970.3 Q1 A7 B30 C80 H15 K0
M974 Q1 S2 P0

G1 X128 Y128 Z10 F20000
M400 P200
M970.3 Q0 A7 B30 C90 Q0 H15 K0
M974 Q0 S2 P0

M975 S1
G1 F30000
G1 X230 Y15
G28 X ; re-home XY
;===== fmech mode fast check============================

;===== noozle load line ===============================
M975 S1
G90
M83
T1000
G1 X18.0 Y1.0 Z0.8 F18000;Move to start position
M109 S225
G1 Z0.2
G0 E2 F300
G0 X240 E15 F6033.27
G0 Y11 E0.700 F1508.32
G0 X239.5
G0 E0.2
G0 Y1.5 E0.700
G0 X18 E15 F6033.27
M400

;===== for Textured PEI Plate , lower the nozzle as the nozzle was touching topmost of the texture when homing ==
;curr_bed_type=Textured PEI Plate

G29.1 Z-0.04 ; for Textured PEI Plate

;========turn off light and wait extrude temperature =============
M1002 gcode_claim_action : 0
M106 S0 ; turn off fan
M106 P2 S0 ; turn off big fan
M106 P3 S0 ; turn off chamber fan

M975 S1 ; turn on mech mode supression
G90
G21
M83 ; use relative distances for extrusion
; filament start gcode
M106 P3 S255
M981 S1 P20000 ;open spaghetti detector
; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G1 E-1.8 F3000
; layer num/total_layer_count: 1/1250
M622.1 S1 ; for prev firware, default turned on
M1002 judge_flag timelapse_record_flag
M622 J1
; timelapse without wipe tower
M971 S11 C10 O0

M623
; update layer progress
M73 L1
M991 S0 P0 ;notify layer change
M106 S0
M106 P2 S0
M204 S500
; start printing object, unique label id: 736
M624 AQAAAAAAAAA=

-layer 0 start-

I deleted all of the above (after the marked “CUT STARTS HERE”), plus everything from layer 0 to the z height I wanted to resume at (Z77.48), and I purposely added G28 XY for home XY (but NOT Z) between the config section and the target start per the instructions of several walkthroughs on the topic. The result was the splice in the OP.

As I said in the initial post, I think I got the edit right with regard to coordinates, as the printhead moved exactly to where I wanted it on the model and started moving as though the print had resumed, but the extruder wasn’t working.

My best guess would be that I need to leave the “nozzle load line” section from the deleted block in place, but I think it needs to be modified to avoid homing the Z axis. That’s just a guess though.

I think that maybe when the printer gets to your layers all axis (including the extruder) might be set to absolute - as I think that probably the M83’s to set the extruder to relative (after a G90 to set everything to absolute) are probably all in the deleted section.

PS/ Also I think you can do file/export to GCODE - rather than having to unzip the 3mf.

If this works out as being correct - I think it would be quite interesting to write a little post processing script that does the ‘deleting’ automatically - it could maybe look for a manual pause at the layer that to printer is to resume at, and do the deleting of the sections you mentioned, plus adding in of the G28 XY and M83 if I am correct.

1 Like

Completely new to this forum and this is the only way I could find a way to ask my question was to respond to an existing topic so please forgive me.

I need to know if there is a way to remove lines of gcode prior to sending to the printer. I have this bizarre mid-air extrusion resulting from placing paint on supports. I continue to mess around with support placement but I cannot place the needed support without this unwanted extrusion appearing. Thank you in advance!!

You should have a New Topic button on you screen somewhere when you are in the forum list for example.

On the right hand side where the ‘print plate’ button is - there is a drop down - you can change the option to ‘export plate sliced file’. - this will export a 3mf file - which if you rename it to a zip file you should find the generated GCODE inside it. You should be able to get the GCode to the printer on an SD card.

Or slightly easier on the file menu, there is export, then export G-code, which again I think you would have to get to the printer on an SD card.

1 Like

ever get this resolved? I have the same exact issue, was able to resume the print where i left off but nothing is coming out of the extruder, also noticed nozzle temp was around 140c instead of the normal for PLA

Welcome to the forum.

A 140c nozzle temp isn’t high enough to extrude PLA. This is where I would look first.

Thanks i did end up finding a way to increase it to 200, but still wasńt able to extrude anything