Explainer
Why an encoder Z index alone cannot home a servo axis
Short answer
The Z index on an incremental encoder recurs once every shaft revolution, so on any axis that travels through several revolutions it cannot identify the machine's home by itself. Home such an axis with a switch to select the region plus the index to refine it, or with the switch alone when its repeatability meets tolerance; index-only homing works only when a single index event lies in the travel.

On this page
An incremental encoder with A, B and Z channels reports how far and which way a servo motor has turned since power-up, and nothing about where the machine is. The Z index is one pulse per shaft revolution: a repeatable mark on the encoder, not on the machine. On any axis whose travel spans several motor revolutions, that same Z event appears at many different physical positions, so a search that chases the index alone cannot establish a home. The decision: use a home switch to select the region and the index to refine it when the controller supports that sequence, the switch alone when its measured repeatability meets the machine tolerance, and the index alone only when the travel contains a single index event. A first-order stopping-distance check confirms the search will stop before anything rigid.
What the three channels report #
An incremental encoder is a rotary or linear device with two outputs, A and B, that issue pulses whenever it moves; the phase offset between the two gives direction, and the count gives distance. The Z channel — encoder documentation also calls it the zero or index channel — delivers a single pulse per shaft revolution. That pulse is a reference for the encoder itself: once every turn, the controller can true its position count to a fixed angular mark. It is not a reference for the machine, because the encoder is blind to everything between its shaft and the workpiece — gear teeth, belt stretch, coupling wind-up, and the count that vanishes at every power-off. Homing is the step that ties the two together: it moves the axis to something physically mounted on the machine and declares that point the coordinate origin.
Why the index cannot pick the home #
Because the index recurs once per revolution, a multi-revolution axis meets it many times across the stroke. A screw-driven slide with a 5 mm lead and the motor coupled one-to-one covers 200 mm ÷ 5 mm per revolution = 40 revolutions over a 200 mm stroke, so the controller sees 40 identical Z events at 40 different physical positions. A search that simply latches "the index" stops at whichever of those 40 the approach reaches first, and that depends on where the axis started. The index still earns its place, though: it repeats to the encoder's resolution instead of a switch's hysteresis band, so once a switch has identified the home region, the index sharpens the reference.
Three reference methods #
| Method | Reference the controller accepts | Strength | Limit |
|---|---|---|---|
| Home switch only | A defined switch edge | Needs no index signal at the controller | Repeatability bound by switch hysteresis, input filtering and approach direction |
| Index only | A captured Z event | Repeats to encoder resolution | Cannot resolve which revolution is home on multi-revolution travel |
| Switch plus index | The first Z event after the switch condition | Machine location plus encoder-grade repeatability | Controller must support the sequence and receive both signals |
Select the method in the motion controller that commands the servo axis — the drive executes the moves, the controller sequences the search — and identify that controller before changing anything on the drive.
Which method to choose #
Commit by case:
- Multi-revolution axis with a controller that offers switch-plus-index homing: take it. The switch selects the region, the index refines the reference to encoder resolution.
- No index available at the controller: home on the switch alone. The encoder cable from motor to drive does not automatically deliver Z to the controller. Read the drive and controller connection diagrams for the documented feedback outputs and reference inputs, and match the electrical interfaces. If the drive counts the encoder but the search never latches the index, signal access and capture setup are the causes, worked through in why a servo origin search misses the encoder Z phase.
- Travel spans less than one encoder revolution: the index alone is unambiguous, because only one Z event exists in the stroke. Approaching from a fixed side every time keeps it that way.
One habit to check before running anything: after the reference is latched, the controller decelerates, assigns coordinates and may move to a home offset, so the final resting position is often not the capture point. Read the documented sequence before treating motion after the switch edge as a fault.
Stopping distance for a 100 mm/s search at 500 mm/s² #
Whether the search stops in time is a first-order calculation. The inputs below are example values for a typical slide — none is a catalog rating — so replace each with your machine's own:
- Search speed v = 100 mm/s, an example commissioning speed.
- Deceleration a = 500 mm/s², an example drive setting.
- Detection and command delay t = 10 ms, an example covering input filter, controller scan and drive response before deceleration starts.
- Clear travel beyond the switch trip point: 20 mm, an example dimension from the machine layout.
The rule, in words: under constant deceleration, stopping distance equals the search speed squared divided by twice the deceleration, and the delay adds speed multiplied by delay time.
d = v² / (2a) = (100 mm/s)² / (2 × 500 mm/s²) = 10,000 mm²/s² ÷ 1,000 mm/s² = 10 mm
Delay travel = v × t = 100 mm/s × 0.010 s = 1 mm
Total = 10 mm + 1 mm = 11 mm
This search needs 11 mm of travel beyond the point where the switch trips — a calculated example for these inputs, not a measured stop. With 20 mm of clear travel it fits with 9 mm to spare. Below 11 mm of clearance, do not raise the deceleration blindly; halve the speed instead: at 50 mm/s the same arithmetic gives 2.5 mm + 0.5 mm = 3 mm, which fits almost any corner of a machine. Commission on the measured stop, not the estimate — torque-limited and S-curve profiles run longer than constant deceleration predicts, and an axis that coasts far past its calculated stop is the pattern behind why a servo axis keeps moving past the home sensor.
Signals, switches and the first search #
Match the switch's active state to the circuit you actually built; a normally open contact is one of two wiring choices, not a homing requirement. Keep the functions apart as well: a travel limit bounds motion, a home switch marks a reference, and a mechanical hard stop serves as a home reference only where the equipment explicitly supports torque-limited stop detection and the machine is built for the repeated forces.
Run the first searches at reduced speed with the travel physically clear and under the machine's risk assessment — ISO 12100 is the general method — because commissioning motion is not safeguarded production motion. Start every test from a clear, known position and stop it the moment the motion departs from the configured sequence: switch edge, any back-off, index capture, deceleration, offset move.
Proving capture and repeatability #
Prove the index with the controller's latch or capture function, which holds the event after it passes; a plain input-status display will not catch it. Then test repeatability, not just completion.
After each home, record the controller coordinate and the physical position against a fixed datum — a dial indicator or a laser distance head is enough. Run at least ten cycles from both ends of the travel, plus one start already sitting on the home switch if the method allows it. The spread of the physical positions is the homing repeatability, and it must fit inside the machine's position tolerance; if it does not, correct the switch mounting, hysteresis or approach direction before touching the home offset. If the coordinate repeats for months while the physical point drifts, the homing setup is fine and something between encoder and load has moved — the mechanism behind why a servo axis returns 4 degrees off home after years. An axis that passes these tests is done: the switch for location, the index for resolution, the measured stop for clearance.
Questions asked
How do I count the index events in my axis travel?
Divide the stroke by the distance one motor revolution produces, which is the screw lead multiplied by any gear ratio. A 5 mm lead screw driven one-to-one gives one index event every 5 mm, so even a 40 mm stroke sees eight of them, and only a stroke under one revolution carries a single event. That is why short-travel rotary axes, not linear slides, are the realistic case for index-only homing.
Why won't the index pulse show up on a status display?
The pulse covers only a small slice of one encoder period, so at typical search speed it lasts well under a millisecond, while a status display refreshes every few tens of milliseconds — the odds of catching it on screen are near zero. Use the controller's capture latch, which holds the event until read, or scope the Z line while jogging the axis slowly.
Does the home switch have to be normally open?
No. The contact arrangement is a wiring choice, and either works as long as the controller's active-state setting matches the circuit you built, verified on both entry into and exit from the home region. A normally closed contact adds wire-break detection only when the circuit is designed to treat an open line as a distinct state, which a plain home input does not do by itself.
Can one switch serve as both the travel limit and the home reference?
Only when the controller explicitly supports sharing and the limit function keeps its full protection even if a home search fails. The jobs differ: a limit must stop motion under all conditions, while a home switch only marks a reference. Sharing also routes every home cycle into the end of travel, so the stopping-distance margin at that corner is spent on every single search.


