Threading & Rigid Tapping Across Controls

There are exactly three ways to put a thread in (or on) a part with a CNC machine: tap it — a tapping cycle drives a tap into a drilled hole; single-point it — a lathe threading cycle traces the thread form over multiple synchronized passes; or mill it — a thread mill helically interpolates the form. Every control in this wiki does all three; only the spelling changes. The word that causes the most confusion is rigid. In a conventional (“floating”) tap cycle the spindle turns and the Z axis feeds at approximately the right rate, and a tension-compression holder stretches or squeezes to absorb the mismatch. In rigid tapping the control closes the loop itself: spindle angle and Z position are interpolated together, so one spindle revolution advances exactly one lead — a solid holder, exact depths, and reversal out of the hole at the same synchronization. This article shows the same M10×1.5 tapped hole on every control, then the lathe and milling routes, so you can move between machines without relearning the concept.

The Arithmetic, Once

Tapping feed is not a free choice — it is fixed by the thread: F (mm/min) = lead × rpm. On controls that support feed-per-revolution (G95 on Fanuc-style controls), you can skip the multiplication and program the lead directly as F. Note it is the lead that matters, not the pitch — they only coincide on single-start threads (see the multi-start gotcha at the bottom). Inch threads add one conversion step, because they are specified in threads per inch: lead = 1 / TPI (or 25.4 / TPI in mm).

ThreadLeadrpmF per minuteF per rev (G95)
M10×1.51.5 mm600F900. (1.5 × 600)F1.5
M6×1.01.0 mm1000F1000.F1.0
1/4-20 UNC1/20 = 0.05″ = 1.27 mm800F40. in/min (or F1016. mm/min)F0.05 (F1.27)

Every snippet below taps the same hole: M10×1.5, 20 mm thread depth (programmed to Z-22 for tap chamfer lead), 600 rpm, F900.

Rigid Tapping per Control

First the map, then the snippets. Every control has a rigid (synchronized) cycle, a floating-holder variant, and a chip-breaking option somewhere:

ControlRigid tapFloating holderLeft-handCancel / end
Fanuc / Mazak-EIA / MitsubishiM29 S… + G84G84 (no M29)G74G80
HaasG84 (rigid if option installed)G84 without the optionG74G80
BrotherG84 (rigid standard)— (rigid is the machine’s reason to exist)G74G80
SiemensCYCLE84 / G331+G332CYCLE840sign of pitch (negative = LH)non-modal; MCALL to make modal
HeidenhainCycle 207Cycle 206sign of pitch parameterruns per CYCL CALL / M99

Fanuc — M29 then G84

On Fanuc, G84 alone is the floating tap cycle. Rigid mode is armed by M29 S____ in the block immediately before the cycle — the S word on the M29 line commits the spindle to position control at that speed.

G90 G54 G00 X10. Y10.
G43 Z25. H04
M29 S600                            (arm rigid tapping at 600 rpm)
G99 G84 X10. Y10. Z-22. R5. F900.   (F = 1.5 x 600 = 900 mm/min)
X30.                                (second hole - cycle is modal)
G80                                 (cancel - G84 is modal like any canned cycle)
G00 Z25.

Forget the M29 and the control runs the floating version of the cycle against your solid holder — the classic broken-tap mistake. In G95 feed-per-rev mode, program F1.5 instead of F900 and the rpm drops out of the arithmetic entirely.

Haas — G84, rigid by default

On Haas machines with the rigid-tapping option, G84 is rigid — no M29 required (the control accepts it for Fanuc compatibility). Same block shape, same feed math. The retract speed out of the hole is governed by a control setting (a multiplier on the tapping speed), and newer NGC machines accept a retract-multiplier word on the G84 block itself — check your machine’s manual for both. Without the rigid option, G84 needs a tension-compression holder just like a floating Fanuc cycle.

S600                                (no M29 needed - rigid if the option is on)
G99 G84 X10. Y10. Z-22. R5. F900.
G80

Brother — rigid is the house specialty

Brother Speedios are tapping machines first and machining centers second — rigid tapping is standard, not an option, and the spindle/Z synchronization is tuned for very high tapping rpm and aggressive acceleration into and out of the hole. The programming is the familiar Fanuc-style G84 block with F = lead × rpm; the difference you notice is cycle time, not syntax. Return-speed override and high-speed peck variants are configured on the control — consult the machine documentation rather than porting Fanuc parameter habits.

G95                                 (feed per revolution)
S3000                               (Speedios tap at speeds that look like typos)
G84 X10. Y10. Z-22. R5. F1.5        (in G95, F is simply the lead)
G80
G94                                 (back to feed per minute)

Siemens SINUMERIK — CYCLE84, or G331/G332 longhand

