Example program · Mill
Spindle Warm-Up Program — G-Code Example
Runs the spindle through increasing speeds while moving all axes to bring the machine to a stable temperature before precision work.
Runs the spindle through increasing speeds while moving all axes to bring the machine to a stable temperature before precision work.
| Item | Value |
|---|---|
| Machine | CNC mill / machining centre (Fanuc-style) |
| Units | Metric (G21) |
| Lines | 24 |
Program
O1015 (WARM UP - ABOUT 12 MIN)
G21 G90 G17 G40 G80
G91 G28 Z0
G90
S1000 M03
M98 P1115 L2
S3000
M98 P1115 L2
S6000
M98 P1115 L2
S8000
M98 P1115 L2
M05
G91 G28 Z0
G90
M30
O1115 (AXIS MOVES)
G00 G53 X-500. Y-400.
G00 G53 Z-100.
G00 G53 X-50. Y-50.
G00 G53 Z0
G04 P60000
M99▶ Simulate in the G-code viewer
How it works
- Adjust the G53 machine coordinates to stay inside your travel limits (G53 moves at rapid on Fanuc).
- G04 P60000 = 60 s dwell on Fanuc (milliseconds).
- Re-check tool lengths after warm-up for tight tolerances.
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
- Face Milling Program (Zig-Zag Passes)
- Outside Contour with Cutter Compensation (G41)
- Circular Pocket with Helical Entry
- Bolt Hole Circle with Polar Coordinates (G16)
- Peck Drilling a Hole Grid (G83)
- Rigid Tapping Program (M8 × 1.25)
- Internal Thread Milling M12 × 1.75
- Rectangular Pocket in Depth Passes Using a Subprogram
- Machining Multiple Parts with G54–G57
- Counterbore Holes for M6 Socket Head Screws
- Fine Boring a Precision Bore (G76 on a Mill)
- Milling a Slot with Ramping Entry
- Chamfering an Outside Edge with a Chamfer Mill
- Parametric Bolt Circle Macro (WHILE Loop)
- Setting a Work Offset Automatically with a Probe (G31)
- GRBL Router: Rectangle Cut-Out in Depth Passes
- GRBL / LinuxCNC Touch Plate Z Probe (G38.2)
- Haas G12 / G13 Circular Pocket in One Line
- Haas M97 Local Subprogram for Repeated Features
- High-Speed Peck Drilling in Aluminum (G73)
- Helical Boring a Ø20 Hole with a 10 mm End Mill