G54.APP

G-code deep dive

G90 vs G91: Absolute and Incremental Positioning

G90G91G90.1G91.1

G90 and G91 set the distance mode — how the control interprets every coordinate word that follows:

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
OperationLinuxCNCGRBLCentroidFANUCMach3Mach4Notes
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

Frequently asked questions

What does G90 mean in G-code?

G90 selects absolute distance mode: every X, Y, Z word is a destination measured from the active work zero. X10 means 'go to the position 10 from zero', no matter where the tool is now.

What does G91 mean in G-code?

G91 selects incremental (relative) mode: every coordinate is a move from the current position. X10 means 'move 10 further in X'. Running the same line twice moves twice.

Which mode do CAM programs use?

Almost always G90 absolute. Absolute programs are restartable — any line describes exactly where the tool should be, independent of history. Incremental mode is mainly used inside subprograms that repeat a pattern at multiple locations.

Do G90 and G91 affect arc centers (I, J, K)?

On most controls, no — I/J/K stay incremental from the arc start point even in G90. Controls that support G90.1 can switch arc centers to absolute independently of the main distance mode. The two settings are separate; confusing them is a classic source of arc errors.

See it, don't guess it

Paste a program into the free G54.APP viewer and watch these codes execute — toolpaths, stock removal, and machine state, live in your browser. Nothing is uploaded.

Open the G-code viewer