G84 and G88 are tapping canned cycles that fully automate in-bore (axial and radial) internal thread cutting in machining. On a CNC lathe, when cutting internal threads inside a hole with cutting tools called taps, normal feed commands (G01) cannot be used, because there must be perfect mathematical synchronisation between the tap entry speed and the spindle rotation speed. If this synchronisation is lost, the tap breaks instantly inside the hole or strips the threads of the part.
📷 IMAGE AREA — Comparison of G84 axial (Z) face tapping and G88 radial (X) side-face tapping
Suggested alt text: G84 face and G88 side-face tapping cycle diagram
1. The logic of tapping canned cycles and what the codes do
G84 and G88 were designed to control this synchronisation flawlessly:
- G84 – Face tapping cycle: used for axial tapping into the exact centre or the face of the part, i.e. along the Z axis. The tool enters the hole at the cutting feed, stops the spindle at the bottom, and the spindle reverses (CCW) to leave the hole at the cutting feed.
- G88 – Side tapping cycle: on machines with a live-tool (C-axis) mechanism, used for radial tapping into the side faces on the outside diameter of the part, i.e. along the X axis.
2. Programming form, format and parameter settings
G84 (face) format:
G84 X(U)_ C(H)_ Z(W)_ R_ P_ F_ ;
(simple centre tapping: G84 Z(W)_ R_ P_ F_ ;)
G88 (side) format:
G88 Z(W)_ C(H)_ X(U)_ R_ P_ F_ ;| Address | Function |
|---|---|
| X(U) / Z(W) | The target coordinate of the deepest point where tapping ends. In G84 depth is set by the Z axis; in G88 depth is set by the X axis. |
| C(H) | In live-tool applications, the angular position around the part (C-axis angle) of the hole to be tapped. |
| R | The safe approach point. As the tool approaches the hole mouth in rapid, it stops at this R distance and switches to the tapping feed from there. |
| P | The dwell time in milliseconds at the very bottom of the hole before the tool starts reversing. E.g. P1000 = a 1-second dwell at the bottom; this prevents mechanical shock as the spindle reverses and gives a clean thread root. |
| F | The thread pitch (thread lead). |
3. Applications
- G84 face tapping: centre holes of motor shafts, flange connection holes, bolt centring seats and all kinds of axial threaded connection elements.
- G88 side tapping: set-screw (grub screw) holes on shafts, sensor mounting seats, and radial threaded holes for hydraulic/pneumatic fitting connections.
4. Example programming applications
Example 1: G84 axial tapping M10 (pitch 1.5 mm) into the face
A hole has been pre-drilled at the centre of the part. We tap to a depth of Z-25 along the Z axis; the speed is 200 rpm.
O0084 (G84 FACE TAPPING EXAMPLE) ;
G21 ;
G28 U0 W0 ;
G97 S200 M03 ; (Turn the spindle CW at a constant 200 rpm)
T0303 ;
G99 ; (Feed mode: mm/rev)
(RAPID APPROACH TO THE START POINT)
G00 X0 Z5.0 M08 ; (Exact centre X0, 5 mm before the part)
(G84 CYCLE)
G84 Z-25.0 R2.0 P500 F1.5 ;
( Z-25.0 thread depth | R2.0 tap from Z2 | P500 dwell 0.5 s at bottom | F1.5 pitch )
(CANCEL CYCLE AND SAFE EXIT)
G80 ;
G00 X150.0 Z150.0 M09 ;
M05 ;
M30 ;Example 2: G88 radial tapping into the side face with a live tool
On the side face of the part, with the C axis at 90°, we tap in the minus X direction to the X30 target (depth); the pitch is again 1.5 mm.
O0088 (G88 SIDE-FACE TAPPING EXAMPLE) ;
G21 ;
G28 U0 W0 ;
M20 ; (Activate the C axis and live-tool mode)
G97 S300 M03 ; (Turn the live tool at 300 rpm)
T0404 ;
G99 ;
(ANGULAR POSITIONING AND APPROACH)
G00 C90.0 ; (Rotate the part to 90 degrees on the C axis and lock)
G00 X65.0 Z-20.0 M08 ;
(G88 SIDE TAPPING CYCLE)
G88 X30.0 R62.0 P1000 F1.5 ;
( X30.0 final diameter target | R62.0 rapid to O62, then cut | P1000 dwell 1 s at bottom | F1.5 pitch )
(CANCEL CYCLE AND CLOSE)
G80 ;
G00 X200.0 Z100.0 M09 ;
M05 ;
M30 ;📷 IMAGE AREA — G88 side-face tapping with a live tool: C-axis 90° positioning, R approach diameter and the radial thread in X
Suggested alt text: G88 live tool C-axis radial tapping
Both cycles are cancelled at the end with G80; otherwise the cycle stays modal and unexpected plunges can occur on subsequent moves.
5. Missing-information note: internal system parameters
The internal CNC micro-parameter numbers that run beneath G84 and G88 — for example the special system parameter code numbers that enable rigid tapping or set the parametric dwell times — are not present in the source documents. For these specific internal parameter numbers, rely on the original technical manual of your machine model (e.g. FANUC Series -TC); the rigid-tapping option and its M code (e.g. some machines require a separate M code for rigid tapping) must be verified according to the machine builder.