GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Setup fundamentals

G Zero CNC Machining Guide

G zero cnc machining is the point where your drawing datum and the machine's coordinate system agree. Get it wrong by 0.02 mm and every feature on the part moves with it. This guide covers how the offset is set, how it drifts, and when probing is worth the cycle time.

G54–G59 offsetsProbe touch-off±0.005 mmØ400 mm rotary
Custom Auto Spare Parts 5 Axis CNC Machining Engine Parts
The basics

How g zero cnc machining works inside the control

When a programmer writes G54, the control does not move anything. It reads a stored set of numbers that describe where the part origin sits in machine coordinates, then applies that shift to every commanded position afterward. G zero cnc machining is the practice of filling those numbers correctly and keeping them correct for the whole run.

Every offset entry has three values: X, Y and Z. The control subtracts them from the absolute machine position to produce the coordinates the toolpath was programmed against. Change one number and the whole path translates. That is why a single fat-fingered digit in the Z field can scrap a batch before anyone notices.

The machine also carries a second layer of compensation. Tool length offsets tell the control how far each holder sticks out from the spindle gauge line. Wear offsets trim for tool diameter and edge condition. Work offsets sit on top of those, so an error in G zero compounds with every tool change.

On a three-axis mill there are six standard work coordinate systems, G54 through G59, plus extended sets on most controls. A five-axis machine adds rotary zero points and pivot distances, which describe where the trunnion or table center sits relative to the spindle. Miss those and the part swings off location as soon as the A or C axis rotates.

  • 1
    Work offsetMaps drawing datum to machine coordinates
  • 2
    Tool length offsetSets each tool tip relative to the gauge line
  • 3
    Rotary pivotLocates the table center for five-axis motion
Method choice

Touch-off, edge finder or probe: which sets g zero best

The classic method is a dial indicator or edge finder on the spindle. You jog until the tool touches a known face, read the position, and type the number into the offset page. It costs nothing beyond operator time and works on any machine. It also depends entirely on feel and patience.

A spindle probe automates the same job. The stylus touches a face or a bore, the control calculates the center or the surface, and the offset updates without the operator doing arithmetic. Repeatability on a well-maintained probe sits in the micron range, well inside the ±0.005 mm we hold on finished features. The trade is cycle time and probe calibration.

For production, the deciding factor is how many times you set the same part. One prototype on a vise: touch off by hand and move on. A 4,000 mm weldment loaded on a fixture, or a 10,000-part run that reloads every shift: probe every cycle and log the values. The setup that repeats is the setup that holds tolerance.

There is a third path worth knowing. On castings and forgings, the first cut is rarely about hitting a nominal surface. You need to find where the material actually sits so the machined walls clean up. Probing a few reference pads, then shifting g zero to center the stock, saves scrapping parts that were never going to clean up on nominal.

  • 1
    Hand touch-offBest for one-off prototypes and simple vises
  • 2
    Spindle probeBest for repeat runs and complex fixtures
  • 3
    Stock findingBest for castings and forgings with variable stock
Drift sources

Where g zero moves after you set it

Thermal growth is the quiet one. A spindle that has run for two hours is not the same length as a cold spindle. Castings and fixtures warm up too. On a tight-tolerance bore, a 2 °C shift across a 300 mm part can eat most of your tolerance band before the tool wears at all.

Backlash and lost motion show up when the axis reverses. If the control thinks it is at a position the ballscrew has not actually reached, every feature cut after that reversal shifts. On older machines this can be 0.01 mm or more. It is measurable with a dial indicator and a programmed reversal move.

Chip compaction under the part is common on vises and soft jaws. A chip the thickness of a hair under one corner tilts the whole workpiece. Ten minutes of cleaning before loading beats an hour of rework after.

Clamping forces bend thin parts. A wall machined at 0.8 mm thick can deflect under vise pressure and spring back after unclamping, leaving the g zero that looked correct on the machine moved once the part is free. Rough, unclamp, re-clamp light, then finish.

  • 1
    Thermal driftWarm spindles and fixtures shift the datum
  • 2
    BacklashAxis reversal introduces a position error
  • 3
    Chip compactionDebris under the part tilts the setup
  • 4
    Clamp deflectionThin walls move after the vise opens
