27

2025.8

administrator

author

114

Reading volume

How to use G73, G81, G83, G84 for efficient drilling and tapping
Play with G-Code Fixed Loops: G73/G81/G83/G84 Drilling and Tapping Tips

The fixed cycle isCNC code(G-code) to simplify repetitive machining operations such as drilling and tapping. With fixed loops, complex tool movements can be completed with just a few lines of code.

 

What is a fixed cycle?

The stationary cycle performs predefined movementsCNC programCommon types of exercise include:

  • drill
  • Tapping
  • Boring
  • Peck drill (segmented drilling)
Instead of writing all motion instructions line by line, a single G-code can complete the entire machining sequence.

 

Universal format

G8X X__ Y__ Z__ R__ F__

code
illustrate
X, Y
hole coordinates
Z
Final machining depth
R
Tool return height (safety height)
F
Feed speed

 

Commonly used drilling fixed cycles

G81 – Simple drilling

G81 X10 Y10 Z-15 R2 F150

 

Movement process

  1. Quickly move the tool to R2 (return height is 2);
  2. Feed to Z-15 at F150 (feed rate 150) (machining depth 15);
  3. Fast return to R2.

G83– Peck drill (deep hole machining)

G83 X0 Y0 Z-30 R2 Q5 F100

 

Key parameters:

  • Q5: Depth per peck (5mm per feed);
    Core features:: The tool will be slightly returned after each pecking drill to remove chips and avoid chip accumulation affecting the machining accuracy or damaging the tool, suitable for holes with large depths.

G73– Chip breaking drilling

G73 X20 Y10 Z-12 R2 Q2 F120
Core features:: Using fast small pecking, the tool will not completely return to R height (only small lifting), which is faster than the G83 machining speed, and is mainly used for shallow hole machining that requires chip breaking, preventing long chips from entangled with the tool.

G84– Tapping cycle

G84 X0 Y0 Z-10 R2 F100

 

Core features:

  • The feed movement is strictly synchronized with the rotation of the spindle (the machine tool spindle needs to be equipped with an encoder);
  • For rigid tapping (hard tapping), threaded holes can be directly machined;
    Cancel the loop instructionG80(After execution, the fixed cycle is terminated and the tool returns to its initial state).

 

Example: Machining a drilled array with the G81

G90G98G81Z-10 R2 F150  ; Initialize: Absolute coordinates, return to initial altitude, start the G81 loop

X0 Y0                      ; First hole coordinates (X0, Y0)

X20 Y0                     ; Second hole coordinates (X20, Y0)

X40 Y0                     ; Third hole coordinates (X40, Y0)

 

G80; Cancel the fixed loop

 

Code description

  • G90: Absolute coordinate programming (tool position is calculated based on the origin of the machine tool);
  • G98: The tool is returned to the initial Z height (safe height) after machining is completed;
  • G81: This loop instruction takes effect on all subsequent X/Y coordinate points without rewriting;
  • G80: End the drilling cycle to avoid subsequent operations being affected by the cycle.

 

Fixed cycle summary table

code
Cycle type
Applicable scenarios
G73
Peck at high speed
Shallow hole machining, chip breaking needs
G81
Ordinary drilling
Standard depth holes (no special chip breaking/chip evacuation requirements)
G83
Peck drills
Deep hole machining (chip evacuation required)
G84
Tapping
Threaded hole machining (rigid tapping)
G80
Cycle cancellation
Terminate the fixed cycle

 

G98 vs G99 – Tool return mode

code
meaning
G98
Return to initial Z height after machining (safe height, suitable for multi-station machining, avoid collisions)
G99
Return to R height after machining (return to return height only, faster cycle speed, suitable for continuous machining in the same area)

 

suggestion

1. When using the fixed cycle for the first time, be sure to verify the motion trajectory through the machine tool simulation function to avoid collision;

2. When machining holes with a depth of more than 3 times the diameter of the tool, the G83 pecking cycle is preferred;

3. Set a reasonable Q value (pecking depth) to prevent chip accumulation (too large Q value will lead to poor chip evacuation, and too small will reduce processing efficiency);

4. Before performing the G84 tapping cycle, confirm that the machine tool spindle supports rigid tapping function (spindle encoder is required).