Advanced CNC Machine Tool Programming Terminology You Need to Learn
This page explains five terms that decide whether a program runs or scraps a part: work coordinate systems, tool length and diameter offsets, cutter compensation, feed per tooth, and modal G-code state. It is written for engineers and buyers who read CAM output and machine setup sheets, not for operators learning G54 for the first time. After reading it you can sit in a DFM review and judge which tolerances and features actually depend on the cnc machine tool programming choices behind them.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
Work Coordinate Systems: Where cnc machine tool programming Sets Zero
A work coordinate system, usually written G54 through G59, is the offset between machine zero and the point the programmer calls X0 Y0 Z0. Machine zero never moves. It is a fixed reference on the table or spindle. The work offset is what the setup person dials in with an edge finder or probe, and it is the only reason the same program can run on two different machines.
Most shop-floor mistakes blamed on the operator trace back here. If the offset is set 0.05 mm off in X, every feature in that setup shifts 0.05 mm. A bolt circle that looked fine in CAM is now out of position tolerance. This is why first-article inspection happens before a run, not after.
The practical rule: features that must stay concentric should be machined in one setup whenever the part allows it. Flipping a part to a second work offset adds the error of both setups. For a housing with a bore and a mating face, holding both in G54 with a 5-axis orientation beats two fixtures in G54 and G55.
On our machines, work offsets are probed and stored per job, and the setup sheet records the offset values used. If you are reviewing a quote, ask whether tight position calls will be held in one setup. It changes fixture cost and lead time more than the tolerance number itself.
Tool Length and Diameter Offsets in cnc machine tool programming
Tool length offset (H) tells the control how far the tool tip sits from the spindle gauge line. Diameter offset (D) tells it how wide the tool cuts. Both live in the offset table, not in the program geometry. A program calling T12 H12 D12 is only as accurate as the numbers in that row.
Length offsets matter most in Z. A 0.02 mm error shows up as a wrong depth on every pocket that tool cuts. Diameter offsets matter in X and Y, and they decide whether a slot comes out on size or 0.1 mm wide. When a shop reuses a tool between jobs, the offset table is rewritten, and a stale number left from the previous job is a common scrap cause.
There is a real boundary here. On a 5-axis machine with a long tool holder, thermal growth and spindle expansion add error that a static offset cannot capture. For work held to ±0.005 mm, we probe tool length on the machine and re-check after warm-up. Parts measured cold against a cold machine can still drift once the spindle reaches working temperature.
If you are buying machined parts, this is worth one question: does the supplier measure tools on the machine or off-line? On-machine probing with periodic re-checks is the safer answer for tight work. Off-line presetting is fine for loose tolerances and high volume, where the cycle repeats and drift is predictable.
Cutter Compensation and What It Does to Your Print
Cutter compensation, G41 for left and G42 for right, lets the programmer program the finished part profile and let the control offset the path by the tool radius. Change the tool or its wear, and you adjust the D value instead of rewriting geometry. That is the whole point of it.
It also gives you a lever on size. If a bore machines 0.03 mm small, the operator can add 0.03 mm to the diameter offset and rerun the finish pass. No CAM edit, no new program. This is normal practice and it is why a supplier can hold a tight bore without a program change.
The limits are real. Cutter comp cannot fix a tool that is out of round, and it will not rescue a holder with excessive runout. On a 3 mm end mill, 0.01 mm of runout is a large fraction of the radius, and no offset value compensates for it. Tool condition comes first.
Another boundary: comp on a finish pass with a small lead-in can leave a mark at the entry point. Programmers who care about surface finish ramp in on an arc rather than a straight line. If a print calls out Ra 0.8–1.6 μm on a sealing face, ask how the lead-in was handled. It is a small detail that shows up in the part.
Feed per Tooth, Chip Load, and Why Surface Speed Is Not Enough
Feed per tooth, written fz, is the chip thickness each cutting edge removes per revolution. It is the number that actually controls tool life. Spindle speed alone tells you nothing about load. A 12 mm cutter at 8,000 rpm with 0.02 mm per tooth is a light cut; the same speed at 0.15 mm per tooth is a roughing pass that will break a small tool.
The formula is simple: feed rate equals fz times number of teeth times rpm. What is not simple is choosing fz. It depends on material, cutter diameter, radial depth of cut, and rigidity. Aluminum 6061 tolerates far higher fz than 316 stainless or Inconel. Titanium TC4 sits in between and punishes chatter.
This is where a supplier's experience shows. For a given feature, a programmer picks an axial and radial depth of cut first, then sets fz to keep the load steady. Adaptive toolpaths hold a constant chip load through corners, which is why they extend tool life on deep pockets.
When you review a quote, note that deep pockets and thin walls cost more for this reason, not because of the material alone. A 0.8 mm wall in aluminum needs reduced radial engagement and extra passes. That is a feed-and-load decision, and it is a fair question to ask a supplier to explain.
Modal G-Code State and Why Program Order Matters
Modal means a code stays active until it is changed or cancelled. G90 absolute and G91 incremental are modal. So are G20/G21 units, G17/G18/G19 planes, and feed mode G94/G95. Once set, they persist block after block.
That is convenient and dangerous. If a program sets G91 incremental and never returns to G90, every following move is relative, and the part is ruined in seconds. The same applies to plane selection: a G18 XZ plane left active makes a G2 arc behave in an unexpected way on the next feature.
Good cnc machine tool programming practice is to make state explicit at the top of each tool block. Reset units, reset absolute mode, restate the plane, and call the work offset. It costs four lines and removes a whole class of crashes.
At the control level, this is also a safety question. Modern controllers track modal state and many will alarm on an unsafe transition. Older ones will not. When a shop runs mixed generations of machines, explicit state is not optional, it is how you keep the same program portable across the floor.
For a buyer, the takeaway is about consistency. If the same part is made on two machines, the program should behave the same way on both. Explicit modal state is a large part of why that happens.
Five Terms Compared: What Each One Controls
Quick reference for the terms above
| Term | What it controls | Typical error if wrong | Fixed by |
|---|---|---|---|
| Work coordinate system | Position of X0 Y0 Z0 per setup | 0.02–0.05 mm shift on all features | Probing, one-setup design |
| Tool length offset (H) | Z depth from spindle gauge line | Wrong pocket depth, broken tool | On-machine tool probing |
| Diameter offset (D) | Cut width in X and Y | Slot or bore off size by 0.05 mm | Offset tweak, tool check |
| Feed per tooth (fz) | Chip load and tool life | Chatter, poor finish, tool breakage | Correct fz for material |
| Modal state | Units, mode, plane, feed mode | Crashes, mirrored or wrong moves | Explicit reset per tool block |
When Terminology Actually Changes the Quote
If your part has tight position or concentricity calls, push for one-setup machining and on-machine probing; that is where cnc machine tool programming choices decide the result. If tolerances are loose and geometry is simple, standard offsets and off-line presetting keep cost down and are the right call. Choose based on the print, not on machine count.
Common Questions
Do I need to understand G-code to review a machining quote?
Not line by line. You need to know which features depend on setup choice and which depend on tool condition. Position and concentricity depend on setup. Surface finish and slot width depend on tool condition and feed.
If a quote flags a tight bore or a thin wall as a cost driver, that is a good sign. It means the supplier read the print.
What does ±0.005 mm actually require in programming terms?
It requires on-machine probing, a controlled temperature environment, and a finish pass that is separate from the roughing pass. Cutter comp is used to bring the feature to size without editing geometry.
It also requires that critical features be machined in one setup where possible. Two setups stack two sets of errors.
Is cutter compensation always used on finishing passes?
On profile and bore finishing, usually yes. It gives the operator a size adjustment without a CAM edit. On simple slots and roughing, it is often left off.
It does not fix tool runout or a worn cutter. Those have to be solved before the offset value means anything.
Why do deep pockets cost more than shallow ones?
Deep pockets need longer tools, lower radial engagement, and more passes to keep chip load steady. Tool deflection grows with length, so the programmer reduces feed per tooth and adds semi-finish passes.
The material removal rate drops, and the machine time goes up. That is the cost, not the material itself.
Can the same program run on a 3-axis and a 5-axis machine?
Only if the part can be reached in three axes. A 5-axis program uses orientation moves that a 3-axis machine cannot execute.
What does carry over is the modal state discipline and the offset structure. That is why explicit state at the top of each tool block matters across a mixed machine floor.
What is the most common programming error that ruins a part?
A stale tool offset left from a previous job. It is invisible until the first cut, and it affects every feature that tool touches.
The second most common is a modal state carried over from an earlier block, usually units or incremental mode. Both are setup and program order problems, not geometry problems.
Send Us the Print and We Will Flag the Risk
Upload your drawings and we will return a quote plus a free DFM analysis within 12 hours, with the setup and tolerance calls that drive cost marked on the part.
12-hour quote100% inspectionNo MOQNDA on request