Troubleshooting
Encoder Position Jumps or Drifts: High-Speed Counter Troubleshooting
The axis returns to the same spot but the count is 40 pulses different each time. Electrical noise, a wrong counter mode or mechanical slip — here is how to tell.
The symptom
A conveyor or cutting axis has an incremental encoder on a PLC high-speed counter. The count drifts over a shift, jumps now and then, or counts backwards in one direction.
First, classify the error
Mark a physical reference point. Move the axis away and back several times, then record the count at the mark each time. The pattern tells you where to look:
Signal type must match the input
Encoders output HTL (push-pull, 10–30 V), TTL/RS-422 (5 V differential, A, /A, B, /B) or open-collector. A TTL encoder wired single-ended to a 24 V input may work on the bench and then fail in the plant. Use a counter module designed for the signal type, and use differential signals over long cables.
Frequency check
Calculate the maximum input frequency:
f = (rpm / 60) × pulses per revolution
A 2500 PPR encoder at 3000 rpm gives 125 kHz. A standard digital input with a filter of a few milliseconds cannot count that, and many compact HSC inputs top out at 100 kHz. Check the input filter time in the hardware configuration as well: a 3 ms filter discards anything faster than a few hundred hertz.
Quadrature mode
With channels A and B, the counter can count ×1, ×2 or ×4 edges. If the configured mode does not match the scaling in the program, the position is out by a factor of exactly 2 or 4, which is easy to spot. A count that runs backwards means A and B are swapped or the direction setting is inverted.
Noise
Work through the cabling first:
Mechanical slip
A measuring wheel slipping on a belt, a loose coupling or a key that has worn its keyway will all lose position without any electrical fault. Mark the shaft and coupling with paint and watch for movement between them.
Program-side safeguards
Where possible, re-reference on a fixed sensor every cycle and compare the count at that sensor with the expected value. Raise an alarm when the deviation exceeds a tolerance. The machine then tells you the encoder is drifting before it makes scrap.
For the wider picture, see the hardware chapter on motion feedback.
Frequently asked questions
Why does my encoder count drift over time?
Steady drift usually means lost pulses from too high a frequency or too long an input filter, or mechanical slip. Random jumps point to electrical noise.
How do I calculate encoder frequency?
Multiply revolutions per second by pulses per revolution. A 2500 PPR encoder at 3000 rpm produces 125 kHz.