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 uses an incremental encoder on a PLC high-speed counter. The count drifts over a shift, jumps occasionally, 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.

  • Error grows steadily with distance travelled: lost pulses — frequency, filter or signal level.
  • Random jumps, often when a motor or contactor switches: electrical noise.
  • Count correct when slow, wrong when fast: frequency limit or input filter.
  • Count is exact but the product is in the wrong place: 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 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 few-millisecond filter cannot count this, and many compact HSC inputs top out at 100 kHz. Also check the input filter time in the hardware configuration: 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. A mismatch between the configured mode and the scaling in the program gives an error of exactly 2 or 4 — easy to spot. Counting backwards means A and B are swapped or the direction setting is inverted.

    Noise

  • Use shielded twisted-pair cable, with the shield clamped to earth at the cabinet entry over 360°.
  • Route encoder cable away from motor cables; cross them at right angles.
  • 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 all lose position without any electrical fault. Mark the shaft and coupling with paint and watch for movement.

    Program-side safeguards

    Re-reference on a fixed sensor every cycle where possible, and compare the count at that sensor with the expected value. Raise an alarm when the deviation exceeds a tolerance — the machine tells you the encoder is drifting before scrap is produced.

    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.