Tapping With CNC Machine | With G84, G74, G99,G98 | 2023

Introduction to CNC Tapping

CNC machines are versatile tools used for a variety of tasks, including the lesser-known but essential process of tapping, which is necessary for screwing.

Most CNC machine types like VMC, HMC, Mill-Turns, CNC Lathes, and CNC Routers can use standard Tapping cycles (G84, M03) and Rigid Tapping (G84, M29).

Tapping on a CNC machine presents challenges such as synchronization with the spindle and Z-Axis.

[email_subscription]

Before starting, if you need some more information about taps and tapping check our other articles too;

Table for tap sizes for metric check this link,

Table for tap sizes for Imperial BSPT check this link,

Hand tapping process is explained detailed here,

11 Types of taps for CNC and more explained.

Difference Between Tapping And Rigid Tapping

Understanding rigid tapping and normal tapping, tapping is crucial in the CNC machining process

 

1) Rigid tapping locks movements in high precision, to turn it on M29 should be used instead of M3.

2) Normal tapping works fine with most machines; however, it is not synchronized and locked like Rigid tapping while moving.

Hint-1) Use rigid tapping with a non-floating holder like standard collet holders.

Hint-2) If you use standard tapping with M03, make sure you use a floating tap holder, so you can compensate small missed movements during tapping. It will prevent breaking taps.

Tapping Using CNC Machines

The power of the spindle motor and the servo motors on the axis motions is crucial for the tapping and rigid tapping process. This is because precise linear synchronization of the Z-axis motor with the tap demands high torque at low RPM. With these properties, we can tap easily without breaking fixtures.

One of the challenges of tapping on a CNC machine is achieving proper spindle synchronization.

Things to consider in CNC machines:

1) A strong spindle motor

2) The manufacturer must know how to control the motor. Because it should make sure that the CNC router motor turns in the right direction and at the right speed.

3) It’s important to choose the right tap and tap holder.

4) The CNC Router needs to work well. Because the tap knife needs to be placed so that it doesn’t go into the holes that the drill made,

Tapping

Depending on which way the screw is going, the tapping cycle can be done either to the right or left.

The cycle of Right Tapping (G84)

[email_subscription]

Cycle G84 is used to make tapped holes. When the bottom of the hole is reached, the tool is retracted by turning the spindle counterclockwise (M04). After the spindle turns, the tool comes back.

During the tapping process, the operator panel’s feed change switch and feed stop button is turned off. So the operator cannot disrupt the synchronized tapping movements by overwriting from the controller.

When the machine is in the tapping cycle, in 1 revolution of the spindle, the z-axis moves 1 pitch(thread step). It should be clear which of the mm/revolution (G94) or mm/revolution (G95) modes to use, and the F (pitch) value should be given correctly

G99 and G98 parameters determine the retract strategy of the cycle. You can think of it as full retract or half retract, you should select it according to your part programming needs. The picture below shows the usage of G99 & G98.

Right tapping cycle in Fanuc
Right tapping cycle in Fanuc (CW: Clockwise, CCW: Counterclockwise)

In the G84 cycle, the tool moves in the following ways:

  • The spindle turns in a clockwise direction (CW).
  • The tool is put where the X and Y axes meet.
  • It moves quickly towards the R point (G0-rapid movement).
  • The screw is opened from the R point to the Z point ( moves as pitch in synchronization with the spindle).
  • The spindle stops turning.
  • The tap stays at the bottom of the hole for as long as P (delay parameter) says it should.
  • At the end of this time, the spindle turns counterclockwise and goes back to the R point (CCW).
  • The spindle stops and waits until P tells it to.
  • If the G98 code is used in the cycle, it quickly moves back to the beginning (G0).

This Table Shows Us G84 Tapping Cycle Format In Fanuc System

G84 X… Y… Z… R… P… F… K… ;
G84Bottom hole enlargement cycle
XCoordinate of hole center on X axis
YCoordinate of hole center on Y axis
ZTapping length from point R (mm)
RSafe approach / departure point (mm)
PDwell time at the bottom of the hole (milliseconds)
FCutting feedrate-amount (mm/min.)
KNumber of cycle repetitions

Siemens Right Tapping Cycle G84

Tapping cycle (CYCLE 84) programming format in Siemens system;

CYCLE84

RTP: Rebound distance

RFP: Reference plane

SDIS: Safety distance

DP: Hole depth

DPR: Hole depth relative to the reference plane

DTB: Dwell time at the end of the hole

SDAC: Direction of rotation (3=M3, 4=M4)

