3D printer G-code · Marlin and Klipper

M82: Absolute extrusion (M82 / M83) (Marlin & Klipper)

Absolute extrusion (M82 / M83) — M82 makes E values absolute: E is the total filament used since the last G92 E0. M83 makes them relative: every E is the length for that move only. Relative extrusion…

By cnccode · Updated
On this page
  1. What does M82 do?
  2. Example
  3. Tips from practice
  4. Related commands
  5. More extrusion commands
  6. Frequently asked questions
PropertyValue
CommandM82
FunctionAbsolute extrusion (M82 / M83)
FirmwareMarlin and Klipper
GroupExtrusion
SyntaxM82 or M83

What does M82 do?

M82 makes E values absolute: E is the total filament used since the last G92 E0. M83 makes them relative: every E is the length for that move only. Relative extrusion is easier to read and safer when lines are edited; Klipper and Bambu files usually use M83.

Example

G-code
M83            ; relative E
G1 X60 E9 F1000 ; 9 mm of filament for this move

Tips from practice

  • Do not mix: the slicer setting "use relative E distances" must match the M82/M83 in your start code.
  • The 3D printer simulator warns when E jumps by an impossible amount, the typical sign of a mix-up.

The command works in Marlin and Klipper. Options can differ: Klipper accepts fewer parameters for some M-codes and ignores codes it does not know with an "Unknown command" error.

More extrusion commands

CommandFunctionFirmware
G10Firmware retract (G10 / G11)Marlin and Klipper
G92Set position (G92 E0)Marlin and Klipper
M221Flow percentageMarlin and Klipper
M900Linear advance factorMarlin
SET_PRESSURE_ADVANCEPressure advance (Klipper)Klipper
SET_RETRACTIONChange firmware retractionKlipper

Test it before you print

Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.

Open the simulator

Frequently asked questions

What does M82 do on a 3D printer?
M82 is absolute extrusion (M82 / M83). M82 makes E values absolute: E is the total filament used since the last G92 E0. M83 makes them relative: every E is the length for that move only. Relative extrusion is easier to read and safer when lines are edited; Klipper and Bambu…
Does M82 work in Klipper and Marlin?
Yes, both firmwares understand M82.
Was this page helpful?