CYCLE84 is the rigid tapping cycle (its floating-holder sibling is CYCLE840). Fill in the cycle’s parameters — retract/reference/depth planes, the pitch, and the speed — on the cycle screen or as arguments; the control does the feed arithmetic itself, which removes the F-word failure mode entirely. Underneath, rigid tapping is the longhand pair G331 (tap in) / G332 (retract): the spindle must first be put into position control with SPOS, the pitch rides on the tapping axis’s interpolation word (K for Z), and the sign of the pitch selects right- or left-hand:

SPOS=0                 ; put the spindle in position control
G0 X10 Y10 Z5
G331 Z-22 K1.5 S600    ; tap in: K = pitch (positive = RH), S = rpm
G332 Z5 K1.5           ; retract: spindle direction reverses automatically
G0 Z25

Heidenhain — Cycle 207 (rigid) / 206 (floating chuck)

Cycle 207 RIGID TAPPING is the synchronized cycle; Cycle 206 is the floating-tap-holder version. As on Siemens, you give the cycle the pitch and it handles the synchronization — the sign of the pitch parameter selects right-hand (+) or left-hand (−):

CYCL DEF 207 RIGID TAPPING ~
Q200=+2    ;SET-UP CLEARANCE ~
Q201=-22   ;DEPTH OF THREAD ~
Q239=+1.5  ;THREAD PITCH (+ = right-hand) ~
Q203=+0    ;SURFACE COORDINATE ~
Q204=+25   ;2ND SET-UP CLEARANCE
L X+10 Y+10 R0 FMAX M99    ; position and call the cycle

Mazak (EIA) & Mitsubishi — the Fanuc pattern

On the EIA/ISO side, both follow the Fanuc convention: arm synchronized mode (commonly M29 S____ — the exact M-code can be builder-configured, so confirm on your machine), then G84 with F = lead × rpm, G80 to cancel. If your Fanuc tap program runs, it ports with little more than a syntax read-through.

Lathes rigid-tap too: an on-center tap in the turret uses the same synchronized cycle with the main spindle (feed per rev makes the block trivial — the F word is just the lead), and live-tooling machines tap cross and end-face holes with the milling-side cycles. The arithmetic and the M29-or-equivalent arming rule carry over unchanged.

Reversing Out and Peck Tapping

What makes tapping different from drilling is the bottom of the hole: the spindle must decelerate, stop, and reverse, and the retract must stay at the same synchronization — one reverse revolution backs the tap out exactly one lead. In rigid mode the control interpolates all of it; that is why most controls lock feed and spindle overrides to 100% during the cycle — a mid-tap override change would desynchronize the tap from its own thread. Many controls let the retract run faster than the way in, which is safe because the synchronization ratio is preserved even as the rpm scales:

ControlFaster-retract mechanism
FanucRigid-tap return override, enabled and scaled by parameter — machine-builder configured
HaasTap-retract-speed setting (a multiplier on the tapping speed); NGC machines also accept a retract-multiplier word on the G84 block
BrotherReturn-speed override built into the tapping function — the Speedio’s headline cycle-time trick
SiemensCYCLE84 takes separate speed/speed-factor values for the retraction
HeidenhainCycle 207/209 handle retraction internally; retract behavior set through the cycle’s parameters

Peck tapping exists for deep holes in stringy material. On Fanuc, adding a Q word to a rigid G84 block enables pecked tapping — whether each peck is a small chip-break retract or a full return to the R plane is parameter-selected, so verify which flavor your machine is set for before trusting it in a blind hole. Heidenhain’s Cycle 209 TAPPING W/ CHIP BRKG is the dedicated chip-breaking tap cycle, and Siemens exposes chip-break/full-retract behavior through CYCLE84’s deep-tapping parameters.

Peck tapping is a last resort, not a habit — the right tap geometry usually removes the need. A spiral-point tap pushes chips ahead of it (through holes only); a spiral-flute tap pulls chips back up and out (blind holes); a forming tap makes no chips at all (ductile materials, needs a larger tap drill and more torque, and rigid mode strongly preferred). If chips are wrecking blind-hole taps, change the tap before adding pecks.

One depth gotcha that bites the floating-holder crowd: with a tension-compression holder, programmed depth is only approximate — the holder extends or compresses a few millimeters while the spindle winds down, so the tap keeps cutting past (or stops short of) the programmed Z. In a blind hole, leave real clearance between thread depth and drill depth. Rigid tapping ends this: the tap stops where the program says, which is exactly why rigid mode is what lets you tap close to the bottom of a blind hole.

Single-Point Threading (Lathe)

On a lathe the thread is cut with a single-point insert over multiple passes. Synchronization works differently from tapping: the spindle encoder emits a one-revolution mark, and every threading pass starts when that mark comes around — so as long as each pass begins from the same Z start point at the same rpm, every pass drops into the same groove. Passes get progressively shallower (degressive infeed) so each one removes roughly constant chip area, and the tool typically infeeds along the thread flank (compound angle a hair under half the thread angle) so it cuts mainly on one flank.