MPIT: Standard pitch by screw length (5=M5, 48=M48)

PIT: Screw pitch

POSS: Spindle at desired position stop degree

SST: Number of revolutions

SST1: Rebound speed

Let’s program the part shown in the figure below with G83 and G84 cycles in the Fanuc system; ∅12 mm drill (T06), M14x2 tap (T08)

Sample part
Sample part.
O .. .. .. .. ; (FANUC)Program name (with G94 mm/min active)
T06 M06Replace kit.
M03 S1100;Rotate the spindle clockwise.
G90 G54 G0 X0 Y0;Select absolute coordinate and workpiece zero point.
Go to the given coordinates in quick motion.
G43 H6 Z20 M08 ;Make tool length compensation 06 at distance Z20.
Turn on the coolant.
G98 G83 X27 Y21 Z-30 R6 Q7
F120;
30 mm using the deep hole drilling cycle
drill the hole with a 7mm peck.
After the cycle, go back to the starting point.
G91 X23 K4;Drilling holes 2,3,4 and 5.
G80 ;Cancel the cycle.
M05 M09;Stop the spindle and turn off the coolant.
T8 M6Change kit.
M03 S200Rotate the spindle clockwise.
G90 G54 G0 X0 Y0 ;Select absolute coordinate and workpiece zero point.
Move to given coordinates in rapid motion.
G43 H8 Z20 M08;Make tool #8 length compensation at distance Z20.
Turn on the coolant.
G84 X33 Y20 Z-13 R6 P3000
F135;
Tap hole 1 right. Wait 3 seconds at the and of the
hole.
G91 X23 K4;Right-tap holes 2, 3, 4 and 5.
G80;Cancel the cycle.
G28 G91 Z0;Send home on the team’s Z axis.
M30;Program end.

Let’s program the part with CYCLE G83 and CYCLE G84 cycles in Siemens, M14x2 tap (T08)

G90 G54; (SIEMENS)Select absolute coordinate and workpiece zero point.
T06 D1 M6;Switch tools and choose tool #8.
S1100 M03;Turn the mirror clockwise at 1100 rpm. rotate with.
G0 X27 Y21;Come to the given X,Y coordinates with fast movement.
Z20;Come to the given Z coordinate with rapid movement.
F120;The feed rate is 120 mm/min. choose.
MCALL CYCLE83(10, 0,
5, -30, , -7, , 0, 0, 0, 0.5 ,0)
MCALL: The command to call the cycle
CYCLE83: Stepped drilling cycle
10 (RTP): Rebound distance
0 (RFP): Reference plane
5 (SDIS): “R” safety distance
-30 DP: Hole depth 15 mm
-7 (FDEP): Initial depth of cut
0 (FDPR): Initial depth of cut relative to the reference plane
0 (DTB): Dwell time at he and of hole
0 (DTS): Amount of standby at startup
0.5 (FRF): Advance factor (0.001-1)
0 (VARI): 0 – Does not come out of the part every time.
It goes up to the set value in the machine parameters.
G0 X50 Y21;Coordinates of hole 1
G0 X73 Y21;Coordinates of hole 2
G0 X96 Y21;Coordinates of hole 3
G0 X119 Y21;Coordinates of hole 4
MCALL;Cycle cancelled. End the hole cycle.
T08 D1 M6,Change tool and select tool #8.
G90 G54,1.Select workpiece zero point and absolute programming.
M03 S150;Turn the mirror clockwise at 150 rpm. rotate with.
G0 X27 Y21;Come to the given X,Y coordinates with fast movement.
Z20;Come to the given Z coordinate with rapid movement.
MCALL CYCLE84
(10, 0, 5, -21,, ,,3, 14, 2, 90,
150, 150)
MCALL CYCLE84: Cycle call command
10 (RTP): Rebound distance
0 (RFP): Reference plane
5 (SDIS): Safety distance
-21 (DP): Hole depth
3 (DPR): Hole depth relative to the reference plane
14 (SDAC): Over thread diameter
2 (MPIT): Standard pitch according to screw size
90 (POSS): Spindle stopping degree at desired position
150 (SST): Number of revolutions
150 (SST1): Rebound speed
G0 X50 Y21;Coordinates of hole 2
G0 X73 Y21;Coordinates of hole 3
G0 X96 Y21;Coordinates of hole 4
G0 X119 Y21;Coordinates of hole 5
MCALL;Canceling the cycle
M30;End of program

The cycle of Left Tapping (G74)

Cycle G74 is used to make tapped holes in left thread way.

