An encoder failure doesn't announce itself with a single clear alarm — it creeps in. Position drift of a few microns. A following error that only happens on hot days. A machine that homes to a slightly different position each morning. By the time the control throws a hard alarm, you've probably been chasing an intermittent fault for weeks.
Here's how to diagnose encoder problems properly and replace only what's actually failed — the encoder, the cable, or something else entirely.
What an Encoder Does (and Why It Matters)
The encoder is the feedback device that tells the CNC control exactly where each axis is. Without accurate encoder feedback, the control has no idea whether the tool is at X=100.000mm or X=100.050mm. There are two main types on CNC machines:
| Type | How It Works | Common On |
|---|---|---|
| Incremental | Outputs pulses as the shaft rotates. The control counts pulses from a reference (home) position. Loses position on power-down. | Older Fanuc (OT, OM), Mitsubishi Meldas |
| Absolute | Outputs a unique digital code for every shaft position. Remembers position even without power. | Modern Fanuc (Alpha i), Siemens Sinamics, Heidenhain |
Absolute encoders need a backup battery to retain position when the machine is off. If the battery dies, the encoder forgets where it is and you'll get an "absolute position lost" alarm on power-up. Replace the battery and re-reference — it's not an encoder failure.
⚠️ Safety
- Power down at the main isolator before disconnecting any encoder cable. Hot-swapping an encoder can destroy the drive's encoder input circuit
- Never disconnect an encoder cable with the servo drive enabled. The drive will see a sudden loss of feedback and may run away
- Encoder alignment is critical. On some machines, removing the encoder from the motor requires a realignment procedure with an oscilloscope. If you're not set up for this, replace the motor+encoder as a unit
- Static discharge can destroy encoder electronics. Ground yourself before handling any encoder circuit board
Is It the Encoder, the Cable, or the Drive?
Encoder faults, cable faults, and drive feedback-circuit faults produce nearly identical symptoms. Before ordering a replacement encoder (which might not fix the problem), isolate the fault:
Symptom → Likely Cause
| Symptom | Encoder Fault | Cable Fault | Drive Fault |
|---|---|---|---|
| Position drifts slowly over minutes/hours | Possible — failing LED in encoder | Unlikely | Possible — failing feedback circuit |
| Sudden position jump or spike | Unlikely | Likely — intermittent connection | Unlikely |
| Following error on one axis, reproducible | Possible | Possible | Possible |
| Alarm only when axis moves fast | Unlikely | Likely — vibration-induced contact break | Unlikely |
| Alarm on power-up, before moving | Possible | Possible | Possible |
| Alarm after coolant splash or cleaning | Unlikely | Likely — water in connector | Unlikely |
| Multiple axes fail simultaneously | Unlikely | Unlikely | Likely — PSU or drive rack problem |
The Cable Swap Test
If your machine has two identical axes (e.g. X and Y with the same servo drive type), you can isolate whether the fault is in the drive or downstream. Power off at the main isolator first.
At the drive end, swap BOTH cables between the two axes — the encoder feedback cable AND the motor power cable. You must swap both together. If you swap only the encoder cable, the X drive will still power the X motor but will now read the Y encoder — the mismatch will cause a violent axis jerk when the servos enable. Swapping both cables together makes the X drive fully control the Y motor+encoder and vice versa.
After the swap:
- Power up the control but do NOT enable the servos — keep the E-stop in or leave the drives disabled
- Check the drive displays. Did the alarm code move to the other drive channel?
- If the alarm moved → the fault is in the cable or motor (downstream of the drive)
- If the alarm stayed on the same drive channel → the drive itself is faulty
To test under power (e.g. to confirm a cable fault by seeing the axis move smoothly after the swap), you'll need to temporarily re-assign the axis parameters in the CNC control so it commands the correct drive channel. This is a parameter-level change — consult your machine's maintenance manual. For most diagnostic purposes, the static swap test above is sufficient.
This is the single most valuable diagnostic step for encoder-related faults, and it takes about 15 minutes.
The Connector Inspection
Unplug the encoder connector at both ends. Look for:
- Green or white corrosion on pins — water ingress. Clean with contact cleaner, dry thoroughly, replace the connector seal
- Bent or pushed-back pins — won't make contact. Straighten carefully with fine tweezers
- Cracked connector body — replace the connector or cable assembly
- Coolant residue — the connector wasn't sealed properly. Clean and re-seat with a new O-ring
💡 Encoder cables fail far more often than encoders themselves. They live inside cable chains, flex millions of times, and get showered in coolant. If you're seeing an intermittent encoder alarm, replace the cable first — it's a fraction of the cost of an encoder and cables are consumable items.
Encoder-Specific Diagnostics
Fanuc Alpha / Alpha i Absolute Encoders
Fanuc Alpha series motors use absolute pulse coders. Common failures:
| Alarm | Meaning | What to Do |
|---|---|---|
| APC 0300–0309 | Absolute position lost — axis N | Battery died or encoder memory corrupted. Replace battery, re-reference. If it recurs, encoder is failing. |
| APC Alarm: DTERR | Serial data transmission error | Almost always a cable fault. Check the encoder cable for breaks and connector corrosion. |
| DGN 300–309 (Position Error) | Following error on axis N | Check the encoder mechanical coupling isn't slipping. Check motor power cable too — a dead phase looks like encoder failure. |
Siemens / Heidenhain
Heidenhain encoders are typically robust but sensitive to contamination:
| Symptom | Likely Cause |
|---|---|
| "Encoder contamination" alarm | The glass scale inside the encoder is dirty. On a rotary encoder this means seal failure — replace the encoder. Do not try to open it outside a cleanroom. |
| Signal amplitude low | LED ageing or scale contamination. On a linear scale, clean the scale and reader head. On a rotary encoder, replace it. |
| Z-channel (reference mark) not found | The reference mark track on the encoder disc is damaged or contaminated. Replace the encoder. |
Mitsubishi MDS Encoders
Mitsubishi servo encoders communicate serially. The most common failures:
| Code | Meaning | First Check |
|---|---|---|
| AL-16 | Encoder error — communication failure | Check cable continuity, especially the shield. Mitsubishi encoder cables are sensitive to EMI — make sure the shield is connected at the drive end only |
| AL-20 | Encoder error — data error | Check the 5V supply to the encoder at the encoder connector. Below 4.75V = wiring problem or failing drive PSU |
Replacing an Encoder
If diagnosis points to the encoder itself, here's the safe approach:
1. Match the encoder exactly. The part number must match. An encoder with the same pulse count but different commutation signals will cause the drive to fault or the motor to run away.
2. Mark the position. On incremental encoders, mark the encoder body and shaft position relative to the motor housing before removal. You'll need to realign the reference mark after replacement.
3. Beware of the coupling. Many encoders use a precision coupling to the motor shaft. If the coupling is damaged, a new encoder will fail prematurely from radial load.
4. Realignment may be required. On Fanuc motors, the encoder must be aligned to the motor's magnetic poles. This requires a specific procedure — consult the motor maintenance manual.
⚡ If you're not experienced with encoder alignment, consider replacing the motor as a complete unit with a pre-aligned encoder. The cost difference is often less than the downtime from a misaligned encoder causing the drive to fault or run away.
Encoders and Cables We Stock
| Part | Type | Price |
|---|---|---|
| Fanuc A860-2020-T301 Servo Encoder | Absolute pulse coder, Fanuc Alpha series | £549 → |
| Substitute Fanuc Encoder (A20B-2003-0311) | Replacement for older Fanuc red-cap encoders | £195 → |
| Mitsubishi OSA18-100 (refurbished) | Mitsubishi MDS series servo encoder | £212.85 → |
| Mitsubishi OSA18-130 (refurbished) | Mitsubishi MDS series servo encoder | £212.85 → |
| Heidenhain ROD 420 295466-51 | Rotary encoder, Heidenhain/TNC controls | £368.75 → |
| Siemens Encoder Cable, 5m | SINAMICS S120 series | £96 → |
| Fanuc Encoder Cable, 3m | JYA2 motor/spindle feedback | £47.95 → |
Browse all encoders → and encoder cables →.
When It's Not the Encoder At All
Before ordering an encoder, rule out these common imposters:
- Mechanical backlash in the ballscrew or coupling — looks like position drift but the encoder is reporting correctly. The axis physically isn't where it should be
- Dead motor phase — the drive commands movement but the motor can't deliver torque. The encoder reports the position error correctly — it's the motor or drive, not the feedback
- EMI from a VFD or spindle drive — induced noise on the encoder cable causes data errors. Reroute encoder cables away from motor power cables and VFD output cables. Minimum 100mm separation
- Bad servo drive tuning — high following errors can be caused by incorrect servo gains, not encoder failure