How CNC Machine Work: A Shop-Floor Walkthrough
This page explains how CNC machine work in the order a job actually runs: controller, axes, work zero, toolpath, tool changes and inspection. It is written for design and manufacturing engineers who need to judge a part or a process, not just watch a spindle spin.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
Key takeaways
What happens inside a CNC machine from cycle start to cut
A CNC machine does not decide anything. A CAM programmer decides, and the machine repeats that decision. The chain is short: CAD model → CAM toolpath → G-code file → controller → servo drives → ball screws and linear guides → cutting tool in the spindle. Each link adds error, so we care about all of them.
The controller buffers blocks of G-code and looks ahead. G01 moves in a straight line at a set feed. G02 and G03 cut arcs. G00 rapids at maximum speed. M-codes switch coolant, spindle direction and tool changes. Feed rate is in mm/min, spindle speed in rpm, and the controller interpolates the two so the chip load stays close to the programmed value.
Position feedback is the part most people skip. A semi-closed loop reads the motor encoder only. A full closed loop reads a glass scale on the axis itself, so it sees ball-screw pitch error and thermal growth. That is the difference between a machine that holds ±0.01 mm and one that holds ±0.005 mm over a long run.
Cutting is not silent. Chatter, tool wear and chip evacuation all feed back into the part. An operator watching load meters and listening to the cut catches most of it before the tolerance drifts. That is why a CNC cell still needs a skilled hand on the panel.
- 1ControllerReads G-code, runs look-ahead, manages tool offsets and coolant.
- 2Servo drivesConvert position commands into torque on each axis motor.
- 3FeedbackEncoders on motors, glass scales on the axis for tighter work.
- 4Spindle and tool holderHolds the cutter; BT30, BT40 or HSK taper decides rigidity and top rpm.
Axes, coordinate systems and work zero
Most CNC machines use Cartesian coordinates. X and Y move the table or the column in the horizontal plane; Z moves the spindle up and down. A 3-axis mill cuts three faces from one setup. Add a fourth axis and the part rotates about X, so you reach four sides without re-fixturing. A 5-axis machine tilts and rotates at the same time, which lets a ball-nose cutter stay normal to a curved surface.
Machine zero is fixed by the builder. Work zero is set by the operator for each job. We touch off X and Y with an edge finder or a spindle probe, then set Z on the top face or on a gauge block of known height. The offset lives in the work coordinate system, usually G54. Get it wrong by 0.5 mm and every feature shifts with it.
Incremental (G91) and absolute (G92) positioning solve different problems. Absolute is safer for production: every move is measured from work zero, so a lost block does not stack up error. Incremental is useful for patterns such as hole arrays, where each move is a fixed step from the last hole.
On a 5-axis machine there is one more decision. You can program in table coordinates or in tool-tip coordinates. Table coordinates need the post-processor to do the math. Tool-tip control keeps the cutter contact point fixed while the axes rotate, which is easier to verify on the machine and easier to inspect afterward.
- 13-axisFlat plates, pockets, holes, one or two setups.
- 24-axisShafts, connectors, parts with features on four sides.
- 35-axisImpellers, medical implants, deep 3D contours, undercut walls.
Tools, materials and what changes between them
Tool choice follows material and feature size. Carbide end mills cover most work. Aluminium 6061, 7075 and 6082 cut fast with two or three flutes and plenty of chip room. Stainless 304 and 316L work-harden, so we keep the cutter moving, use four flutes, and never let it rub. Titanium Ti-6Al-4V and Inconel need low surface speed, high-pressure coolant and sharp edges, because heat stays in the cut instead of leaving with the chip.
Tool changes are automatic on a machine with an ATC. The controller reads an M06 with a tool number, the spindle orients, the arm swaps the holder, and the next length offset is applied. The risk is not the swap itself. It is a chip on the taper or a worn pull stud, which shows up as runout and then as a size drift on the part.
Coolant does more than cool. It clears chips, controls thermal growth and lubricates the contact. Through-spindle coolant reaches the cutting edge in deep pockets where flood coolant never arrives. For plastics such as POM and PEEK we often run air blast instead, because coolant can cause stress cracking or leave residue in a medical part.
Materials we run regularly include aluminium 6061-T6 and 7075, stainless 303 and 17-4PH, steel 1045 and 4140, brass C36000, copper C110, titanium TC4, and engineering plastics from ABS to PEEK. Each one has its own feed and speed window, and each one has a finishing recipe.
- 1AluminiumHigh rpm, high feed, air or mist; watch for built-up edge on soft 6061.
- 2StainlessModerate speed, constant engagement, flood coolant, sharp tools.
- 3Titanium and InconelLow speed, high pressure coolant, light radial cuts, no dwell.
- 4PlasticsSharp single-flute cutters, air blast, clamp lightly to avoid stress marks.
Why precision drifts, and how to bring it back
When a CNC machine loses precision, the cause is usually one of four things: thermal growth, tool wear, fixture movement, or a mechanical fault in the axis. Thermal growth shows up as a slow size change over the first hour of running. Let the spindle warm up for 15–20 minutes and re-check the first offset. On long runs, keep the shop temperature steady.
Tool wear is gradual and easy to miss. A worn carbide edge rubs instead of cutting, so surface finish drops from Ra 0.8–1.6 μm toward Ra 3.2 μm and the size creeps. Track tool life by cutting time or by part count, and replace before the finish tells you. For tight work we re-measure the tool with a presetter rather than trusting the original offset.
Fixture movement is a setup problem, not a machine problem. Clamp a thin wall too hard and it springs back after unclamping. Use soft jaws, torque the clamps in a fixed order, and check the part after unclamping, not only while it is held. This is where most out-of-tolerance calls actually come from.
Mechanical faults are the last thing to suspect and the most expensive to ignore. Backlash on a worn ball screw, a chipped linear guide or a loose coupling will show a repeatable error in one direction. A ballbar test or a simple circular interpolation test will point to the axis. Until that is fixed, no amount of program tuning will help.
- 1Warm up15–20 minutes of spindle run before the first tight cut.
- 2Track tool lifeLog cutting time per tool; replace before finish degrades.
- 3Check after unclampingA part measured in the fixture can still spring when released.
- 4Test the axisBallbar or circular test isolates backlash and guide wear.
Routine maintenance and how parts are checked
Daily checks are short: way lube level, air pressure, coolant concentration, chip conveyor, and a look at the spindle taper. Weekly checks cover filter condition, hydraulic pressure and a clean of the tool changer arm. Monthly work includes backlash measurement on each axis, level check on the bed, and a review of alarm history for repeat faults.
Inspection runs on three levels. Incoming material is checked against the certificate before it reaches a machine. In-process checks catch drift while there is still stock to correct. Final inspection measures the drawing dimensions and records them. We inspect 100% of parts before shipment, and reports are available on request.
For a first article we measure on a CMM and compare against the CAD model. For production runs we use gauges and fixtures that match the feature being controlled, which is faster and just as repeatable when the gauge is set from the CMM result. The goal is a number the customer can audit, not a feeling that the part looks right.
Surface finish is measured with a portable roughness tester on a witness coupon or on a non-critical face. A Ra 0.8–1.6 μm finish is a normal machined result; Ra 0.2–0.8 μm needs a finishing pass with a sharp tool and a stable setup. If a drawing calls for both a tight tolerance and a fine finish, say so early, because the process plan changes.
- 1DailyLube, air, coolant, chips, spindle taper.
- 2WeeklyFilters, hydraulics, tool changer clean and alignment check.
- 3MonthlyBacklash, level, alarm review, guide lubrication.
- 4Per jobFirst article on CMM, in-process checks, final report on request.
Step by step: from raw stock to a checked part
- 11. Check the drawing and stockConfirm material grade, datum faces and the tightest tolerance. Measure stock with calipers; leave 0.5–1.0 mm on faces that will be finished later.
- 22. Load the program and dry runRun the first article 50 mm above the stock with rapid override at 25%. Watch for tool holder collisions and for Z moves that dive below the fixture.
- 33. Set work zeroTouch off X and Y, then Z on the top face. Prove the offset with a scratch pass on a waste corner before cutting the real part.
- 44. Prove the first toolFace or spot-drill first. Check chip color and sound. Aluminium 6061 at 3,000–8,000 rpm and 1,500–4,000 mm/min is a starting range; adjust in 10% steps.
- 55. Run the roughing passKeep radial engagement at 5–10% of cutter diameter for hard materials. Leave 0.3–0.5 mm for finishing so the finish pass cuts clean metal, not a work-hardened skin.
- 66. Change tools and finishCheck each tool offset after the change. A 0.02 mm offset error shows up immediately on a finishing wall. Keep coolant on for stainless and titanium.
- 77. Measure and adjustMeasure the first part at the machine. If a dimension is off, correct the offset or the program and re-cut before releasing the run.
3-axis vs 4-axis vs 5-axis: which setup fits the part
Pick the lowest axis count that reaches every feature in tolerance.
| Setup | Typical part | Tolerance you can hold | Watch out for |
|---|---|---|---|
| 3-axis | Flat plates, brackets, housings | ±0.01 mm | Extra setups stack error |
| 3-axis + rotary table | Shafts, round flanges, connectors | ±0.01 mm | Rotary backlash on reversing cuts |
| 4-axis | Parts with four-sided features | ±0.005–0.01 mm | Fixture must clear the rotating swing |
| 5-axis simultaneous | Impellers, implants, deep contours | ±0.005 mm | Post-processor and tool-tip math |
| Mill-turn | Turned parts with milled flats | ±0.005 mm | One setup, but programming is heavier |
Pick the setup the part needs, not the one that sounds impressive
Most parts are best made on a 3-axis or 4-axis machine with a rigid fixture and a proven toolpath. Use 5-axis when the geometry truly requires it, and put the effort into work zero, tool life and inspection instead.
Questions engineers ask before releasing a job
How does a CNC machine know where the part is?
It does not know until the operator tells it. Work zero is set per job with an edge finder or a spindle probe, then stored in the work coordinate system such as G54. Every programmed move is measured from that zero.
If the zero is off, every feature is off by the same amount. That is why a scratch pass on a waste corner is worth the two minutes it costs.
What tolerance can a CNC machine actually hold?
On a stable 3-axis or 5-axis setup, ±0.005 mm is realistic for critical features when the machine is warm, the tool is fresh and the fixture is rigid.
General machined features are often quoted at ±0.01 mm. The number that matters is the one on your drawing, feature by feature.
Do I need 5-axis for my part?
Only if the part has undercut walls, deep 3D contours, or features on five faces that would otherwise need multiple setups.
A flat bracket with holes and a pocket is faster and cheaper on a 3-axis machine. More axes are not automatically better.
Why does the first part measure differently from the tenth?
Thermal growth is the usual reason. The spindle and the casting expand during the first hour of running, so sizes move by a few microns.
Warm up for 15–20 minutes, re-check the offset, then start the run. If the drift continues, check tool wear and coolant temperature.
How often should a CNC machine be serviced?
Daily and weekly operator checks cover lubrication, air, coolant and the tool changer. Monthly checks cover backlash and machine level.
A full geometry check with a ballbar or laser is normally done once or twice a year, and after any crash.
Can CNC machines cut hardened steel or titanium?
Yes, with the right tooling and parameters. Titanium Ti-6Al-4V and 17-4PH stainless are routine; hardened tool steel above 45 HRC needs carbide or CBN tooling and light cuts.
The limit is heat, not hardness. Keep the cutter moving, use high-pressure coolant, and never let the edge rub.
Send a drawing and get a process plan back
We quote and return a free DFM analysis within 12 hours, and production can start within 24 hours of approval.
12-hour quote±0.005 mm100% inspectionNo MOQ