Use a stated A/B order, not a universal clockwise rule
The following complete pair table uses this page’s sign convention. “?” means both bits differ, not an assigned count.
| Previous / next | 00 | 10 | 11 | 01 |
|---|---|---|---|---|
| 00 | 0 | +1 | ? | −1 |
| 10 | −1 | 0 | +1 | ? |
| 11 | ? | −1 | 0 | +1 |
| 01 | +1 | ? | −1 | 0 |
Write each sample as AB: 10 means A high, B low. For this page only, the cycle 00 → 10 → 11 → 01 → 00 is positive. Each adjacent step changes one bit; reversing that step is negative. Starting at 11 instead of 00 does not change the rule.
US Digital’s quadrature explanation shows how the leading channel changes when motion reverses. To map a positive count to actual clockwise rotation, confirm the encoder’s viewing direction, channel labels, input inversion and the controller’s sign convention. Do not swap live wiring to try a sign change; use the equipment’s documented commissioning procedure.
Single-channel pulse counting lacks that A/B ordering information. Dynapar’s overview explains why bidirectional information also matters when a nominally one-way mechanism dithers at a transition. Correct decoding can account for the reversals; it does not make electrical noise disappear.
Count edges with the receiver’s actual mode
On narrow screens, scroll the table horizontally.
| Mode | Typical selected events | Counts for 100 channel cycles |
|---|---|---|
| x1 | One selected edge per A cycle, using B for direction | 100 |
| x2 | Both edges of A, using B for direction | 200 |
| x4 | Both edges of A and B | 400 |
This matches the cycle-based example in US Digital’s article. Other devices can select different reference edges. A single-channel counter mode that ignores B is a different operation. More decoded increments do not prove better mechanical accuracy.
For pulses/cycles per revolution, angular scale and channel frequency, use the PPR and resolution guide. Confirm whether a published CPR/PPR figure is before or after decoding. An index signal supplies a separate reference event; it is not required to obtain relative counts from A/B. See Z pulse, gating and homing for that task.
A two-bit jump does not reveal a unique missing count
In a complete ideal adjacent-state trace, only one channel changes at each step. If successive observed samples are 00 and 11, both bits differ. The missing path might have been 00 → 10 → 11 or 00 → 01 → 11, with opposite signs. Additional hidden cycles are also possible. Those endpoints alone do not establish a direction or a ±2 correction.
TI’s quadrature presentation, page 12 distinguishes valid adjacent transitions from illegal transitions. An observed two-bit jump can reflect inadequate capture or a signal problem; it does not by itself prove which component failed. The actual controller determines its fault response and recovery.
Repeated samples such as 00 → 00 add no observed adjacent transition. They do not prove the shaft stood still: a full cycle or other travel could occur between sparse samples. Even a trace containing only valid adjacent pairs cannot certify that nothing was missed.
Check an observed A/B state sequence
Logical x4 pair inspection only. Positive order: 00 → 10 → 11 → 01 → 00. Enter 2–64 samples, each exactly two bits in AB order, separated by spaces, commas or new lines. No timestamps, voltage measurement, filtering, index reset or hardware error recovery is modelled. The tool cannot reconstruct unobserved movement. Editing a sample recalculates the table immediately; invalid input clears the previous results.
| Pair | Observed AB change | Interpretation |
|---|
When any two-bit jump occurs, the full trace’s net adjacent count is not determined. The +1 and −1 totals still describe the valid observed pairs only. No ±2 value is inserted. A complete error-free forward cycle gives +4; the reverse gives −4; 00 → 10 → 00 gives zero net with one step each way.
Separate raw-state capture from reading a hardware counter
TI’s timer presentation, pages 11–13 places a decoder before a position counter. Software may read that accumulated counter less often than A/B changes occur. That is different from software polling the raw A/B pins; the latter must capture the intervening states. Counter width, rollover, reset/index events and atomic reading still need checking.
Independent timing check: avoid a “twice the pulse frequency” guarantee
Assume 25 channel cycles per revolution and 10 revolutions per second. Each channel has 250 cycles/s. Ideal x4 decoding encounters 1000 state changes/s, spaced 1 ms apart for ideal constant-speed, 50%-duty quadrature. A 500 Hz raw-state poll is 2 ms apart and can skip states. It cannot guarantee complete x4 capture.
Real phase spacing, high/low widths, speed variation, input synchronization/filtering and worst-case service latency govern the usable margin. A mean transition rate alone does not specify a safe polling rate. Use the receiver’s documented quadrature capture limit and minimum pulse/state requirements; do not apply a universal multiplier or debounce delay. A controller’s application scan time is not automatically its high-speed input limit.
On narrow screens, scroll the table horizontally.
| Observation | Evidence to collect |
|---|---|
| Direction reversed | Known physical motion, viewing end, A/B labels, inversion and configured sign; not just wire colours. |
| Scale is twice or four times expected | Documented channel cycles and actual x1/x2/x4 setting; gearbox/wheel ratio and units. |
| Two-bit jumps in a captured trace | Acquisition timing and input waveform at the receiver; controller diagnostic flags, filters and capture limits. |
| No two-bit jumps, but travel disagrees | Missed full cycles remain possible; compare independent travel, counter rollover/reset, mechanical slip and input capture. |
Quadrature describes logical ordering, not the electrical driver. Check the differential line-driver guide or open-collector guide for the relevant interface. A̅ is the inverse of A, not channel B. Use the wiring evidence checklist for references, connectors and cable details.
Compare an encoder with the receiving system
Provide the original full encoder code and controller/input model, channel-cycle definition, count mode, viewing direction and symptom. Include output circuit, supply, connector/cable, mounting, quantity and destination country. We compare the available encoder and receiver documents, then identify matching functions, differences and the exact output or input information still needed for a candidate replacement.
The text form includes the inspector’s current logical result. For waveform images or drawings, email max@encodercross.com. This form does not accept attachments. A logical trace is not a compatibility approval.
Preview sends nothing. Use the web inquiry form to contact us.
Quadrature encoder decoding questions
Does A leading B always mean clockwise?
No. Confirm the viewing end, channel labels, inversion and the receiver’s sign convention. This page defines its own positive AB order; it does not assign a universal clockwise sign.
Does a repeated AB sample prove there was no movement?
No. It only shows unchanged observed endpoints. Full cycles or other movement can be hidden between samples.
Can a two-bit jump be repaired by adding two counts?
No unique correction follows from the endpoints. Both signs and extra hidden travel are possible. Use the controller’s documented fault and recovery procedure.
Does x4 decoding make an encoder four times more accurate?
It provides four count opportunities per ideal channel cycle. It does not prove a fourfold reduction in position error or improve the mechanical system by itself.
Do I need Z to get relative quadrature counts?
A/B can provide relative counts without Z. A separate reference or homing method is needed when the application requires a known reference position.
Can this inspector prove my wiring and capture rate are correct?
No. It checks supplied logical pairs only. It cannot measure voltage, timing, hidden cycles, electrical noise or installed mechanical behaviour.
Sources and maintenance
- US Digital: What is Quadrature? — channel order and cycle-based x1/x2/x4 examples; its voltage illustration and terminology are not universal specifications.
- TI Precision Labs: Interfacing with Quadrature Encoders, Peter Luong — 16-page presentation, especially pages 11–13; document-specific sign, reset and peripheral behaviour require the actual controller manual.
- Dynapar: Quadrature Encoder Overview — phase, directional counting and output-quality context.
Maintained by EncoderCross, 6 November 2026. State examples, logic inspector and diagrams are independently created explanations. They do not measure an encoder or certify hardware, firmware, wiring, stock or machine performance. About our supplier service.