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.

By cnccode · Updated
PropertyValue
CodeG84
FunctionTapping Cycle (Right-Hand)
Modal group09
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG84 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

Format
G84 X_ Y_ Z_ R_ F_
AddressMeaning
FG94: RPM × pitch; G95: pitch
RStart plane (≥ 3 pitches above the part)

G84 example program

Example
(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.

Frequently asked questions

Is G84 modal?
Yes. G84 belongs to modal group 09 and stays active until another code of that group is programmed.
What does G84 mean in CNC?
G84 means 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.
What is the difference between G84 and G74?
G84 is Tapping Cycle (Right-Hand), while G74 is Left-Hand Tapping (Mill) / Face Peck Drilling (Lathe). See the G74 page for its syntax and examples.
Can I use G84 on a lathe?
Usually not with the same meaning: G84 is documented here for milling machines. Check your control manual for the equivalent.