G-code reference
G84 G-Code: Tapping Cycle (Right-Hand)
Tapping Cycle (Right-Hand) — Right-hand tapping: feed in with the spindle forward, reverse at the bottom, feed out. With M29 (Fanuc) or rigid-tap settings, spindle and Z are synchronised.
| Property | Value |
|---|---|
| Code | G84 |
| Function | Tapping Cycle (Right-Hand) |
| Modal group | 09 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G84 X_ Y_ Z_ R_ F_ |
What does G84 do?
Right-hand tapping: feed in with the spindle forward, reverse at the bottom, feed out. With M29 (Fanuc) or rigid-tap settings, spindle and Z are synchronised.
G84 is modal: once programmed it remains in effect for the following blocks until another code from modal group 09 replaces it or the control is reset.
Syntax and parameters
G84 X_ Y_ Z_ R_ F_| Address | Meaning |
|---|---|
F | G94: RPM × pitch; G95: pitch |
R | Start plane (≥ 3 pitches above the part) |
G84 example program
(M8x1.25 rigid tap at 500 RPM)
M29 S500
G98 G84 X0 Y0 Z-16.0 R5.0 F625.
G80▶ Open this example in the G-code viewer
Tips and common mistakes
- Feed must equal RPM × pitch exactly, or the thread is stripped or the tap breaks.
- Use our Tap Drill calculator for the drill size.
- Spindle override has no effect during rigid tapping.
Controller compatibility
G84 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G74 — Left-Hand Tapping (Mill) / Face Peck Drilling (Lathe)
- M29 — Rigid Tapping Mode (Fanuc)
- G80 — Cancel Canned Cycle