Every lathe control offers the same three levels of automation — pick the highest one your thread allows and drop down only when you need control the cycle does not expose:

LevelFanuc / HaasSiemensYou provideThe control provides
One synchronized passG32G33Everything: infeed, retract, return, pass depthsSpindle-Z synchronization only
One box pass per blockG92— (use CYCLE97)The depth of each passApproach, thread, retract, return — per block
Whole thread, one callG76CYCLE97Thread spec: lead, depth, pass count / first-pass depth, infeed angleEvery pass, degressive infeed, spring passes, finishing allowance

G76 and G92 get full word-by-word treatments in Fanuc Turning Programming and Haas Lathe Programming; CYCLE97 is covered in Siemens Turning Programming. What those cycles automate is worth seeing once in the raw. Here is the longhand — a G32 pass loop driven by macro variables, computing each pass depth with degressive (square-root) infeed. On ISO/Siemens-flavored controls the synchronized-pass word is G33 with the lead on K; the structure is identical.

(M10 X 1.5 EXTERNAL THREAD - G32 LONGHAND, DEGRESSIVE INFEED)
#100 = 10.0                       (major diameter)
#101 = 1.5                        (lead - F word of every pass)
#102 = 0.92                       (total depth ~ 0.6134 x pitch, 60-deg metric)
#103 = 6                          (number of passes)
#104 = 1                          (pass counter)
G97 S800 M03                      (constant rpm - never CSS while threading)
G00 X12. Z4.                      (start point: 2+ leads of run-in above the part)
WHILE [#104 LE #103] DO1
#105 = #102 * SQRT[#104 / #103] (cumulative depth this pass - degressive)
#106 = #100 - 2 * #105          (diameter for this pass)
G00 X#106                       (infeed to pass diameter)
G32 Z-15. F1.5                  (synchronized pass - F is the LEAD)
G00 X12.                        (retract clear of the thread)
G00 Z4.                         (back to the SAME start Z - critical)
#104 = #104 + 1
END1
G00 X50. Z50.

Three things make or break this loop: constant spindle speed (G97, never constant surface speed — a speed change between passes shifts where the encoder mark lands along Z), the same start Z every pass (the run-in distance lets the axis reach synchronized speed before touching metal), and F = lead, not feed per minute.

Thread Milling

A thread mill cuts the thread form while helically interpolating: a circular move (G02/G03) with a Z word adds exactly one lead of Z travel per full revolution of the arc. Reach for it instead of a tap when the material is hard (taps gall and snap), the diameter is large (a $60 thread mill replaces a $600 tap), the hole is blind and threads are needed close to the bottom, the bore is interrupted, or a broken tap would scrap an expensive part — a snapped thread mill falls out of the hole; a snapped tap is welded into it. One cutter also does any diameter of the same pitch, and left- or right-hand threads are just a direction choice.

A multi-tooth (full-form) cutter carries the whole thread length on its flutes and finishes the thread in a single helical revolution; a single-profile cutter carries one tooth and must helix through depth ÷ lead revolutions — slower, but one tool covers every pitch. Hand of thread and cut direction both fall out of two choices — arc direction (G02/G03) and Z direction — because a right-hand helix rises counterclockwise and a left-hand helix rises clockwise. For an internal thread with a right-hand cutter on M03:

Internal thread (M03)ClimbConventional
Right-handG03, bottom → top (+Z per rev)G02, top → bottom (−Z per rev)
Left-handG03, top → bottom (−Z per rev)G02, bottom → top (+Z per rev)

Climb is the default recommendation from cutter makers — better finish and tool life in most materials; flip to the conventional column for work-hardening alloys or flimsy setups where climb chatter appears. External thread milling mirrors the table (climb becomes G02 around the outside of a stud).

(M10 X 1.5 INTERNAL THREAD - FULL-FORM THREAD MILL, CLIMB, RH)
(HOLE PRE-DRILLED 8.5MM, THREAD DEPTH 15MM, CUTTER DIA 7MM)
G90 G54 G00 X0 Y0             (hole center)
G43 Z5. H07 S4500 M03
G01 Z-15. F800.               (drop to the bottom - in air, hole is 8.5)
G01 X1.5 F250.                (radial infeed: 10/2 - 7/2 = 1.5)
G91 G03 I-1.5 Z1.5 F220.      (one full CCW rev, climbing UP one lead)
G90 G01 X0                    (pull off the flank back to center)
G00 Z25.                      (retract)

The single-profile version of the same thread is the multi-tooth program wrapped in a loop — one helical revolution per lead of thread depth, and the revolution count is just macro arithmetic:

(SINGLE-PROFILE VARIANT - ONE HELIX REV PER LEAD, BOTTOM UP)
#110 = 15.                    (thread depth)
#111 = 1.5                    (lead)
#112 = FUP[#110 / #111]       (revolutions needed = 10)
#113 = 1                      (rev counter)
G90 G01 Z[-#110] F800.        (to the bottom, in air)
G01 X1.5 F250.                (radial infeed to the wall)
WHILE [#113 LE #112] DO2
G91 G03 I-1.5 Z#111 F220.   (one full rev, climbing up one lead)
#113 = #113 + 1
END2
G90 G01 X0                    (off the flank, back to center)
G00 Z25.

Feed gotcha: the F word applies at the cutter centerline, but the cutting speed happens at the thread wall. For internal thread milling the centerline travels a much smaller circle than the thread, so scale the programmed feed by (Dthread − Dcutter) / Dthread — skip this and you overfeed the flank. Cutter makers publish the corrected number; use it.

Choosing: Tap vs Single-Point vs Mill

MethodBest forWatch out
Rigid tapProduction holes to ~M16 in machinable material — fastest cycle by far, one hole per second on a tapping machineOne tap per size, breakage scraps the part, needs torque at low rpm for big taps, thread class fixed by the tap
Single-point (lathe)External and large internal threads on turned parts; any special form, lead, or multi-start; full control of thread class via infeedMultiple passes = slower; needs run-in/run-out room; rpm and start-Z discipline
Thread millHard material, large or odd diameters, blind holes threaded near the bottom, interrupted bores, expensive parts, LH/RH from one toolSlowest per hole; needs helical interpolation and good circularity; feed must be corrected to the thread wall

Common Gotchas

TrapWhat goes wrongFix
Missing M29 on FanucG84 runs as a floating tap cycle against a solid holder — the mismatch loads the tap until it snapsM29 S____ in the block before every rigid G84/G74; make it part of the tap-op template
Touching overrides mid-tapNothing — and that surprises people. Most controls lock feed/spindle override to 100% during rigid tapping; on those that don’t, an override change desynchronizes the tapExpect the lockout; never rely on override to “ease into” a tap. Prove the feed math instead
Forgetting G80G84 is modal like any canned cycle — the next positioning move taps a phantom holeCancel immediately after the last hole, before any other motion
Lead vs pitch on multi-start threadsA 2-start M10×1.5 has pitch 1.5 but lead 3.0. Feed (or F/K lead word) programmed from pitch cuts the wrong helixAlways compute from lead = pitch × number of starts; offset each start by shifting the start Z one pitch (or the spindle start angle)
Inch-metric lead conversionInch threads specify TPI, not pitch: 1/4-20 is a lead of 1/20 = 0.050″ = 1.27 mm. Rounding it (1.25) or inverting it wrong walks the tap out of its own threadConvert as lead = 25.4 / TPI and carry all the digits; in G95, program that exact lead as F
Blind-hole depth with a floating holderThe tension-compression holder extends during spin-down — the tap bottoms out past programmed depthLeave generous drill-depth clearance, or use rigid mode, which stops on the number
CSS active while single-pointingUnder constant surface speed (G96) the rpm changes with X — passes no longer start on the same encoder mark and the tool cross-threads its own workSwitch to constant rpm (G97) before the first threading pass, every time
Run-in / run-out too shortThe Z axis is still accelerating to synchronized speed when the tool hits metal — the first few threads have the wrong leadStart at least two leads before the part and, on through threads, run past the end by a lead or more (higher rpm needs more)

Open the Macro Playground — the pass-depth loop from the single-point example is pure macro math; run it in any of the playground controls and watch the degressive infeed compute.

See also: Canned Cycles for the full G73–G89 hole-making set that G84 belongs to, Fanuc Turning Programming and Haas Lathe Programming for the G76/G92 word-by-word breakdowns, and Siemens Turning Programming for CYCLE97.

References

  • Fanuc, Operator’s Manual (Machining Center / Lathe System) — rigid tapping (M29/G84), thread cutting G32, multiple repetitive cycle G76, FANUC Corporation.
  • Haas, Mill and Lathe Operator’s Manuals, Haas Automation, Inc. — G84 rigid tapping and lathe threading cycles.
  • Siemens, SINUMERIK Programming Guide: Fundamentals & Job Planning, Siemens AG — CYCLE84/CYCLE840, G331/G332, CYCLE97.
  • HEIDENHAIN, TNC 640 Cycle Programming User’s Manual — Cycles 206, 207, 209.
  • Brother Industries, SPEEDIO CNC Machine Tool Programming Manual — tapping functions.
  • Machinery’s Handbook, Industrial Press — threading section: thread forms, depth-of-thread, tap drill sizes, multi-start leads.

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch