What Is Machine Home in CNC Milling?
Machine home is the fixed zero the control trusts before any cut starts. This page explains how it is set, how it differs from work zero, and when re-homing actually changes what comes off the table. Written for engineers and buyers who need to read a setup sheet without guessing.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
Machine Home Is the Machine's Own Zero, Not Yours
Machine home is a fixed position inside the working envelope that the control can always find on its own. It is not chosen for your part. It sits at the end of each axis travel, defined by a physical reference, and every coordinate the control reports is measured from there. When the machine powers up, the control has no idea where the spindle is. It only knows where home is once each axis has been driven against its reference.
That distinction matters more than most setup sheets admit. Machine home is a property of the machine. Work zero is a property of your job. A vise mounted on a 750 × 1,150 × 550 mm table might put the corner of your blank 320 mm from the machine home in X. That offset is stored in a work coordinate system such as G54. The machine still thinks in home coordinates underneath.
So when someone asks what is machine home in CNC milling, the short answer is: it is the datum the servo system trusts after referencing. Everything else, tool length offsets, fixture offsets, rotary zero on a Ø400 mm table, is stacked on top of it.
On a 3-axis machine you get three home positions, one per linear axis. Add a trunnion or a 4th axis and the rotary axis needs its own reference, usually a switch or a hard stop the control can index against. A 5-axis center references all five before it will accept a program.
- 1Machine homeFixed by the builder, found by the control at power-up
- 2Work zeroSet by the operator for the part, stored in G54–G59
- 3Tool offsetMeasured per tool, stacked on top of work zero
Why Referencing to Home Holds Accuracy and Repeatability
Accuracy starts with knowing where the tool actually is. The control calculates tool position by counting encoder pulses from a known point. If that known point drifts, every coordinate drifts with it. Referencing to home re-establishes the count, so the same program run tomorrow lands in the same place it did today.
Repeatability is the harder number to protect. A shop running a batch of 1,000 parts does not need each one to be perfect in isolation; it needs part 1 and part 1,000 to match. Re-homing between pallets or after a tool change removes the accumulated position error that would otherwise show up as a slow drift across the run.
Thermal growth is the biggest reason home matters on long cuts. A spindle running for six hours warms the frame and the ballscrews. On a 4,000 mm machine, a few degrees of frame growth is measurable at the far end of travel. Re-referencing at a controlled temperature gives the control a fresh datum instead of one that was valid at 8 a.m.
There is a cost, though. Every reference move takes time and every axis moves to the end of its travel. On a machine with 150 tools and a long Z column, the round trip is not free. That is why many production programs reference once at the start of a shift and rely on encoder feedback for the rest of it.
How the Control Establishes Machine Home
The classic method is a hardware limit switch or a proximity sensor at the end of each axis. The control commands a slow move toward the switch. When the signal trips, the control stops, backs off, then approaches again at a crawl to find the exact edge. That double touch is what turns a switch with a few tenths of hysteresis into a repeatable datum.
On better machines the switch is only a coarse marker. The real reference is a once-per-revolution signal from the encoder or a linear scale. The control hunts for the switch, then waits for the index pulse, and only then sets home. That is how a machine can repeat home to within a few microns even though the switch itself is not that precise.
Absolute encoders change the rules. They keep their position through a power cycle, so the machine does not have to travel to find home at all. It reads the absolute value, checks it against the stored home offset, and is ready to run. This is common on 5-axis centers where moving every axis to a hard stop is slow and risky.
Battery-backed absolute encoders are the middle case. They hold position while the machine is off, but if the battery dies or the encoder is swapped, the offset is lost. The control will demand a re-reference, and until that happens it will refuse to run a program. That refusal is a feature, not a fault.
- 1Hardware switch onlyRepeatable to roughly ±0.01 mm, common on older mills
- 2Switch plus encoder indexRepeatable to a few microns, standard on modern VMCs
- 3Absolute encoderNo travel needed, position survives power-off
From Machine Home to a Cut Part: Offsets in the Chain
A program never addresses machine home directly. It addresses part coordinates, and the control does the arithmetic. The chain runs from home to work zero to tool tip. Break any link and the part is wrong, even though each individual number looked fine on screen.
Work offsets are the first link. G54 through G59 hold the distance from machine home to a chosen point on the fixture or blank. A probing cycle can set these automatically: touch the vise jaw, touch the top of the blank, and the control writes the offset. Manual edge-finding with a coax indicator does the same job with more operator skill and more risk of a fat-fingered entry.
Tool length offsets are the second link. Each tool is measured against a reference, usually the spindle gauge line or a tool presetter. If a tool is replaced mid-run and the offset is not updated, the Z depth is off by the difference. On a 0.5 mm deep pocket, a 0.2 mm offset error is a scrapped part.
Rotary and 5-axis offsets add a third layer. The pivot point of a trunnion has to be known relative to machine home. On a simultaneous 5-axis cut, an error in that pivot shows up as a taper or a mismatched blend, not as a simple shift. This is the layer where most shops lose accuracy without noticing until the CMM report comes back.
When Machine Home Is Not the Right Reference
Home is a good global datum. It is a poor local one. If you are drilling a bolt circle on a 200 mm plate, the distance from machine home to that plate is irrelevant to whether the holes are correctly spaced. What matters is the relationship between the features, and that is set by the fixture and the program.
Re-homing mid-batch is usually a mistake unless you have a reason. Every reference move adds a small chance of a switch fault, a chip on a way cover, or an operator error. If the machine has been running clean for four hours and the parts are in tolerance, leave it alone. Reference at the start of the shift, then trust the encoders.
There are cases where home is the wrong datum entirely. A part that is too long for the travel of a 3-axis machine may need to be repositioned and cut in two setups. In that case the second setup is referenced from a feature on the part, not from machine home, because the part has moved and home has not.
Large gantry machines and mill-turn centers with a 4,000 mm processing size often use a parked position rather than a true home for tool changes. The parked position is safe, not accurate. Treating it as a datum is a common and expensive misunderstanding.
- 1Use home forShift start, after a crash, after an encoder swap
- 2Do not use home forFeature-to-feature position inside a single part
- 3Use part datum forSecond setups, re-fixtured parts, repair work
Which Reference Should You Trust?
Pick the datum that matches the question you are asking.
| Reference | What it fixes | Repeatability | Best used for |
|---|---|---|---|
| Machine home | Global position of every axis | A few microns on a good VMC | Shift start, recovery after a fault |
| Work offset G54 | Distance from home to the fixture | Depends on the probe, often ±0.01 mm | Everyday production on a known fixture |
| Tool length offset | Z distance from gauge line to tip | ±0.005 mm with a presetter | Any cut that controls depth |
| Part datum | Feature-to-feature position | Set by the fixture, not the machine | Second setups and re-fixtured parts |
| Rotary pivot | Center of a trunnion or table | Microns if calibrated, worse if not | Simultaneous 5-axis work |
| Parked position | Safe spot for a tool change | Not a datum at all | Tool changes only |
The Verdict
If your problem is that the whole part has shifted, re-reference to machine home. If the part is in the right place but the features are wrong relative to each other, home will not help you. Fix the fixture, the work offset, or the tool offset instead.
Questions Engineers Ask About Machine Home
Does the machine lose its position when power is cut?
It depends on the encoder. Incremental encoders lose the count, so the control has to re-reference before it will run. Absolute encoders keep their value through a power cycle, sometimes with a battery. If the battery fails, the control will demand a re-reference and will not accept a program until it gets one.
Machines with absolute encoders still benefit from an occasional re-reference at a known temperature. It corrects slow drift that the encoder itself cannot see.
How often should a machine be re-homed during a production run?
For most jobs, once at the start of the shift is enough. The encoder feedback holds position well enough for the rest of the day. Re-reference if the machine has had a fault, a crash, an encoder swap, or a long thermal soak that you cannot otherwise explain.
On very long cuts, or on large machines where frame growth is measurable, a mid-run reference at a controlled temperature can recover accuracy at the far end of travel.
Can a wrong machine home offset cause a crash?
Yes, and it is one of the more common ways to break a tool. If the control believes home is 5 mm away from where it really is, the work offset is wrong by the same amount, and a rapid move to a clearance plane can become a rapid move into the vise.
The safeguard is the reference routine itself. A double-touch approach and a sanity check against the stored offset catch most faults before a program runs.
Is machine home the same as the G28 position?
Not exactly. G28 is a command that sends an axis to a stored reference point, which is usually machine home. But the stored point can be changed on some controls, and G28 can be given an intermediate point to pass through on the way.
Treat G28 as a move to home, not as a definition of home. The definition comes from the switch and encoder, not from the G-code.
What tolerance can a shop hold if home is set correctly?
Home setting is one input among many. A well-maintained VMC with a switch plus encoder index can repeat home to a few microns. That supports a general machining tolerance of ±0.005 mm on the right features, with a surface finish of Ra 0.8–1.6 μm as a normal machined result.
The tolerance you get on the part also depends on the fixture, the tool, the material, and the thermal state of the machine. Home is necessary but not sufficient.
Do 5-axis machines reference differently from 3-axis machines?
They have more axes to reference and a rotary pivot to calibrate. The two linear axes and the spindle behave much like a 3-axis machine. The trunnion or table axes need their own reference, and the pivot point has to be known relative to machine home.
On a simultaneous 5-axis cut, an error in the pivot shows up as a taper or a poor blend between passes. That is why 5-axis setups are usually validated with a test cut before a production run.
Send Us the Drawing, We Will Handle the Datum
Upload your CAD files and we will return a quotation with a free DFM analysis within 12 hours. Every part ships after 100% inspection, with reports on request.
12-hour quote100% inspectionNo minimum orderNDA on request