---
title: "M29 Rigid Tap Setup Code on Fanuc: The Line Before G84"
description: "M29 S___ arms rigid tapping mode on Fanuc controls: the spindle and Z axis lock into sync before G84 runs. What it changes, the sequence, and the failure."
url: https://gcodepractice.com/journal/m29-rigid-tap-fanuc-setup-code/
canonical: https://gcodepractice.com/journal/m29-rigid-tap-fanuc-setup-code/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-07
updated: 2026-06-07
category: "Practice"
tags: ["m29", "rigid tapping", "g84", "fanuc"]
lang: en
---

# M29 Rigid Tap Setup Code on Fanuc: The Line Before G84

> **TL;DR** On Fanuc-family controls, M29 S___ arms rigid tapping mode: from that block, the following G84 (or G74 reverse) cycle runs with the spindle rotation and Z feed locked in electronic sync, the spindle becomes a positioned axis, feed per revolution equals the thread pitch exactly, and the tap drives in and reverses out without a tension-compression holder making up the difference. The working sequence is M29 with the speed, then the cycle with feed matched to pitch times RPM. Forgetting the M29 runs a conventional tapping cycle instead, which with a rigid holder is how taps snap.

Tapping is the one milling operation where the tool and the feature negotiate directly: a [tap](https://en.wikipedia.org/wiki/Tap_and_die) cuts the thread it is simultaneously screwed into, so rotation and feed are not two parameters but one fact expressed twice. M29 is the Fanuc-family line that makes the control honor that fact electronically, and the single most useful thing to know about it is what its absence means: without M29, the same G84 runs as a different, older operation with different hardware assumptions, and the difference is measured in snapped taps.

## What rigid mode actually changes

In conventional tapping, the spindle free-runs at its commanded speed while Z feeds at a rate calculated to match, and the inevitable mismatch, spindle lag on start, decel at depth, is absorbed by a tension-compression holder that lets the tap float a few thousandths. It works, and it is why those holders exist.

Rigid tapping replaces the negotiation with a lock: after M29, the spindle becomes a positioned axis, its rotation and the Z feed servo-synchronized through the cycle, in and back out, with the reversal at depth coordinated by the control. Feed per revolution equals pitch, exactly, because the control enforces it rather than approximating it, the mechanism walked through with program examples at [Helman CNC's rigid tapping guide](https://www.helmancnc.com/cnc-rigid-tapping-m29/). The practical wins follow: rigid holders, deeper and faster tapping, peck tapping where the control supports it, and repeatable thread depth in blind holes.

## The sequence and the numbers

| Block | What it does | The numbers |
| --- | --- | --- |
| M29 S800 | Arms rigid mode at 800 RPM | The S here is the cycle's speed |
| G84 Z-15. R3. F1000 | The tapping cycle, synchronized | Feed-per-minute: F = RPM x pitch (800 x 1.25 = 1000 for M8x1.25) |
| Alternative with G95 | Same cycle, feed per revolution | F = the pitch itself: F1.25 |
| G80 | Cancel the cycle | Standard cycle hygiene |

The arithmetic is the one place to slow down: a feed that disagrees with pitch times RPM is asking the synchronized axes to fight, and the [feed-mode split](/journal/g-code-to-calculate-chip-load/), per-minute versus per-revolution, is the classic place the numbers silently diverge. The M29 placement rule, immediately before the cycle, per the control's documentation, is the other formality worth respecting; controls vary on what they tolerate between the two blocks.

## The failure modes, both directions

Forgotten M29 with a rigid holder is the textbook break: conventional mode's mismatch arrives with nothing to absorb it, the tap is pushed or stretched against its own thread, and small taps, already the fragile tools in the [hole-making family](/journal/g81-vs-g83-drilling-canned-cycles/), fail first. The reverse error, M29 with a tension-compression holder, is gentler: the holder's float fights the synchronization it was built to replace, threads come out acceptable, and the setup quietly wastes the rigidity it paid for. Both errors share a root: the program and the physical holder encode the same decision, and they have to agree, one more case of the [program-versus-reality checks](/journal/how-to-safely-restart-a-cnc-program-from-the-middle/) that no control can run for you.

Dialect honesty completes the picture: M29 is Fanuc-family convention, other controls spell the same physics differently, and the open-source reference point is [LinuxCNC's G33.1](https://linuxcnc.org/docs/html/gcode/g-code.html), spindle-synchronized tapping under its own code. The physics is universal; the arming word is dialect; the manual owns the spelling.

## The recall angle

M29 belongs to a small family of mode-arming codes whose entire danger is forgettability: one line, easy to omit, omission punished by hardware. Those are exactly the codes worth drilling to reflex rather than trusting to checklists, alongside the [G96/G50 lathe pair](/journal/spindle-speed-calculation-for-g97-lathe/), the [threading pullout toggles](/journal/lathe-threading-pullout-codes-m23-m24/), and the comp cancels, and the free 60-second rounds on the [G-code practice page](/g-code-practice/) keep the family automatic. A machinist who hears G84 and reflexively looks one line up for the M29 has converted this whole page into half a second of habit, which is where it belongs.

## Sources

- [Helman CNC: CNC rigid tapping with M29](https://www.helmancnc.com/cnc-rigid-tapping-m29/)
- [Wikipedia: Tap and die](https://en.wikipedia.org/wiki/Tap_and_die)
- [LinuxCNC: G-code reference](https://linuxcnc.org/docs/html/gcode/g-code.html)

## Frequently asked questions

### What does M29 do on a Fanuc control?

It arms rigid tapping mode: the next G84 or G74 cycle runs with spindle rotation and Z feed electronically synchronized, the spindle acting as a positioned axis. Feed per revolution equals pitch exactly, and the tap drives in and reverses out in sync.

### What is the correct M29 and G84 sequence?

M29 S(rpm), then the G84 block with feed matched to the thread: F = RPM x pitch in per-minute mode, or F = pitch in per-revolution mode. M29 immediately precedes the cycle per the control's rules.

### What happens if you forget the M29 before G84?

The control runs conventional tapping, which assumes a tension-compression holder to absorb the spindle-feed mismatch. With a rigid holder, nothing absorbs it, and taps break, small ones first.

### Is rigid tapping the same code on every control?

No: M29 is Fanuc-family convention; other controls use their own codes or parameters, with LinuxCNC's G33.1 the open-source example. The physics is universal, the arming code is dialect.

---

Source: https://gcodepractice.com/journal/m29-rigid-tap-fanuc-setup-code/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
