Printed from Kezuriba (kezuriba.net/en/nc/g91/)
G91
Machining centerModal, group 03Incremental command
Format and notes
G91 G01 X_ Y_ F_
- Coordinates are written as travel from the current position. The same G91 X20. reaches a different end point if the start point differs
- Accidents often happen when G91 is carried into the next operation. Explicitly write G90 at the start of each operation
Diagram: Writing the same move in absolute (G90) and incremental (G91)
Full guide with examples: Machining center programming basics (practise G54, G43 and G41 in a simulator)
Try it in the simulator (machining center)
G90 gives positions from the origin (absolute); G91 gives moves from the current position (incremental). The three G91 lines move 20 mm each.
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
On lathes: (Not used in system A. Incremental values are written with U/W)
- Siemens ISO T: in system A, G91 cannot be used, and incremental X/Z is commanded with U/W. In systems B/C, G90/G91 are absolute/incremental
Frequently asked questions about G91
- What is G91 (Incremental command) used for and how is it formatted in a CNC program?
- G91 commands "Incremental command" on Machining center. The standard program format is "G91 G01 X_ Y_ F_". Coordinates are written as travel from the current position. The same G91 X20. reaches a different end point if the start point differs
- Is G91 a modal code or a one-shot (non-modal) code?
- G91 is a modal code (Group 03). Once commanded, it remains active across subsequent blocks until another code from the same modal group overrides it or the control is reset. Always state or cancel modal states explicitly in your safety block and at the end of a tool operation so residual modes do not cause unexpected motion when restarting mid-program.
- Does G91 work differently on machining centers (mills) versus CNC lathes?
- G91 is primarily used on Machining center. Depending on the machine type and the lathe G-code system (System A, B, or C), this code may be unavailable or assigned to a different function, so verify against your machine tool manual.
- Are there differences in G91 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- While the core behavior of G91 is shared across most ISO-compatible CNC controls (FANUC, Mitsubishi Electric, Haas), controls using native conversational or proprietary dialects (such as Okuma OSP, Siemens native mode, or Heidenhain) or machine-specific M-code tables may use different syntax. Always verify with single-block execution and distance-to-go display on a new machine.
- What happens if you forget to switch back from G91 to G90?
- Because G91 is modal (Group 03), leaving G91 active after a move like G91 G28 Z0. causes subsequent X/Y/Z coordinates to be executed as incremental shifts rather than work-coordinate positions, risking overtravel alarms or crashes. Always command G90 immediately after completing an incremental sequence.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com
- Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com