What G90 / G91 means
Under G90, X10 means move to coordinate X10 in the active work frame. Under G91, the same word means move 10 units from the current X position. Because the commands are modal, one forgotten G91 can shift every later move rather than only the next line.
Extrusion needs firmware-aware state. On Marlin, G90 or G91 clears an earlier M82/M83 override, after which E follows the selected position mode until M82 or M83 overrides it again. Klipper keeps an extrusion override separately, while still treating E as relative whenever G91 is active. CNC dialects may also separate arc-center mode through G90.1/G91.1.
Syntax and parameters
G90 ; absolute axis positioningG91 ; relative axis positioningNo parametersEach command changes the modal distance mode for later axis words.
Practical examples
Absolute square corner
G90
G1 X20 Y20
G1 X40 Y20The second endpoint is X40 Y20 regardless of the first move's distance.
Temporary relative Z lift
G91
G0 Z5
G90Raises Z by 5 units, then immediately restores absolute mode.
Firmware context
| System | Status | What changes |
|---|---|---|
| Marlin | Common | Changes the XYZ mode and clears an earlier M82/M83 override; a later M82 or M83 can override E again. |
| Klipper | Common | Changes the coordinate mode while preserving its separate extruder-mode override. |
| RepRapFirmware | Common | Supported, with macro state management important when switching modes. |
| CNC controllers | Common | Standard distance modes; work offsets and canned cycles add more modal context. |
What this viewer can show
The viewer tracks G90/G91 and converts later moves into absolute millimeter coordinates before rendering and measuring them.
Common mistakes
- Restore the intended mode after a temporary relative move in a macro.
- Do not assume every firmware preserves M82/M83 across G90 or G91; Marlin explicitly clears the earlier override.
- G90.1/G91.1 usually concerns arc centers, not the motion endpoint mode described here.
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.