Example program · Lathe

Lathe OD Turning Box Cycle (G90) — G-Code Example

Turns a Ø50 bar down to Ø40 over 30 mm with the G90 single-pass box cycle, 1.5 mm depth per side per pass, then a finish pass.

By cnccode · Updated

Turns a Ø50 bar down to Ø40 over 30 mm with the G90 single-pass box cycle, 1.5 mm depth per side per pass, then a finish pass.

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

Program

G-code
O2102 (G90 TURN D50 TO D40 X 30)
G21 G18 G40 G99
T0101
G50 S2500
G96 S200 M03
G00 X52. Z2. M08
G90 X47. Z-30. F0.25
X44.
X41.
X40.2
G96 S250
X40. F0.1
G00 X100. Z100. M09
M30

▶ Simulate in the G-code viewer

How it works

  • Each X value repeats the full box: in, along Z, out, back.
  • G71 is better for profiles with several diameters.

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