Explainer
How a CN1 pulse train absolute position reading works
Short answer
A CN1-style absolute transfer sends the multi-turn count and the within-turn count as two separate pulse bursts at power-up, then switches to ordinary incremental pulses. Arm hardware counters before the drive transmits, decode both fields per the drive manual, compute initial position as multi-turn turns times counts per revolution plus the within-turn count, and hand off to pulse counting at a latched boundary.

On this page
A CN1-style absolute transfer is not a register you poll: it is two one-shot pulse bursts followed by ordinary counting. At power-up or initialization the servo drive transmits the multi-turn count on one wire and the position within one revolution on another, as pulse trains whose pulse counts equal those values. Once the drive is enabled, the same lines carry incremental pulses. The controller's job is therefore fixed: arm hardware counters before the transmission starts, count both bursts, decode them per the drive manual's data format, reconstruct the start position, and hand off to continuous pulse counting at a defined boundary. Scanned IEC inputs can run that sequence; they cannot capture the bursts themselves.
Two fields on two wires #
The multi-turn field is the number of whole revolutions turned since the encoder's zero. The within-turn field is the position inside the current revolution, in the drive's output pulses. Each field arrives as a burst whose pulse count equals its value, on its own wire, inside a window that the drive manual's power-up and initialization timing diagram defines. The same manual states which pin carries which field, the field order, the encoding, the direction convention and the validity mechanism; copy all of it, because a wrong start position survives until the next valid initialization.
The within-turn scale is the output pulse count per encoder revolution, not necessarily the encoder's native resolution: the drive sets it with its dividing ratio or electronic gear ratio. A serial absolute encoder reports the same two quantities as a coded message rather than bursts; capturing serial absolute encoder data at machine startup covers that different signal path.
After enable, the running output is an ordinary pulse train with a direction sign, or quadrature, per the drive's output configuration. One missed edge there becomes a permanent offset until the next initialization, which is why the running side matters as much as the startup capture.
Why a scanned input cannot do the capture #
A cyclic task reads its input image once per scan, and a burst can pack thousands of pulses into a time shorter than one scan, so most edges fall between scans. On top of that, the millisecond-range filter on a standard input channel suppresses any pulse shorter than its filter time. The burst is transmitted once per initialization, so what the scan misses cannot be fetched back by polling. Ordinary IEC input blocks are right for status and sequence; the data wires need hardware counter channels that accumulate edges independently of the task.
| Approach | Startup bursts | Running pulses | Use it for |
|---|---|---|---|
| Scanned digital inputs | Edges fall between scans | Lost as speed rises | Status and sequencing only |
| Hardware counters plus IEC logic | Counted raw, then decoded | Counted continuously | The default choice |
| Dedicated interface that names this exact data format | Decoded by the interface | Delivered as position | Only with documented support for the format |
The running side is otherwise ordinary lossless counting, the subject of counting encoder pulses on a PLC without losing position, and absolute encoder input card response time versus count rate decides how much margin you have at speed.
Arming the counters before the drive transmits #
The order of operations is where most failed readings start:
- Wire the two data wires and the running pulse and direction pair to hardware counter channels.
- Configure the channels while the drive is still unpowered: counting mode, edge, the fastest filter the electrical noise allows, and enough counter width for the longest burst.
- Apply power, or trigger the documented initialization, so the transmission begins with capture already running.
- Read both counters when the transmission ends and hand the values to the decode step.
Electrical checks come before any logic. Compare the drive connector's output levels and permissible load with the input channel's datasheet: voltage, current loading, common reference, polarity, minimum detectable pulse width, maximum count rate. The deciding rule: the narrowest pulse the drive emits must be wider than the narrowest pulse the channel detects with its filter at the chosen setting. When it is not, no program recovers the data.
From captured fields to a running position #
Keep the two captured counts as separate fields until decoded: apply the manual's bit order, polarity and direction convention to each. Call the decoded values multiTurn and withinTurn (this article's names, not the drive's). Then:
initialPosition = multiTurn × outputPulsesPerRevolution + withinTurn
Both fields must carry the same direction sign before the addition. The multi-turn field wraps at its range limit, so treat the combined value modulo the full range and let the application place the travel zero. Size the position variable for the full combined range before wrap, not for the travel you expect.
At the handoff boundary, where the timing diagram shows the drive switching from transmission to incremental output, latch the start value and snapshot the running counter. From then on: currentPosition = initialPosition + (counterNow − counterAtHandoff), with the counter signed by direction. Place the boundary so no pulse is counted both inside a startup field and inside the delta, and no pulse is discarded between the two modes.
Keep commanded motion inhibited until the decoded fields pass the manual's validity checks: an axis that starts from a false position drives confidently to a false target, and that is a collision risk, not a scrap part. On a malformed frame, a capture overflow or a counter diagnostic, raise position-invalid and require a fresh initialization; never continue from a guessed value.
Reconstructing 2 revolutions plus a half turn on a 16-bit encoder #
Inputs, with sources:
- Resolution: 65,536 steps per revolution (16 bits), with a multi-turn range of 16,384 revolutions (14 bits) — the documented figures in the manual of one absolute rotary encoder family with a PROFINET interface, used here as the example encoder. A drive can emit a different output pulse count per revolution, set by its dividing ratio.
- multiTurn: 2 revolutions — example input, the pulse count captured on the multi-turn wire.
- withinTurn: 32,768 counts — example input, half a revolution captured on the within-turn wire.
The rule in words: multiply the whole revolutions by the counts each revolution holds, then add the counts from the partial revolution.
initialPosition = 2 revolutions × 65,536 counts/revolution + 32,768 counts
= 131,072 counts + 32,768 counts
= 163,840 counts
The axis starts at 163,840 counts from the encoder zero, two and a half revolutions in the positive direction — a calculated example for these inputs, not a measured result.
The handoff, same example: the counter snapshot at the boundary is 0 counts; a positive move of one eighth of a revolution, which is 8,192 counts, gives currentPosition = 163,840 + (8,192 − 0) = 172,032 counts.
The decision: the full combined range is 16,384 revolutions × 65,536 counts = 1,073,741,824 counts, which is 30 bits. Store the reconstructed position in a 32-bit signed integer at minimum, and treat 1,073,741,824 counts as the modulo at which position wraps to zero. A narrower variable overflows before the encoder does; a wider one buys nothing.
Checks that confirm each failure #
Take the symptom first, cheapest check first:
- Wrong start position after every power-up. Confirm the counters were armed before power was applied: force the documented re-transmission with capture already running and compare. Then scope the data wire at the controller terminal and measure the narrowest pulse against the channel's minimum detectable width; a burst present at the drive connector and absent at the terminal points to loading, reference or wiring, not logic. Then verify the output pulse count per revolution setting, because a changed dividing ratio rescales the within-turn field.
- Start position right, running position drifts. Compare the counter delta against an independently measured mechanical move, then repeat at maximum speed: a slow test cannot expose a count-rate limit.
- Position correct until the axis crosses the encoder zero. Rotate through one revolution in both directions; the within-turn field must wrap while the multi-turn count steps by exactly one, in the right direction, or the sign or rollover handling is wrong.
- Values right at standstill, wrong after a power cycle. Cycle drive enable without removing power, then do a full power cycle; a fault that appears only on the second test sits in the power-up sequence, not the enable sequence.
The acceptance test for the whole path: with the mechanics stationary, the decoded fields repeat on every restart; a move under one revolution confirms the direction; a crossing of the revolution boundary in both directions confirms the wrap; a run at full speed confirms the capture rate.
Questions asked
Can the drive send the absolute data again without a power cycle?
Usually yes. The transmission follows an initialization event, not only power-up, and the drive manual's timing section names the trigger, typically an initialization input or a parameter command. Between transmissions the position lives in the controller as the latched start value plus counted pulses. If a capture failed, force the documented re-transmission with the counters already armed instead of rebooting the machine.
Does the within-turn field match the encoder's headline resolution?
Not necessarily. The field is in the drive's output pulse units, and the dividing ratio or electronic gear ratio can scale it down from the encoder's native counts. Use the configured output pulse count in the reconstruction, not the encoder's catalog resolution, or every calculated position is wrong by the ratio between the two.
What pulse width and count rate must the input channel handle?
Take the minimum output pulse width and maximum pulse frequency from the drive's interface specification, then pick a counter channel that beats both with its filter at the fastest setting the noise floor allows. Rule of thumb: hold at least a two-to-one margin on count rate, because cable and filter effects consume margin that a slow bench test never reveals.
Is homing still needed with an absolute encoder?
Keep it as the fallback. When the captured fields fail validation, homing to a switch and running incrementally restores a true position at the cost of the homing move, alongside the fresh initialization the fault demands. A machine that must restart without homing is exactly the machine whose validation step has to be strict.