CNC | M29 Code | Rigid Tapping

M29 Code Introduction

Controlling the spindle motor in the same way as a servo motor in rigid mode enables high-speed tapping. M29 code must be place before any of tapping cycle (like G84 or G88) to enable rigid tapping mode.

Rigid mode can be specified by applying any of the following methods:

M29 Sxxxx (before a tapping block)

M29 Code Format

M29 Sxxxx ;

Note: M29 most common M code to enable rigid tapping mode but also some of CNC manufacturers can be use different code. Please refer to machine books if M29 is not work for your machine.

M29 Code Examples

M29 CNC Program Example - 1

Tapping axis feedrate: 1000 mm/min
Spindle speed: 1000 min-1
Screw lead: 1.0 mm

Programming for feed per minute

G98 ; Command for feed per minute
G00 X100.0 ; Positioning
M29 S1000 ; Command for specifying rigid mode
G84 Z-100.0 R-20.0 F1000 ; Rigid tapping

Programming for feed per rotation

G99 ; Command for feed per rotation
G00 X100.0 ; Positioning
M29 S1000 ; Command for specifying rigid mode
G84 Z-100.0 R-20.0 F1.0 ; Rigid tapping