How is the extrusion rate matched to the movement speed? A typical line of (depositing) G-code seems to set a maximum speed (F), a new position to move to (X, Y, Z) and a new extrusion distance (giving a filament distance for the move). The F is common for the line of code, and I understand gives a maximum for the XYZE combined speed.
My question is: &quot;How is the extrusion rate synchronised to the movement distance and speed?&quot;
The G-code doesn't seem to have enough information to deal with this, but I've tried looking at a Marlin configuration file and don't see anything obvious there.
To take a really basic example: A 30 mm long single filament, layer height 0.2 mm and width 0.4 mm. A basic slicer will assume 0.2x0.4x30 mm³ total volume, but for each mm of travel you want 0.2x0.4x1 mm³ to be extruded. How is it ensured that this happens regardless of travel speed, without say more being extruded in the first half of travel than the second or vice versa?
It feels like this is dealt with somewhere in the firmware but I don't know where to look. A 'worked' example for a desktop printer or as much detail as you dare would be absolutely perfect. If it helps, I am generally using either an ANet A8 or Ultimaker 3 with the CURA slicer using Marlin-based firmware.
I'm not sure what you mean by &quot;XYZE combined speed&quot;, but I wonder if it's the same misconception as in Details of Marlin&#39;s feedrate calculation. The feedrate is a regular 3-dimensional velocity in XYZ space which is the maximum rate the printer will attempt to achieve, subject to individual axis feedrate limits (including E) and acceleration profiles.
In any case, the simple answer your question of how the E-axis motion is synchronized with motion in space is no different from how motion along the X-axis is synchronized with motion along the Y-axis. If X and Y motion were just allowed to take place independently up to the desired speed, with no constraint that they happen in step with one another, then the path the print head traveled would not be a straight line but (ideally) the junction of one horizontal or vertical line with one diagonal one or (with acceleration profiles applied) some approximation of that by curves. But of course the X and Y motions do take place in sync with one another. Each spatial coordinate during the move is a function of time computed by the &quot;planner&quot; logic in the printer firmware based (essentially) on the ratio of the magnitude of individual components of the move to the overall length of the move and speed.
In traditional firmware prior to Linear Advance, the E axis is synchronized exactly the same, according to the ratio of the move completed to the whole and the total amount to be extruded. With Linear Advance, that's adjusted by an offset proportional to the current baseline (before applying LA) extrusion speed, to compensate for the filament being compressible and/or its travel path (e.g. a bowden tube) being elastic.