Printed from Kezuriba (kezuriba.net/en/nc/g99/)
G99
Machining center, LatheModal, group 10Canned cycle: return to R point
On machining centers
G99 G81 X_ Y_ Z_ R_ F_
- After drilling, stays at the R point height and moves to the next hole. Saves time if there are no obstacles
- If there is a clamp in the path, leaving G99 active causes a collision
Diagram: Height to move to the next hole after drilling
Full guide with examples: Canned cycles: how each one moves, how to choose, G98 vs G99
Try it in the simulator (machining center)
G81 repeats rapid to R → feed to Z → retract for each hole. G99 returns to the R point, G98 to the initial level.
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
On lathes: Feed per revolution (mm/rev) (G-code system A)
The same number means something different on lathes (FANUC-type G-code system A). Group 05.
G99 G01 Z_ F_ (F is in mm/rev)
- This is the normal cutting mode on lathes (all examples in the Mitsubishi lathe material and MHLW material use mm/rev)
Differences between controls and machines
The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.
| Source | Machine | Item | Detail |
|---|---|---|---|
| Haas | Lathe | Group | 10 |
| Siemens (ISO dialect) | Lathe | Meaning | In system B: R point return in drilling cycles. Feed per revolution is G95 |
Frequently asked questions about G99
- What is G99 (Canned cycle: return to R point) used for and how is it formatted in a CNC program?
- G99 commands "Canned cycle: return to R point" on Machining center, Lathe. The standard program format is "G99 G81 X_ Y_ Z_ R_ F_". After drilling, stays at the R point height and moves to the next hole. Saves time if there are no obstacles
- Is G99 a modal code or a one-shot (non-modal) code?
- G99 is a modal code (Group 10). 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 G99 work differently on machining centers (mills) versus CNC lathes?
- Yes. On a machining center G99 means "Canned cycle: return to R point", whereas on a CNC lathe (FANUC G-code System A) G99 means "Feed per revolution (mm/rev) (G-code system A)" (lathe format: "G99 G01 Z_ F_ (F is in mm/rev)"). Never copy G99 between mill and lathe programs without checking which G-code system (A, B, or C) your lathe uses.
- Are there differences in G99 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- Yes. Control builders such as FANUC, Mitsubishi Electric (M80/M800), Okuma (OSP), Haas, Mazak, Siemens (SINUMERIK ISO dialect), and Heidenhain can differ in argument letters, decimal-point rules, and optional parameters for G99. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.
- How do you avoid hitting clamps when using G99 (R-Point Return)?
- Use G99 across unobstructed holes on the same flat face, and switch to G98 on the hole immediately before a clamp or at the last hole of the pattern so Z retracts to the high initial clearance plane before moving XY.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- 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. — G-code, M-code, and Setting (per-code explanation pages) haascnc.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
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
- Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com
- Ministry of Health, Labour and Welfare (MHLW), Human Resources Development Bureau, Office of the Councillor for Skills Evaluation — Human resource development manual using the practical exam tasks of the Grade 3 Skilled Worker Test: CNC lathe work (March 2018) waza.mhlw.go.jp
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com