Hello! I was about 17 hours into a long, 100+ hour print of a Mandalorian helmet, and after about 31.5 mm of printing, during a time I was not directly monitoring, the filament jammed (seems there was a bur or flared off piece on the incoming feed strand), and I did not catch it until the unit had “air printed” nothing for about a half an inch or so!
Is it possible to try to salvage such a job by restarting with edited gcode after a jammed extruder has been cleared?
How would I edit the gcode to have it start at 31.5 mm, both in its placement and at the corresponding point in the build?
Am I barking up the wrong tree and should just consider the prior printing a waste?
I’m finally attempting to do this, but currently using Cura.
I’m “replaying” the layer-by-layer printing process. Based on my calculations, the previous attempt printed well up through layer #134 (while my print settings were based on an initial layer height of 0.2 mm, and a layer height of 0.24 mm).
One step you mentioned in your write-up that I’m too new and too green to understand is how you discerned from that layer playback info, which line of gcode it was?
Quote: “The model was sliced using Simplify3D, but Cura has similar features to what I’m about to describe. Measured the height of printed perimeter with a micrometer, and found the corresponding layer in S3D.Then I located the exact line it was printing (at least within a few mm) by replaying that layer in the preview, line by line. The exact line was 93,066, as reported by S3D.”
Does Cura have a similar “as reported by” feature? If so, how do I access it?
OK, good news, the gcode actually has layer numbers in its remarks. The original gcode was rendered from Snapmaker’s Luban, so I guess that’s a built in thing. Now I’m stressing over how to follow the rest of your steps.
If someone should know… does the gcode (from Luban) mention of layer number refer to what just completed? Or to what is about to be started? Here’s an example of the remarks giving layer number:
I had already searched for all instances, and there is only once instance. I don’t yet know enough about gcode to discern up from down. I’m currently watching YouTube tutorials on Marlin gcode to try to get my bearings!
Here’s the passage in focus, starting with line #876808, and going through line #876850:
So, GCODE is executed in sequence. If as you say there is a layer comment for every layer, you’ll be able to search for ‘;LAYER:’ in your file.
If the code between the first and second occurrence looks like a layer but the code before the first occurrence doesn’t, the comment precedes the layer.
If however the code between the first and second occurrence looks like a layer and the code directly before the first occurrence also looks like a layer, then the comment is after the layer.
Similarly look at the last two occurrences and make your conclusions.
I’m guessing that the actual sequence is comment, then layer, but I don’t have a GCODE file in front of me to confirm that.
I’m pondering on what you wrote and realizing you were probably meaning all mentions of layer, not just that one. However, since I don’t yet know what the in between content for a layer would look like, I’m still a ways from being able to discern what is up there. Still working on learning gcode. More son.
S3D has a display like this, that I was using to see exactly where the nozzle was:
It looks like Cura maybe doesn’t have the exact line number displayed in the previews. You could put the code excerpt between layer 133 and 134 (or the entire file, will just take longer to load) into ncviewer.com and play the file line by line to find the equivalent line number by looking at the nozzle position.
Below is the code from the start of the file down past the first mention of a “Layer #” (Layer 0), and so based on my totally uneducated guess, it looks like the layer remark comes before a layer, not after.
I didn’t realise this prior, but it looks like viewing line numbers in the Cura previews is actually impossible based on how Cura currently renders previews:
I was a bit baffled by the bolded sentences in this paragraph, but then I read more on the Extruder “virtual axis” and I think I follow it now!
Copied the gcode file and modified it. First, went to the last good printed line, 93,066 and looked up the file. Found the previous G92 E0 command, and changed it to what the previous extrusion was on line 93,065, which was E115.7035, and deleted all of the gcode in between, so when the print starts it won’t extrude 115mm of filament.
So, in my planned deletion, I am not deleting the commands from layer 1 that turned the fan on and lowered the bed temp from 70 to 50 degrees. And if I use the start of layer 133 as the beginning of what all else I am leaving in, it seems to set extruder axis at E4233.57092 with its own “G92 E0” command soon after (see below). It also sets the Z at 32.12 mm. Does it sound like I’m on the right track?
Below is how the proposed new file would look, after my deletions, from the start of the file, through the beginning of layer 133, which is my best guess for where I need to restart the job.
This is nerve wracking for a newbie like me! LOL. Please let me know if anyone sees something glaring that I’m overlooking! I have something like 15-17 hours worth of print product I’m hoping to salvage.
; G-code for 3dp engraving
; Generated by Snapmaker Luban 3.10.2
; Wed Dec 02 2020 3:49:30
M82 ;absolute extrusion mode
;Start GCode begin
M104 S205
M140 S70
G28 ;home
G90 ;absolute positioning
G1 X-10 Y-10 F3000
G1 Z0 F1800
M109 S205;Wait for Hotend Temperature
M190 S70;Wait for Bed Temperature
G92 E0
G1 E20 F200
G92 E0
;Start GCode end
G92 E0
G1 F3600 E-5
;LAYER_COUNT:928 (which is 1062 - minus layers 0-133, a total of 134 layers)
;LAYER:0 – DELETED except for fan off command.
M107 ;fan off command
;LAYER:1
M140 S50 ;heat the bed to 50 degrees Celsius
M106 S255 ;fan on full, 100%