Printed from Kezuriba (kezuriba.net/en/nc/g84/)
G84
Machining center, LatheModal, group 09 (lathe 10)Tapping cycle (right-hand thread)
Format and notes
G84 X_ Y_ Z_ R_ P_ F_ K_
- Cuts in with the spindle forward and reverses at the hole bottom to withdraw
- Feed is spindle speed × pitch (feed per minute). Example: M10×1.5 at 500 min⁻¹ gives F750
- How to choose between a floating tap holder (compensating chuck) and rigid (synchronized) tapping differs by machine. On FANUC-type controls, commanding M29 S_ before G84 is common (see M29)
- Feed override is disabled during tapping (Siemens ISO)
Diagram: G84 motion (side view)
Full guide with examples: Canned cycles: how each one moves, how to choose, G98 vs G99
Try it in the simulator (machining center)
G84 is tapping. Feed F must equal pitch × rpm (1.25 × 400 = 500). Change F to see the warning (this demo skips the pilot hole).
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
On lathes: Face tapping cycle (lathe with live tooling)
On lathes (FANUC-type G-code system A) the code does the same job. Group 10.
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 | Machining center | Notes | No M03/M04 is needed before G84 (the cycle starts and stops the spindle), and M29 is not used eitherOn Haas, S can be written on the G84 line, and J specifies the retract speed multiplier |
| Haas | Lathe | Group | 09 |
Frequently asked questions about G84
- What is G84 (Tapping cycle (right-hand thread)) used for and how is it formatted in a CNC program?
- G84 commands "Tapping cycle (right-hand thread)" on Machining center, Lathe. The standard program format is "G84 X_ Y_ Z_ R_ P_ F_ K_". Cuts in with the spindle forward and reverses at the hole bottom to withdraw
- Is G84 a modal code or a one-shot (non-modal) code?
- G84 is a modal code (Group 09). 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 G84 work differently on machining centers (mills) versus CNC lathes?
- On both machining centers and CNC lathes (G-code System A), G84 performs the same function ("Tapping cycle (right-hand thread)"). However, valid axis addresses (such as X/Y/Z versus diameter/incremental U/W) and parameter numbers can still differ between mill and lathe controls.
- Are there differences in G84 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 G84. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.
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
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
- Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com