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:

  • If the error grows steadily with distance travelled, you are losing pulses. Suspect frequency, the input filter or the signal level.
  • Random jumps, often when a motor or contactor switches, point to electrical noise.
  • A count that is right at low speed and wrong at high speed means a frequency limit or the input filter.
  • If the count is exact but the product is in the wrong place, the cause is mechanical slip, not the encoder.
  • 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:

  • Use shielded twisted-pair cable, with the shield clamped to earth over 360° at the cabinet entry.
  • Route encoder cable away from motor cables, and cross them at right angles where they must meet.
  • Keep VFD output cables shielded too. They are the usual source.
  • Look at the signal with an oscilloscope. Ringing or spikes on the edges confirm noise.
  • 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.