What M82 / M83 means

With M82 active, successive extrusion moves normally use an increasing E position, such as E1.2 then E2.4. A retraction is expressed as a lower target. Slicers often insert G92 E0 to reset the absolute counter before it becomes very large.

With M83 active, each E word is a change from the current extruder position: E1.2 pushes 1.2 mm and E-0.8 retracts 0.8 mm. Relative extrusion is convenient in hand-written macros because the amount does not depend on the previous absolute E value, but the macro should preserve or restore the caller's state.

Syntax and parameters

M82 ; absolute extrusion
M83 ; relative extrusion
No parameters

Each command switches how subsequent E values are interpreted.

Practical examples

Absolute extrusion

M82
G92 E0
G1 X20 E1.2
G1 X40 E2.4

Each move ends at a cumulative E position; both moves extrude 1.2 mm.

Relative extrusion

M83
G1 X20 E1.2
G1 X40 E1.2

Each line requests another 1.2 mm of filament.

Firmware context

SystemStatusWhat changes
MarlinCommonM82/M83 override E until a later G90 or G91 clears the override.
KlipperCommonSupported as a separate extrusion override; macro authors should save and restore G-code state.
RepRapFirmwareCommonSupported, with tool-drive details depending on machine configuration.
CNC controllersNot applicableE-axis extrusion modes are specific to additive-manufacturing dialects.

What this viewer can show

Mode-aware extrusion analysis

The viewer tracks M82/M83 plus G92 E resets so it can separate deposited filament, retractions and travel moves before rendering.

Common mistakes

  • A file interpreted in the wrong E mode can appear to extrude or retract enormous amounts.
  • Track both states plus the target firmware's reset rule; treating them as permanently independent is wrong for Marlin.
  • A macro that changes extrusion mode should restore the caller's original mode before returning.

Primary sources

This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.