A practical wiring guide for incremental (A/B/Z) encoders to PLC HSC inputs—covering NPN/PNP (open-collector), push-pull, and RS-422 line-driver outputs, with shielding/grounding tips, max-frequency notes, and brand specifics (Siemens / Mitsubishi / Omron).
Who this is for & what you’ll get
-
For controls engineers and technicians wiring encoders to PLCs on packaging, printing, and conveying lines.
-
You’ll get: standard wiring patterns, a comparison table, a ready-to-use checklist, and vendor references.
HSC + ABZ refresher (60 seconds)
A high-speed counter (HSC) captures fast pulses from incremental encoders using two quadrature channels A/B (90° apart) for direction and optional Z (index) for reference. x1/x2/x4 decoding multiplies effective resolution
ABZ timing
Use this timing chart to explain A-leads-B direction and the single Z pulse per revolution.

| Output type | Signaling | Noise immunity | Typical distance / speed capability* | PLC-side notes | When to choose |
|---|---|---|---|---|---|
| Open-collector NPN/PNP | Single-ended | Medium | Short–medium, sensitive to wiring | Needs pull-up/pull-down; match sink/source input | Cost-sensitive, moderate speed |
| Push-pull / Totem-pole | Single-ended | Medium–High | Better edges than open-collector | Check input voltage/current spec | Mid-speed, cleaner edges |
| Line-driver (RS-422) | Differential | High | Best for long runs / high freq | Wire A+/A-, B+/B-, Z+/Z- to HSC diff inputs; shield well |
Industrial noise / long cable / high PPR |
*Reasoning: line-driver outputs source and sink current actively, driving longer cables with cleaner edges; open-collector relies on pull-ups and has slower transitions.
Wiring patterns by output type (step-by-step)
*Always confirm your exact PLC/HSC terminal names and the encoder datasheet before wiring.
A) Open-collector NPN/PNP → PLC HSC (single-ended)
-
Power & common: Encoder V+ → 24 V (or specified 5/12/24 V). Tie 0 V to PLC 0 V.
-
Signals: A → HSC A, B → HSC B, Z → HSC Z (if used).
-
Polarity & input mode:
-
NPN (sinking to 0 V) → use PLC source-type input or add pull-up to V+.
-
PNP (sourcing to V+) → use PLC sink-type input or add pull-down to 0 V.
-
-
Shielding: Terminate cable shield at PLC side only (single-point).
-
Digital filtering: Set HSC input filter appropriate to target max frequency. (Siemens S7-1200 docs describe HSC current value mapping and configuration.)
Common symptom: missed counts at higher RPM (slow edges). Consider push-pull or line-driver.
B) Push-pull (Totem-pole) → PLC HSC (single-ended)
-
Power & common as above.
-
Signals to A/B/Z inputs directly.
-
Verify input voltage/current limits on the PLC card/CPU. (Vendor manuals list input types and limits.)
Why better than open-collector? Actively driven high/low edges reduce rise/fall time issues.
C) Line-driver (RS-422) → PLC HSC (differential) — recommended for high speed/long runs
-
Power as specified (5 V or 24 V variants exist—match your encoder).
-
Pairs: A+ → HSC A+, A- → HSC A-; B+ → HSC B+, B- → HSC B-; Z+/Z- likewise.
-
Cable: twisted pairs per channel, overall shield to PLC ground (one-end).
-
Check module max freq; e.g., Mitsubishi FX5-2HC supports differential encoders up to MHz-class inputs.
Siemens provides dedicated wiring pages for TTL/RS-422 on S7-1500/ET200MP technology modules (e.g., TM PosInput). Use those diagrams if that’s your hardware
Brand-specific notes (quick refs)
-
Siemens (S7-1200 / S7-1500 / TM modules)
Configure HSC in TIA Portal; check input filter times and current value addresses; S7-1500 supports connecting external encoders via HSC/technology objects (Motion Control). -
Mitsubishi (iQ-F / FX5-2HC)
FX5-2HC high-speed counter module explicitly supports differential line-driver encoder inputs for high-resolution signals (see module datasheet/manual). -
Omron (CJ-series CT units)
Manuals show ABZ to counter inputs and mode examples—handy for reference wiring and commissioning
Commissioning checklist (copy/paste for the panel door)
-
Polarity: NPN/PNP matched to sink/source input mode.
-
Power: Encoder supply voltage correct; commons tied; shield terminated one end.
-
Pairs: For differential, A+/A-, B+/B-, Z+/Z- not crossed.
-
Filters: HSC input filter time set for target max frequency (too long ⇒ missed counts).
- Direction: Verify A leads B in forward; swap A/B or invert direction bit if needed.
-
Z index: Confirm once-per-rev zeroing/homing logic.
-
Log: Capture raw counts at idle vs. motion to spot noise.
Troubleshooting quick guide
| Symptom | Likely cause | Fix |
|---|---|---|
| Missed pulses at speed | Slow edges (open-collector), filter set too long | Use push-pull/line-driver; shorten filter; shorten cable |
| Direction reversed | A/B swapped | Swap A/B or invert direction logic |
| Jitter at standstill | Noise, poor shielding | Improve shielding/grounding; differential inputs |
| Z not seen | Wrong wiring or too narrow pulse vs. scan | Verify Z wiring and timing; use HSC capture |
| Count jumps | Both A & B change simultaneously (sampling limit/noise) | Raise input bandwidth; use differential; check debounce |
