How do the E commands in G-code work, exactly?

  • I've tried looking online but haven't quite found the answer to what I'm confused about, exactly. Consider the following 3 lines of G-code:

    G1 X129.000 Y126.322 E7.90758

    G1 X128.349 Y125.707 F7800.000

    G1 X128.476 Y125.548 E7.92045 F1800.000

    Does the absence of an E command in the second line mean that no material is to be extruded from line 1 to line 2? As I understand it, the E parameter controls how much material has been extruded up to that line.

    The reason why I am asking is because I'm trying to understand on the code level how to identify when a printer will travel without extruding any material, in the case of moving in the Z direction, or if you are printing multiple disconnected parts in one print. Since none of the Z lines seem to have any E commands, I'm inclined to believe that the absence of an E command means that when moving to the given position from the previous line, no material will be extruded. I've tried quite a few different queries online to try to discover if this is the case, but haven't found a simple answer, so I was hoping someone on this board could enlighten me.

  • Yes, the absense of an EX.XXX (or an EX.XXX with the same value as the previous one) means nothing will be extruded during the move. The extruder is treated as an imaginary fourth axis and works exactly the same as any other axis: if in a G1/G0 no new coordinate for it is specified, it retains its original position.

    In that case, what is the point of a segment of code such as this? : G92 E0 G1 X55.571 Y120.585 F7800.000 G1 X55.571 Y103.100 F7800.000 G1 X55.571 Y96.900 F7800.000 G1 X55.571 Y79.415 F7800.000 G1 X63.907 Y77.129 F7800.000 G1 E1.00000 F2400.00000 Why would it make 5 movements without any extrusion?

    Sometimes you don't want a travel move to happen in a straight line. Generally, to avoid stringing, you want the majority of a move to happen "inside" a part, so that the smallest amount of the move is through free air. This means the shortest/best path from one point to another is not necessarily a straight line.

    Sorry - what is stringing? Is that like "oozing" or "leaking" kind of? I looked it up - gotcha. That makes more sense now. Thanks.

    If you want to move from one side of the print to the other, unless the current layer is convex, the straight line from one part to another might cross the boundary of the current layer being built. This results in stringing and blobs (extra material on the outside of a print) since a little material oozes out of the nozzle (even when you're not extruding). By following the contour of the part (and not moving in a straight line) you can prevent (or minimize) the distance traveled on the outside

    As a related question that I don't think warrants its own post, what is the significance of these 3 lines? `G92 E0 -- G1 X124.746 Y125.952 F7800.000 -- G1 E1.00000 F2400.00000` From what I understand, the first "resets" the counter for E. But what about the 3rd? Does this just extrude in place without moving? Seems a bit odd...Especially since an extrusion increment of 1.0000 is much greater than we'd tend to see in any other single line (skimming through the file I'm looking at, the highest seems to be ~0.3).

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used