Example program · Mill

Milling a Slot with Ramping Entry — G-Code Example

Mills a 10 mm wide, 60 mm long, 6 mm deep slot by zig-zag ramping instead of plunging.

By cnccode · Updated

Mills a 10 mm wide, 60 mm long, 6 mm deep slot by zig-zag ramping instead of plunging.

ItemValue
MachineCNC mill / machining centre (Fanuc-style)
UnitsMetric (G21)
Lines18

Program

G-code
O1012 (SLOT 10 WIDE X 60 X 6 DEEP)
G21 G17 G40 G49 G80 G90
T2 M06 (10 MM END MILL)
G54 G00 X0 Y0
S6000 M03
G43 H02 Z25. M08
Z1.
G01 Z0 F300.
X60. Z-1.5 F600.
X0 Z-3.
X60. Z-4.5
X0 Z-6.
X60.
G00 Z25.
M09
G91 G28 Z0
G90
M30

▶ Simulate in the G-code viewer

How it works

  • Each 60 mm pass ramps down 1.5 mm (≈1.4°), gentle on the tool.
  • The last line cleans the floor flat at full depth.
  • For deep slots, trochoidal milling is faster and safer.

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 milling programs