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.

By cnccode · Updated

Drills a Ø10 hole 40 mm deep on centre using the G74 peck cycle at constant RPM.

ItemValue
MachineCNC lathe (Fanuc G-code system A)
UnitsMetric (G21)
Lines10

Program

G-code
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