M-code reference

M29: Rigid tapping mode (Fanuc)

M29 is rigid tapping mode (Fanuc). Locks spindle rotation to the feed for the next tapping cycle. It is non-modal, so it acts only on the line it is written on.

What M29 does

On Fanuc and many Fanuc-style controls, M29 with an S word before G84 switches to rigid tapping, where the spindle is synchronised with the Z axis. Other controls use a parameter or a different code, so it is machine specific.

TypeM-code
MachineMill and lathe
GroupSpindle
ModalNo: acts only on its own line

M29 example

M29 S500

Prepare rigid tapping at 500 RPM.

WordWhat it means here
M29Rigid tapping mode (Fanuc)
S500spindle speed, or a speed limit or surface speed with some codes

Codes people confuse with M29

CodeWhat it does instead
M30 End of program and rewind. Ends the program and returns to the first line, ready for the next part.
M03 Spindle on, clockwise. Starts the spindle forward (clockwise) at speed S.

Where controls differ

  • Haas: Rigid tapping is set by machine options, not M29.

Other codes in the spindle group

These also act only on their own line.

  • M03 Spindle on, clockwise
  • M04 Spindle on, counterclockwise
  • M05 Spindle stop
  • M19 Spindle orientation

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: M29

  1. What does M29 do? (Mill and lathe)

  2. Which code: Locks spindle rotation to the feed for the next tapping cycle.(Mill and lathe)

  3. What does M30 do? (Mill and lathe)

Show the answers
  1. Locks spindle rotation to the feed for the next tapping cycle.
  2. M29
  3. Ends the program and returns to the first line, ready for the next part.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does M29 mean in CNC programming?
Rigid tapping mode (Fanuc). Locks spindle rotation to the feed for the next tapping cycle.
Is M29 modal?
No. M29 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
What is the difference between M29 and M30?
M29 (rigid tapping mode (Fanuc)): locks spindle rotation to the feed for the next tapping cycle. M30 (end of program and rewind): ends the program and returns to the first line, ready for the next part.
What is the difference between M29 and M03?
M29 (rigid tapping mode (Fanuc)): locks spindle rotation to the feed for the next tapping cycle. M03 (spindle on, clockwise): starts the spindle forward (clockwise) at speed S.

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