G-code reference

G84: Tapping cycle (right hand)

G84 is tapping cycle (right hand). Taps to depth, reverses the spindle and feeds out. It is modal, so it stays active on the following lines until another code from the same group replaces it.

What G84 does

G84 feeds a tap in with the spindle clockwise, reverses at the bottom and feeds out. The feed must match the pitch: feed per minute equals RPM times pitch. With rigid tapping (M29 on Fanuc) the spindle and feed are locked together; without it, a tension-compression holder takes up the difference.

TypeG-code
MachineMill
GroupCanned cycle
ModalYes: stays active until replaced by another code from the same group

G84 example

M29 S500
G84 X0. Y0. Z-15. R5. F625.

Rigid tap M8x1.25 at 500 RPM: 500 × 1.25 = 625 mm/min.

WordWhat it means here
M29Rigid tapping mode (Fanuc)
S500spindle speed, or a speed limit or surface speed with some codes
G84Tapping cycle (right hand)
X0.X axis target (on a lathe, the diameter)
Y0.Y axis target
Z-15.Z axis target or depth
R5.arc radius, or the R plane (retract height) in a drilling cycle, or a cycle setting
F625.feed rate (on threading codes, the lead)

Codes people confuse with G84

CodeWhat it does instead
G74 Left-hand tapping cycle. Taps a left-hand thread: spindle counterclockwise in, clockwise out.
G81 Drilling cycle (spot drill). Feeds to depth and rapids out: one move per hole.

Other codes in the canned cycle group

Only one code from a modal group is active at a time. Programming any of these replaces G84.

  • G73 High-speed peck drilling
  • G74 Left-hand tapping cycle
  • G76 Fine boring cycle
  • G80 Canned cycle cancel
  • G81 Drilling cycle (spot drill)
  • G82 Drilling cycle with dwell
  • G83 Deep hole peck drilling
  • G85 Boring cycle (feed out)
  • G86 Boring cycle (spindle stop, rapid out)
  • G89 Boring cycle with dwell (feed out)

Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.

Quick check: G84

  1. What does G84 do? (Mill)

  2. Which code: Taps to depth, reverses the spindle and feeds out.(Mill)

  3. What does G74 do? (Mill)

Show the answers
  1. Taps to depth, reverses the spindle and feeds out.
  2. G84
  3. Taps a left-hand thread: spindle counterclockwise in, clockwise out.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does G84 mean in CNC programming?
Tapping cycle (right hand). Taps to depth, reverses the spindle and feeds out.
Is G84 modal?
Yes. G84 belongs to the canned cycle group and stays active until another code from that group is programmed.
What is the difference between G84 and G74?
G84 (tapping cycle (right hand)): taps to depth, reverses the spindle and feeds out. G74 (left-hand tapping cycle): taps a left-hand thread: spindle counterclockwise in, clockwise out.
What is the difference between G84 and G81?
G84 (tapping cycle (right hand)): taps to depth, reverses the spindle and feeds out. G81 (drilling cycle (spot drill)): feeds to depth and rapids out: one move per hole.

G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.

Free preview · no card Try G-Code Sprint