G1 E code values

While I’m looking at the gcode created by both Luban and Cura for the same file with the same settings, I’m noticing some very high E values in the G1 codes.

For example, in Luban the skirt starts at a relatively small value
G1 F1080 X73.72 Y77.569 E0.09465

which Cura has a little lower, but that’s fine.
G1 F1080 X73.549 Y77.714 E0.02989

But towards the end of the print, both have much larger E values.

Luban
G1 F1500 X79.292 Y83.624 E9643.71018

Cura
G1 X79.292 Y174.673 E406.08273

Now according to https://snapmaker.github.io/Documentation/gcode/G000-G001,
the E value described as
"
G1 F1500 ; set the feedrate to 1500mm/minute
G92 E0
G1 X50 Y25.3 E22.4 ; move while extruding

In the above example the feedrate is set to 1500mm/minute, then the tool is moved 50mm on the X axis and 25.3mm on the Y axis while extruding 22.4mm of filament between the two points.
"

So according to this, Luban is telling it to extrude 9,643.7 mm of filament on it’s extrude, while Cura is telling it to extrude 406.08 mm of filament. There is no way this can be correct, that’s way to much for the small print (5 inch cylinder) that I’m printing.

Here’s the question: Is the documentation incorrect in describing it as extruding “22.4mm of filament” in the example? Should this actually be the number of steps the extruder motor should step?

Thanks,

gwfami

Here’s what the Marlin site has to say about the E parameter:

“An absolute or relative coordinate on the E (extruder) axis (in current units). The E axis describes the position of the filament in terms of input to the extruder feeder.”

If the E value is absolute, then each value would be cumulative with the ones before it. Checking a random gcode file generated by Luban seems to bear me out: each G1 command has a larger value of E than the one before it. So to get the amount actually extruded by a G1 command near the end of the file, take its E value and subtract the E value of the last G1 command before it.

Or, to put it another way, the Snapmaker documentation is incomplete, but not, strictly speaking, incorrect.

1 Like