3D printer G-code · Marlin and Klipper

G90: Absolute positioning (G90 / G91) (Marlin & Klipper)

Absolute positioning (G90 / G91) — G90 makes X, Y and Z coordinates absolute (from the zero point), G91 relative (from the current position). In Marlin G90 and G91 also switch E unless M82/M83 is used…

By cnccode · Updated
On this page
  1. What does G90 do?
  2. Example
  3. Tips from practice
  4. Related commands
  5. More motion commands
  6. Frequently asked questions
PropertyValue
CommandG90
FunctionAbsolute positioning (G90 / G91)
FirmwareMarlin and Klipper
GroupMotion
SyntaxG90 or G91

What does G90 do?

G90 makes X, Y and Z coordinates absolute (from the zero point), G91 relative (from the current position). In Marlin G90 and G91 also switch E unless M82/M83 is used after them; in Klipper too. Most slicers use G90 with M83 for relative extrusion.

Example

G-code
G91          ; relative
G1 Z10 F600  ; lift 10 mm
G90          ; back to absolute

Tips from practice

  • Always write G90 after a relative move in start or end code.
  • Send M83 after G90 if you want relative E, because G90 can switch E back to absolute.

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 motion commands

CommandFunctionFirmware
G1Linear move (G0 / G1)Marlin and Klipper
G2Arc move clockwise (G2 / G3)Marlin and Klipper
G4Dwell (pause)Marlin and Klipper
G28Home axesMarlin and Klipper

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 G90 do on a 3D printer?
G90 is absolute positioning (G90 / G91). G90 makes X, Y and Z coordinates absolute (from the zero point), G91 relative (from the current position). In Marlin G90 and G91 also switch E unless M82/M83 is used after them; in Klipper too. Most slicers use G90 with M83 for relative…
Does G90 work in Klipper and Marlin?
Yes, both firmwares understand G90.
Was this page helpful?