When the bottom of the hole is reached, the tool is retracted by turning the spindle clockwise (M03). After the spindle turns, the tool comes back. During the tapping process, the operator panel’s feed change switch and feed stop button are turned off.

All the rules that apply to the G84 command also apply to this one. Cycles G84 and G74 are two cycles that are exactly the same. In one, the tool turns in a clockwise direction, and in the other, it turns in a counterclockwise direction.

Left tapping cycle in Fanuc
Left tapping cycle in Fanuc (CW: Clockwise, CCW: Counterclockwise)

The movement of the tool in the G74 cycle is as follows;

  • The spindle is rotated counterclockwise with M4 (CCW).
  • The tool comes to the first hole center in the X and Y axis.
  • It comes to the R point with rapid movement (G0).
  • From the R point to Z point the screw is opened.
  • The spindle stops.
  • The tap waits at the bottom of the hole for the time indicated by P.
  • At the end of this period, the spindle returns to the R point after the spindle rotates clockwise (CW).
  • The spindle stops and waits for the time specified by P.
  • If the G98 code is used in the cycle, it moves to the starting point with rapid movement (G0).

G74 tapping cycle in the Fanuc system

G74 X… Y… Z… R… P… F… K… ;
G74Left tapping cycle
XCoordinate of hole center on X axis
YCoordinate of hole center on Y axis
ZTapping length from point R (mm)
RSafe approach / departure point (mm)
PDwell time at the bottom of the hole (milliseconds)
FCutting feedrate-amount (mm/min.)
KNumber of cycle repetitions

NOTE: When the tap rotates one revolution around its axis, it advances by the step. Therefore, the F value to be used in the tapping cycle must be equal to the product of the tap rotation speed and the step. Otherwise, the tap will break.

Example Of Left Tapping Cycle

Example of left tapping cycle
Example of left tapping cycle.

In the tapping process, the feed rate is found by multiplying the number of revolutions given to the machine with the screw pitch (pitch) when the G94 mm/min feed is active.

Feed ( F ) = Pitch x Number of revolutions ( S )

Program Of The Part In The Figure With The G73 And G74 Cycles. ∅12 mm Drill (T06), M14x2 Tap (T08)

O .. .. .. .. ;Program name (with G95 mm/min active)
T06 M6Tool selection
M03 S1100;Turning the spindle clockwise
G90 G54 G0 X0Y0;Absolute coordinate, workpiece zero, rapid positioning
to X and Y axis position
G43 H06 Z20. M08 ;With tool length compensation of tool #06
positioning and turning on the coolant
G98 G73 X27 Y21. Z-30 R6 Q7 F120;Return to origin command at the end of the cycle
drilling hole 1
G91 X23 K4;Drilling hole 2.3.4 and 5
G80 ;Cycle cancellation
M05 M09;Stopping the spindle and draining the coolant
T8 M6Tool selection
M03 S300;Turning the spindle clockwise
G90 G54 G0 X0 Y0;Absolute coordinate, workpiece zero, X and rapid
positioning to the Y-axis position
G43 H8 Z20 M08;With tool length compensation of tool #8
positioning and turning on the coolant
G74 X60 Y30 Z-21 R6 P1000 F2;Right tapping in hole 1
G91 X23 K4;Right tapping in hole 2, 3, 4 and 5
G80;Cycle cancellation
G28 G91 Z0 ;Send the team home on the Z axis.
M30;End of program

Conclusion

Tapping with CNC machines can be challenging, especially when dealing with spindle synchronization. However, with the right knowledge and tools, these challenges can be overcome. Whether you’re using CNC lathes, routers, or other machines, this guide should help you improve your skills.

By Isaac Aloyan

Isaac Aloyan is a talented mechanical engineer with a background in machinery design and manufacturing. He completed his diploma from the Department of Machinery Design and Manufacturing at Kocaeli University and also graduated from Level 7 NZDE Mechanical Engineering at Manukau Institute of Technology (M.I.T). Isaac has developed strong expertise in various areas of mechanical engineering, including CNC programming and machining, vacuum mold design and production, manual machining, CAD and CAM, and thermoforming machine design and production. Also, he has educator experience in the area of CNC machinery and programming and mechanical design. With two decades of experience under his belt, Isaac has established a website called mechutopia.com to share his knowledge and help others who are interested in the field of mechanical engineering. The site is likely to feature a wealth of information, resources, and tips for those looking to learn about CNC machines, machining, mold production, and more. It is a testament to Isaac's dedication to the field and his commitment to helping others excel in sub-domains of mechanical engineering like design and manufacturing.