Five-axis

Why rotary axes make g zero harder

On a three-axis machine, g zero is one point. On a five-axis machine it is a point plus a relationship. The rotary table has a center, the trunnion has a pivot line, and the spindle nose has a known distance from both. That geometry turns a two-axis offset problem into a kinematic model.

If the pivot distance is off by 0.05 mm, the error does not stay constant. It grows with the sine of the rotary angle. At 90 degrees of tilt you see the full error; at 10 degrees you barely notice it. This is why a five-axis machine can cut a flat face perfectly and still miss a tilted hole pattern.

Rotary axis calibration is a maintenance item, not a one-time setup. Thermal growth, a crash, or a rebuilt trunnion all move the numbers. We re-check pivot distances on a schedule and after any event that could shift geometry. Skipping that check is how a machine quietly goes out of position.

For tilted features, the practical answer is to probe the actual surface after the rotary move rather than trusting the model. A touch on the face confirms where the material is right now, in the orientation the tool will actually cut it. Model-based positioning gets you close; probing closes the last few microns.

Judgement

Choosing a g zero method by part and volume

Match the method to how many times the part reloads

SituationMethodTypical repeatabilityWatch out for
One-off prototype, simple viseHand touch-off with edge finder±0.02 mmOperator fatigue on late shifts
Repeat run, same fixtureSpindle probe, every cycle±0.005 mm or betterProbe stylus wear and calibration
Casting or forging, variable stockProbe reference pads, shift datumDepends on stock spreadNever cleaning up on nominal
Large weldment, 4,000 mmProbe multiple faces, average±0.05 mm across the bedThermal growth over long cycle
Five-axis, tilted featuresProbe after rotary move±0.01 mm at the cutPivot distance drift over time
Thin-wall partsRough, unclamp, probe, finish±0.01 mm after spring-backClamp pressure bending walls

When to probe and when to trust the setup

If the part reloads more than twice, probe every cycle. If it is a one-off on a clean vise, hand touch-off is faster and accurate enough. Anything with a rotary axis should be probed after the tilt, never assumed from the model.

FAQs

G zero cnc machining questions engineers ask

How often should work offsets be re-checked?

On a stable machine running the same fixture, a start-of-shift check is usually enough. After a crash, a spindle swap, or a long unattended run, re-check before the next part.

If the machine runs lights-out or the shop temperature swings more than a few degrees across the day, probe at the start of every cycle.

Can g zero compensate for a worn tool?

No. Work offsets and tool offsets are separate layers. Work offset moves the part origin; tool offset moves the tool tip. Wear on a cutter belongs in the wear offset column.

Mixing the two hides the real cause and makes the next setup unpredictable. Keep them separate and log both.

Why does the first article measure right and the tenth part drift?

Thermal growth is the usual answer. The spindle, the fixture and the part all warm up over the run. On a long cycle, a 2 °C shift can move a feature by more than the tolerance band on a large part.

Probing on reload, or running a warm-up cycle, brings the drift back inside the band without touching the program.

Does a probe make hand touch-off obsolete?

Not at all. For a single prototype on a three-axis mill, a probe spends more time calibrating than the job needs. Hand touch-off is fast, requires no probe hardware, and is accurate to roughly ±0.02 mm in steady hands.

Where the probe wins is repetition. The hundredth part is set as accurately as the first, with no operator judgement in the loop.

What tolerance can g zero realistically hold?

Setup accuracy and machining accuracy are not the same thing. A clean setup on a good machine can position the datum within a few microns. The finished feature then adds tool deflection, thermal drift and material behaviour on top.

We hold ±0.005 mm on finished features across 127 machines and inspect 100% before shipment. The setup is the foundation; the cutting process decides the final number.

How do you handle g zero on a 4,000 mm part?

Large parts rarely sit perfectly flat on the bed. Probing several points along the length and averaging, or picking a reference face that has already been machined, gives a more honest datum than a single corner touch.

On long cycles, re-probing between operations catches thermal movement that a single setup check would miss.

Send us your drawing and we will set the datum right

Upload a STEP file and our engineers return a quotation with free DFM analysis, a datum and fixturing note, and a process plan within 12 hours.

12-hour quote100% inspectionNDA on request

Follow

More setup notes from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC