How Does a CNC Machine Home Out?
Homing is the machine finding its own reference point after power-up. This guide walks through the sequence, the switch types behind it, and what to check when an axis will not reference. Written for engineers and buyers who need to know how the datum gets set before the first cut.

Key takeaways
Why a CNC Machine Home Out Cycle Comes Before Every Job
The control knows it has motors and drives. It does not know where the table or spindle physically sits. Machine coordinates and the real world are unlinked until the CNC machine homes out. Until that link exists, a move command is a guess. The machine can drive a tool into a vise or run past a travel limit.
Homing builds a fixed reference for every linear and rotary axis. The control drives each axis to a known point, reads the switch or encoder mark, and writes that point into machine coordinates. Every program, work offset, and tool length then hangs off that same point.
This matters for batch work. If the reference drifts between power-ups, part one and part two thousand are cut from different datums. On a 5-axis job with a ±0.005 mm tolerance, that drift shows up as a step between setups. Homing is what keeps the datum repeatable.
A machine that will not reference cleanly is a machine you cannot trust for the shift. Treat a reference alarm as a stop-work signal, not a nuisance to clear and forget.
How a CNC Machine Home Out Sequence Runs, Axis by Axis
Homing starts on power-up or from the operator pressing Home All Axes or Reference Return. The control picks a fixed order. Z normally moves first, lifting the spindle clear of the work area. X and Y follow, then any rotary axis. The order exists for safety, and most builders lock it into the ladder logic.
Each axis runs two stages. First a fast move in the positive direction until it trips the home switch or reads the encoder reference mark. That is a coarse position cue only. Then the axis backs off and re-approaches at a slow, fixed feed, often 10 to 50 mm/min on a VMC. The slow pass is what makes the point repeatable.
Once the switch triggers on the slow pass, the control latches the position and applies the grid shift, sometimes called the reference offset. That offset is the gap between the switch edge and the true machine zero. It lives in a parameter and is set at the factory or after a rebuild.
Some controls then move the axis to a secondary home position, a few millimeters off the switch. This prevents the axis from sitting on the switch for long periods, which wears the plunger and invites false triggers.
Switches, Dogs, and Encoders: What Sets the Reference
Most machines use a proximity switch or a mechanical limit switch on each axis. A trip dog, a small block bolted to the moving member, passes the switch and triggers it. The switch position sets the coarse reference. The grid shift parameter sets the fine one.
Incremental encoders lose position when power drops, so they need the full switch-finding cycle every time. Absolute encoders keep their count through power-off, usually with a battery or a multi-turn backup. On those machines, homing is often just a confirmation move, or none at all.
A third option is the encoder Z-phase mark. Some controls ignore the switch edge and latch on the first encoder index pulse after the switch triggers. That gives a finer, more repeatable point than the switch alone, and it is common on high-accuracy mills.
Whichever hardware is fitted, the reference is only as good as its mounting. A loose dog, a chipped switch face, or a cable with a bad shield will show up as a position that repeats to 0.01 mm one day and 0.05 mm the next.
Step by Step: How to Home a CNC Machine Safely
Run these in order. Stop at any alarm and fix the cause before continuing.
- 1Clear the work envelopeRemove clamps, wrenches, and loose stock from the table. Check that the tool is clear of the vise and any fixture. A homing move is a full-travel move, so anything in the path gets hit.
- 2Confirm the door and E-stop stateClose the enclosure door and release the E-stop. Many controls block reference return while the door is open. Check that no axis is already sitting on a hard limit, or the move may fault on the first pass.
- 3Select Reference Return and pick the modePress Home All Axes for a full cycle. For a single axis, use the jog handle to select Z, then X, then Y. Keep the feed override at 100 percent. Dropping it below 50 percent can make the slow pass too slow to trip the switch cleanly.
- 4Watch the Z axis retract firstZ should lift to the top of its travel. If it moves down instead, stop and check the parameter for homing direction. A reversed direction parameter is a common cause of a crash on the first setup.
- 5Let X and Y find their switchesEach axis moves positive, trips the switch, backs off, and re-approaches slowly. Listen for a clean single click or a steady LED. A chattering switch or a double trigger usually means chips on the dog.
- 6Verify the reference positionRead the machine coordinate display. X, Y, and Z should read the values the builder lists in the manual, often zero or a fixed number. Write them down. If they differ from the last run, the grid shift or the dog has moved.
- 7Re-home and compareRun the cycle a second time without moving the axes. The final numbers should match the first run. A difference above 0.01 mm points to a switch or encoder problem that will show up in your parts.
- 8Set work offsets after homingOnly after a clean reference should you touch off tools and set G54. Homing first means every offset is measured against the same machine zero.
Reference Hardware Compared
Pick the column that matches the machine on your floor.
| Reference type | Repeatability | Needs a move at power-up | Typical use |
|---|---|---|---|
| Mechanical limit switch | 0.01–0.05 mm | Yes, full cycle | Older mills, routers, entry VMCs |
| Proximity switch plus dog | 0.005–0.02 mm | Yes, full cycle | Most 3-axis and 4-axis VMCs |
| Switch plus encoder Z-phase | 0.001–0.005 mm | Yes, slow pass only | High-accuracy mills, 5-axis |
| Absolute encoder with backup | 0.001 mm or better | No, confirmation only | 5-axis centers, mill-turn, automation cells |
Homing Is a Check, Not a Formality
If the reference position moves between cycles, stop and fix the switch or grid shift before you cut. A machine that homes cleanly is the only one that can hold a datum across a batch.
Common Questions About CNC Machine Home Out Cycles
Does a CNC machine have to home out every time it is powered on?
On a machine with incremental encoders, yes. The control loses its position when power drops, so it must re-find the reference.
On a machine with absolute encoders and a working backup, no full cycle is needed. The control reads the stored position and may only ask for a confirmation move. If the backup battery is low, the machine will demand a full reference return.
Why does the Z axis home first?
Z is homed first so the spindle retracts and the tool clears the vise, fixture, and stock before X or Y travel.
If X or Y moved first with the tool still low, a long rapid could drag the tool through a clamp. Most builders hard-code the order in the ladder logic so an operator cannot change it easily.
What causes a reference return alarm on one axis?
The three most common causes are a switch that never triggers, a switch that is already triggered at the start, and a grid shift value that no longer matches the hardware.
Check for chips or coolant on the dog and switch face first. Then verify the switch LED changes state by hand. Finally compare the grid shift parameter against the machine manual or the last setup sheet.
How repeatable is homing on a typical VMC?
A proximity switch with a slow second pass usually repeats to 0.005–0.02 mm. Adding the encoder Z-phase mark tightens that to about 0.001–0.005 mm.
That repeatability is the floor for your work offsets. If homing repeats to 0.02 mm, do not expect a ±0.005 mm feature to hold across a power cycle without re-probing.
Can I skip homing if I never turn the machine off?
If the machine stays powered and no axis is moved by hand, the reference stays valid. Many shops run this way through a shift.
The risk is a servo alarm, an E-stop, or a bumped axis. Any of those can drop the reference. Re-home before the next job rather than trusting a position you cannot verify.
Does homing affect the accuracy of the parts I receive?
Yes. The machine zero set by homing is the base for every work offset and tool length. If it drifts, the whole setup shifts with it.
At GreatLight we home and verify reference position before each run, then inspect 100 percent of parts before shipment. That is how a ±0.005 mm tolerance stays meaningful across a batch.
Need Parts Cut on Machines That Home Clean
Send your drawings and we will return a quote with free DFM analysis within 12 hours.
12-hour quote100% inspection±0.005 mm tolerance