CNC machining
Computer numerical control — axes, G-code, offsets, speeds and feeds, and how a program becomes a part.
0 deeper section(s) hidden.
On this page
The idea
A machine is a lathe or mill whose axes and spindle are driven by a program. The program, usually written in (often generated by CAM software), lists moves, speeds and feeds. tell the machine where the part sits, so the same program makes identical parts, all day, with little operator skill at the machine.
Everyday intuition
A piano roll or a music box: the tune is stored, and the machine plays it the same way every time. Change the roll and you get a different tune — or a different part.
How it works
- Axes. Right-handed X, Y, Z (Z along the spindle); 4- and 5-axis machines add rotations (A, B, C) to reach more faces in one set-up.
- Drives and feedback. Servo motors turn ball screws; encoders or linear scales report position to the controller in a closed loop.
- G-code words. G00 rapid move, G01 straight cut, G02/G03 arcs, G90 absolute, G54 work offset; S spindle speed, F feed rate, T tool, M03 spindle on, M08 coolant on.
- Speeds and feeds. N = 1000v/(πD) and v_f = f_z z N, using the cutter maker’s v and chip load f_z.
- Offsets. Work offsets locate the part’s datum; tool-length and radius offsets let the same program use tools of different sizes.
- Workflow. CAD model → CAM toolpaths → post-processor → G-code → dry run and first-part inspection → production.
The program's zero is set on the part with a work offset.
Key formulas
Milling — spindle speed and feed rate:
- cutting speed m/min
- cutter diameter mm
- feed per tooth mm
- number of teeth none
- table feed rate mm/min
Worked example
Where it is used
- Aerospace brackets and frames: 5-axis milling from solid.
- Mould and die making: complex 3D surfaces cut by CNC.
- Car parts in volume: CNC machining centres in automated cells.
- Prototype and small-batch parts: quick turnaround from a CAD file.
Common misconceptions
Self-check
Check Which G-code word sets the feed rate and which sets the spindle speed?
Show answer
F sets the feed rate; S sets the spindle speed.
Check What does a work offset such as G54 store?
Show answer
The position of the part’s origin on the machine, so programs can work from the part’s datum.
Check A 10 mm cutter is to run at 100 m/min. What spindle speed is that?
Show answer
N = 1000 × 100/(π × 10) ≈ 3180 rpm.
My notes
Private to this browser. Select any text above to highlight it.