Example program · Lathe
Peck Drilling on a Lathe (G74) — G-Code Example
Drills a Ø10 hole 40 mm deep on centre using the G74 peck cycle at constant RPM.
Drills a Ø10 hole 40 mm deep on centre using the G74 peck cycle at constant RPM.
| Item | Value |
|---|---|
| Machine | CNC lathe (Fanuc G-code system A) |
| Units | Metric (G21) |
| Lines | 10 |
Program
O2005 (DRILL D10 X 40 ON CENTRE)
G21 G18 G40 G99
T0505 (10 MM DRILL)
G97 S1000 M03
G00 X0 Z3. M08
G74 R0.5
G74 Z-43. Q5000 F0.15
G00 Z50.
X100. Z100. M09
M30▶ Simulate in the G-code viewer
How it works
- Always use G97 (constant RPM) for drilling on centre — G96 would run at the G50 clamp.
- Q5000 = 5 mm pecks; Z-43 adds the drill point length.
Codes used in this program
Always check feeds, speeds, offsets and clearances for your own machine and tooling, and prove new programs with single block and reduced rapid.
More lathe programs
- Lathe OD Roughing and Finishing (G71 / G70)
- Lathe Facing Program with CSS
- Lathe Threading M20 × 2.5 with G76
- Lathe OD Grooving with G75
- Lathe Internal Boring (G71 for ID)
- Lathe Parting Off a Part
- Lathe Taper Turning Program
- Lathe Threading with G92 (M12 × 1.75)
- Lathe OD Turning Box Cycle (G90)
- Lathe Facing Box Cycle (G94)
- Lathe Stock Removal in Facing (G72)