CNC Tapping Operations

The format of a tapping cycle is very similar to G81: 

Here are two related formulas for calculating tapping feed-rate F with known spindle S and either pitch Por number of threads per inch TPI. 

G98 G84 X.. Y.. R.. 2.. F.. 

Threads made by tapping can create problems just like threads machined on a lathe. The problems can be quite numerous, so it is always important to categorize them and narrow down the cause. Generally, tapping problems can be filed in four categories: 




A hole that was drilled earlier can accept another operation, such as boring, reaming or tapping. Let’s look at tapping first. Tapping is a combination of forming and cutting. The tap has to be selected strictly for its size and the hole has to be drilled in such a way that there is enough material left for the tap. The drill selected for tapping is commonly known as the tap drill. 

This formula is always used for metric threads, but it can also be used for imperial threads, which requires calculation of the pitch first: 

G99 G84 X.. Y., R.. 2.. F.. G74 has the same format. 

There are several features in a typical tapping program that the CNC operator should be aware of: 

Tap breakage 

Stripped thread I Dimensional problems 

Surface finish problems 

P= 1 / TPI 

I G84 is used for right-hand taps with M03 spindle 

rotation – right-hand tap must be used 

This is an extra step, which is not necessary. A better way is to use the TPI directly 

Tap Drill 

Programmers will use a tap drill most suitable for the job. There are numerous tap drill charts available, sup plied through vendors, manufacturers and other sources. You can also find a typical chart in the Reference section of this handbook, on page 271. 

A modified example from the drilling section can be used as a sample of what to look in the program for a tap. 

I G74 is used for left-hand taps with M04 spindle 

rotation – left-hand tap must be used 


Spindle speed is selected for the machining conditions 

Feed-rate is always calculated (see below) 

Tap Breakage 

Tap will most likely break, if the tap itself is too large or the pre-drilled hole is too small. Dull taps are more likely to break than new taps. In the program, check if the XY coordinate positions of the tap drill and the tap match. Check if the spindle speed and feed-rate relation ship is correct. Sometimes a different type of lubricant may solve the problem. 

For blind holes check the depth of the drilled hole. Most drawings allow certain flexibility for the hole depth, as long as it does not break through the material. Tapped depth in blind holes should be checked periodically, so the full diameter tap depth is maintained. Re moving chips prior to tapping may be another way to eliminate tap breakage. 

, R-level has been increased to allow extra space 

for acceleration with high feed-rates 


– 1.4 – 

-0.9 – 


In the example, the feed-rate was calculated using the last formula: 

F = 600 / 16 = 37.5 NOTE – It is not unusual to change spindle speed at the machine to create optimal conditions. Changing spindle speed for tapping is no exception, as long as the feed-rate is changed accordingly 

For example, you may find that the programmed spindle speed 5600 can be changed to $700. It is not enough to change the address S only, but the feed-rate F has to change as well: S600 F = 600 / 16 = F37.5 $700 F = 700 / 16 = F43.75 (F43.7) 

. Z-depth should always guarantee full diameter thread 

• Taps vary in geometry – select the most suitable one 




In the less likely event, the reverse of the above statement is also thru – if you change the feed-rate, you must also adjust the spindle speed. For the number of threads per inch TPI use this formula: 

Feed-rate Calculation 

Since tapping is a cutting operation combined with forming, the shape of the tap has to be formed for the thread to be accurate. That means maintaining the thread pitch. The great majority of taps have only a single start, so the pitch and lead of the thread are the same. Remember, that feed-rate for tapping (or threading) always considers the lead of the thread, not the pitch. This is not an issue in tapping, but it is very important for threads with more than one start (multi start threads). To review: 

• PITCH is the distance between corresponding point 

of two adjacent threads 

S = F x TPI 

Stripped Thread 

Finding causes for a stripped thread may not always be easy, but trying the remedies suggested here should always be the first step. Dull threads, wrong alignment, hard material, poor setup – they all may contribute to the problem. 

One solution is to underfeed. Take 2-5 percent off the calculated feed-rate and try again. An even more innovative solution, particularly for very fine threads, may be to underfeed on the way into the material and overfeed on the way out. The problem with this solution is that tapping cycle uses only one feed-rate for both motions. Writing a simple macro is the best solution. Since macros belong to manual programming on a much higher level, the following macro will be provided with mini mum explanation. 

It is written for a feed-rate of 80% in and 120% out. This percentage will most likely require some degree of experimentation, but has been proven to work well. 


For pitch P, use this formula: 

The program shows a tool T03-388-16 TAP. The tap drill program is not listed, as it does not bring any new information. The typical (most common) size of the tap drill is Ø5/16 (0.3125), based on standard charts. 


(T03 – 3/8-16 TAP) N22 T03 


N23 M06 

(TOOL CHANGE) N23 G90 G54 Goo x0.9 71.1 5600 M03 (HOLE A) N24 G43 21.0 +03 M08 


N25 G99 G84 RO.3 Z-0.7 F37.5 


N26 x2.2 


N27 X1.4 Y0.5 


N28 G80 21.0 MO9 




is the axial distance measured over one revolution 


For example if you want to change the feed-rate of F37.5 to F35.0 the spindle speed will change to: S = 35.0 x 16 = S560 which is the same as S= 35.0 / 0.0625 = 5560 

