G90 and G91 set the distance mode — how the control interprets every
coordinate word that follows:
G90absolute: coordinates are positions relative to the active work zero (your G54–G59 offset).G1 X10goes to X=10.G91incremental: coordinates are deltas from wherever the tool is now.G1 X10moves by 10.
Both are modal and mutually exclusive; the active one governs all axis words until the other appears. The same four lines mean two different shapes depending on the mode:
; G90 absolute ; G91 incremental
G0 X10 Y10 ; → point (10,10) ; → 10 right, 10 up from current
G1 X20 ; → to X=20 (moves 10) ; → 20 further right
G1 Y0 ; → down to Y=0 ; → 0 = no move at all!
That last line is the story of the two modes in miniature: in absolute
mode Y0 is a real destination; in incremental mode it's a no-op.
#Why programs are posted in G90
An absolute program is restartable. If a cut stops on line 500, every line after it still describes a true position — jog clear, cycle-start from line 501, and the tool goes to the right place. An incremental program's meaning depends on flawless execution of every previous line; one skipped block shifts the entire rest of the part.
Incremental mode earns its keep inside repeated patterns: a subprogram
that drills one pocket in G91 can be called at ten locations, doing the
same relative dance at each. The pattern ends by restoring G90 — always.
G90 G0 X25 Y40 ; absolute: position at pocket 1
M98 P200 ; subprogram runs in G91 internally
G90 G0 X75 Y40 ; back to absolute for pocket 2
M98 P200
| Operation | LinuxCNC | GRBL | Centroid | FANUC | Mach3 | Mach4 | Notes |
|---|---|---|---|---|---|---|---|
| Absolute distance mode | G90 |
G90 |
G90 |
G90 |
G90 |
G90 |
|
| Incremental distance mode | G91 |
G91 |
G91 |
G91 |
G91 |
G91 |
|
| Absolute arc-center mode | G90.1 |
— | G90.1 |
— | G90.1 |
G90.1 |
I/J/K become absolute coordinates, not offsets. Centroid: varies by CNC12 version |
| Incremental arc-center mode (default) | G91.1 |
G91.1 |
G91.1 |
G91.1 |
G91.1 |
G91.1 |
— means the control has no equivalent code. Full cross-control tables: the complete G-code & M-code reference.
#G90.1 / G91.1 — the arc-center footnote
Distance mode covers axis words, but arc centers (I/J/K) have their
own setting on controls that support it: G91.1 (default — centers are
offsets from the arc start) and G90.1 (centers are absolute
coordinates). CAM posts set it explicitly when the control supports it;
hand-written code should leave it at the default. A program assuming one
convention and a control set to the other is the classic cause of "radius
mismatch" alarms on arcs that look perfect in the file.
#Common mistakes
- A stray G91 that never gets cancelled. The single most destructive
modal mistake in G-code: everything after it re-interprets as deltas, and
the "move to safe Z" at the top of the next operation becomes "move up a
little from wherever you are." Preambles state
G90for exactly this reason. - Assuming G91 in a subprogram restores itself. Modal state persists across subprogram returns on most controls. If a subprogram switches to G91, it must switch back — or the caller must.
- Testing an incremental file from the wrong start point. A G91 program is only correct from its intended start position. Simulate it and look at where the toolpath actually lands before trusting it.