Definition

If the current X position is 30, then X10 under G90 moves to X10, while X10 under G91 moves to X40. The same text produces a different path because the controller carries modal state from previous lines.

Printer G-code has more than one relevant state. G90/G91 controls motion axes, M82/M83 can override E, and G90.1/G91.1 may control whether arc-center words are absolute coordinates or offsets. Robust analysis also applies the firmware's interaction rule: Marlin clears an earlier M82/M83 override on G90/G91, while Klipper preserves its separate override.

What matters in practice

Modal

The selected mode persists until another command changes it.

Macros need hygiene

Temporary mode changes should restore the caller's state before a macro ends.

G92 changes the frame

Relabeling the current position changes later absolute targets without physically moving the machine.

Example in G-code

Same word, different endpoint

; start at X30
G90
G1 X10 ; ends at X10
G91
G1 X10 ; ends at X20

The first X10 is a coordinate; the second is a +10 move from the new current point.

What this viewer can show

In this viewer

Before drawing the file, the viewer converts its units, coordinate modes, extrusion mode, arc-center mode, and G92 offsets into one consistent coordinate system.

Primary sources

This explanation uses firmware documentation and details visible in G-code. Your printer's settings still determine what the machine does.