Tapping feed-rate is a relationship between the programmed spindle speed and thread lead (pitch for normal tapping). Metric threads are always defined by pitch, for example, M10x1.5 is a 10 mm thread with a pitch of 1.5 mm. Standard V-shape imperial threads have the same form but are defined with the number of threads per inch (TPI). 

CNC Control Setup for Milling and Turning 




CNC Control Setup for Milling and Turning MACHINING HOLES 



Macro Example 

Macro call example for imperial units, where the argument T is the number of threads per inch (TPI): 




G65 P8020 R0.4 20.25 $750 T36 

G99 –++–*– Spindle CW 



Boring – or more accurately – single point boring is basically a sizing operation. It adds roundness and cylindricity to the hole, improves its surface finish, and with a micro attachment on the boring bar, hole size can be adjusted very accurately. 

All remaining cycles are defined as boring cycles, starting with G85. Their differences are often subtle. A short list below illustrates the order of basic boring motions, programming format and brief motion details. 


Surface Finish Problems 

Rough surface finish is generally the result of the tap pushing itself into the material rather than cutting it smoothly. Changing tap geometry often eliminates the problem of rough threads. Also, check the tapping head – some designs allow torque adjustments. Small tap drill may also contribute to poor surface finish, If the CNC machine has rigid tapping capability, use rigid tapping rather than the traditional tension/compression type tap ping heads. Rigid tapping always surpasses regular tap ping, but the machine tool has to support this feature. Underfeeding a couple of percent may also help. 



08020 (SPECIAL TAPPING MACRO – IMPERIAL) (R = #18 = FEEDPLANE) (Z = #26 = TAP DEPTH) (S = #19 = SPINDLE SPEED – RPM) (T = #20 = NUMBER OF THREADS PER INCH == #3003 = 1 GOO Z [ABS [#18]] S#19 M03 #3004 = 7 G01 2-[ABS (#26]] F[#19/#20*0.8] M05 Z#18 F[#19/#20*1.2] M04 #3004 = 0 



#3003 = 0 



Spindle stop 

G85 Cycle 

685 Feed to depth > Feed out 

G98 G85 x.. Y., R.. z.. F.. 

G99 G85 x.. Y.. R.. 2.. F.. Feeding out with a regular boring bar may actually damage the surface due to the release of tool pressure. 

This is the preferred fixed cycle for REAMING 

Graphical Representation 

Both G84 and G74 tapping cycles can be represented graphically, similar to other cycles described in this section. Watch for spindle rotation and correct tap selection. 

G87 Cycle G87 Backboring (** G98 MODE ONLY **) 

G98 G87 X.. Y..R.. Q..z.. F.. Apart from the requirement of a special tool, this cycle starts from the bottom of the hole and feeds up. It is used mainly when the backbore diameter is only marginally larger that the existing hole. G98 mode only. 

Macro call example for metric units, where the argument is the thread pitch: 


and R/H tap 



G65 P8020 R3.0 26.5 5750 T0,75 







Spindle CW 


___ Vi 




– ZO 

foss – 




= #26 = TAP DEPTH) (S = #19 = SPINDLE SPEED – RPM) (T = #20 = THREAD PITCH ==== #3003 = 1 GOO Z [ABS [#18]] S#19 M03 #3004 = 7 G01 2-[ABS (#26]] F[#19**20*0.8] M05 Z#18 F[#19*#20*1.2] M04 #3004 – 0 



#3003 = 0 



Z-depth – spindle CCW 



and L/H tap 






Spindle start 





Note the OSS abbreviation – OSS stands for oriented spindle stop. Also note the Q-address – this is amount of the bar shift. Oriented spindle stop and the shift and their effect on tool setup is described in detail for G76 fixed cycle on page 124. 

The 3000-series variables disable or enable single block and feed-rate overrides. Take these examples for what they are – only examples that can be adapted. 

Spindle CCW 


G86 Cycle G86 Feed to depth > Stop > Rapid out 

G98 G86 x.. Y.. R.. 2.. F.. 

G99 G86 x.. Y., R.. 2.. F.. A very useful fixed cycle for rough or utility type boring. When the tool retracts at a rapid rate, the spindle does not rotate, and the relief of tool pressure will leave a straight vertical line on the hole surface. In fact, G81 cycle that is closely associated with drilling can also be used for rough or utility type boring. The difference is that it will leave a helix on the hole surface, since the spindle is always rotating. G86 or even G81 cycles are often used when the hole has to be round, but surface finish is not critical. 

Z-depth – spindle CW 

G88 Cycle G88 Feed to depth > Stop > Manual operation … For all practical purposes, ignore the fixed cycle G88. It is used for very special purposes only and appears in part programs extremely rarely (if ever). 

Dimensional Problems 

Adjustment in tapping speed (don’t forget to change feed-rate, too) is one possible approach. Using coated taps will prevent metal sticking to the thread, and so will a suitable lubricant. Changing the tap drill size slightly will also change the percentage of the thread depth. Using high helix tap geometry minimizes pressure. These are all possible solutions to consider. 

Riaid Tanning Rigid Tapping 

Rigid tapping does not much change in the program, but the tap is installed is a solid holder (rigid holder). Spindle synchronizes the tapping. There are many benefits, but the CNC machine has to support this feature. 

There is no need for illustration