Selection guide
Absolute encoder input card response time vs count rate
Short answer
Keep the 3-9 ms DC input card. Gray code changes one bit per count, so at a 10 ms count rate each input holds its level for two counts, 20 ms, against a 9 ms worst-case delay, and no transition is lost. The lag to budget is card delay plus PLC scan, about one to three encoder counts, which cam-switch replacement tolerates; the 0.8 ms card buys less than one count, so it is not worth a PLC family change.

On this page
- Per-pin interval decides the signal question
- Why adding rise and fall times gives the wrong answer
- Staleness, not missed counts, sets the error
- Comparing the candidate cards
- Worked example: the loader's fastest count rate, the card's worst delay and a typical scan
- Voltage thresholds and coherent sampling still have to match
- Prove the capture path on the machine
- Questions asked
Keep the DC input card with 3-9 ms rise and fall times. With a Gray-code absolute encoder, exactly one bit changes per count and the fastest-changing input holds each state for two counts, so at your 10 ms count interval every pin presents at least 20 ms of steady level against a 9 ms worst-case card delay: better than 2:1 margin, with no transition lost. What card speed does affect is staleness. The position your logic acts on lags the shaft by the card delay plus up to two PLC scans, roughly one to three encoder counts at this count rate. For replacing cam-type position switches that is acceptable, and the 0.8 ms card, with the PLC family change it implies, buys less than one count, so it is not needed. The checks, the arithmetic and the commissioning test that proves it follow.
Per-pin interval decides the signal question #
A DC input card's rise and fall times are recognition delays: the time from the input voltage crossing its threshold to the logic-side bit changing state. A level is captured only if it persists longer than that delay, so the comparison that matters is the delay against how long one pin holds its level, not the delay against the interval between encoder counts.
Gray code makes that holding time generous. Adjacent words differ in exactly one bit, and in the binary-reflected sequence the bit driven by the finest transitions changes state every second count; every other bit is slower. Your fastest pin therefore holds a steady level for two count intervals at minimum, the behavior you described. If the encoder's datasheet publishes an output update time, add it to the same budget.
Read the delay line closely, too: one PLC vendor's DC input modules specify a worst-case off-to-on delay well above their on-to-off figure of 1 ms or less, so budget with the worse of the two figures, never the better.
Why adding rise and fall times gives the wrong answer #
The tempting check is to add the worst on delay to the worst off delay, compare that sum with the count interval, and declare the card too slow. That sum describes one wire producing a pulse at every count, a pulse train, which Gray code never generates. No pin changes on consecutive counts, so the two delays never have to complete back to back on the same input. Each edge only needs to be recognized before the opposite edge arrives on that pin, two counts later.
The rule of thumb that captures this: keep the card's worst-case delay at or below the count interval, which holds every pin's level at twice the delay or better. Your arrangement sits just inside that line at the fast end of the count rate and comfortably inside it at the slow end.
Staleness, not missed counts, sets the error #
Once every transition is captured, the remaining error is age. The position your logic acts on is late by a chain of delays: the card's recognition delay, the wait for the next input image (up to one scan), and the distance from that image read to the decode and output rungs (up to one more scan, or nearly zero if they run first). Budget the card delay plus two scans for the worst case, and add the output card and actuator response on the machine side of the budget.
Absolute encoding removes accumulated error, not latency. Every scanned word is a true position, the shaft as it was a moment ago, so the value is never wrong, only old. A common guess is that the worst case is one count behind; with a scan comparable to the count interval the honest worst case is larger, and the worked example prices it. The decode itself, turning the Gray word into a position as covered in reading a Gray code absolute encoder into a PLC, is one instruction and a negligible slice of the scan; the scan schedule dominates.
Comparing the candidate cards #
Three documented input classes against the loader's timing. The staleness column budgets each delay plus two scans; the margin column divides the two-count hold time of the fastest pin by the delay.
| Candidate input | Documented worst delay | Margin on the 20 ms per-pin level | Worst staleness, two 10 ms scans | Decision |
|---|---|---|---|---|
| DC input card, 3-9 ms rise and fall | 9 ms | 20 ÷ 9 = 2.2 | 29 ms = 2.9 counts | Keep: no transition lost; lag fits cam-switch duty |
| Fast DC input card, 0.8 ms rise and fall | 0.8 ms | 20 ÷ 0.8 = 25 | 21 ms = 2.1 counts | Buys 0.8 counts of lag; not worth a PLC family change here |
| Status input, 8 ms response, 25 Hz max ON/OFF cycle | 8 ms | 20 ÷ 8 = 2.5 | 28 ms = 2.8 counts | Reject: the fastest pin toggles at exactly its 25 Hz limit |
The third row shows why the specification style matters. That status input is documented by response time and by a maximum ON/OFF cycle, and the fastest Gray pin completes one full on-off cycle every four counts, 40 ms, or 25 Hz at this count rate, which is exactly that card's documented limit, with no margin. The candidate card is documented by delay instead, and its margin is in the table. Every PLC vendor's I/O line also includes high-speed digital modules a class faster again; they exist for counting edges, and nothing here needs one.
Worked example: the loader's fastest count rate, the card's worst delay and a typical scan #
The inputs, each with its source:
- Count interval: 10 ms per encoder count, the fast end of the range the loader's arrangement produces; confirm by measurement.
- Card delay: 9 ms, the worst of the candidate card's documented on and off delays, from its datasheet.
- Scan time: equal to the count interval, typical for a program of this size; replace with the measured scan of the final program.
- Encoder: 360 counts per revolution, single turn, one count per degree, an example resolution for this class of duty.
- Tolerance: one count of lag at each switching point, the working criterion for replacing cam switches.
The rule in words: a pin's level must outlast the card delay, and it lasts two counts; the lag the logic sees is the card delay plus up to two scans, divided by the count interval for counts and multiplied by degrees per count for shaft angle.
The arithmetic:
- Per-pin level: 2 × the count interval = 20 ms. Margin: 20 ÷ 9 = 2.2, so every edge is captured.
- Worst staleness: 9 ms + the count interval + one more scan = 29 ms; 29 ÷ 10 = 2.9 counts; 2.9 × 1 degree per count = 2.9 degrees of encoder shaft.
- Decode and output rungs placed first: 9 ms + one scan = 19 ms = 1.9 counts, about 1.9 degrees.
- The fast card, same worst case: 0.8 ms + two scans = 20.8 ms = 2.1 counts, an improvement of 0.8 counts.
- Speed sanity check: 360 counts per revolution at this count rate is 3.6 s per revolution, about 16.7 rpm, the speed class of the loader duty.
The result, calculated for these inputs and not a measured figure: the candidate card loses no transitions, and the position is true but up to 2.9 counts old in the worst placement, about 1.9 counts with the logic ordered first.
The decision: if each switching window tolerates about three counts of lateness, three degrees at the encoder shaft before the chain drive ratio, keep the smaller PLC with this card and put the decode and output rungs at the top of the program. Because the actual lag swings with scan phase, offsetting each compare value by the middle of the band, 2.9 ÷ 2 ≈ 1.5 counts, halves the worst switching error.
If a window must hold to one count, no input card reaches that at this scan, since the scan wait alone is one count: shorten the scan or drive those outputs from the input image ahead of the rest of the program, and buy the faster card only if the count interval later falls to about the card's worst delay.
Voltage thresholds and coherent sampling still have to match #
Passing the timing check is not the whole datasheet. The same documents carry switching thresholds: the installation instructions for one compact 24 V dc sink/source input module list an on-state minimum of 10 V dc, an off-state maximum of 5 V dc and an off-state current maximum of 1.5 mA, paired with 8.0 ms maximum on and off delays, the delay class of the candidate card and ordinary for filtered 24 V dc inputs. Those are the bands the PLC equipment standard IEC 61131-2 defines test conditions for; take the exact limits from the datasheet of the card you buy.
The encoder's high must clear the first, its low must sit under the second, and its off-state leakage must stay below the third, or a bit sticks on or off. A 5 V single-ended encoder output will never cross a 10 V threshold; give it a proper interface, as covered in connecting a 5V servo encoder to 24V PLC inputs. And read the encoder bits as one image word, because Gray code's old-or-new guarantee holds only when every bit is sampled at the same instant.
Prove the capture path on the machine #
The numbers above are calculated, not measured; one commissioning pass turns them into evidence. Run it at reduced speed first, with the guarding in place and nobody in the mechanism, because a loader whose position logic is under test can make unexpected moves.
- Jog one count at a time and confirm the raw input word changes exactly one bit per count in each direction.
- Measure the true count interval at maximum speed in both directions; the fastest value is the design number.
- Trend the raw input word, the decoded position and each cam-equivalent output together at full speed, with a logic trap that counts scans where the decoded position moves by more than the expected counts per scan; that trap catches lost transitions and torn words.
- Measure scan time with the final program and the encoder rungs in their final position; an empty test program understates the lag.
- Stop the loader on both sides of every switching window and verify each output's state, then repeat at full speed to observe the lag-induced shift of the switching points.
For this loader the verdict stands: the card with the 3-9 ms delays is the right input, and the engineering effort belongs in scan placement and compare-value offsets, not in a faster card.
Questions asked
Does the absolute encoder make a slow input card harmless?
Not entirely. The scanned word is always a true past position, so position error never accumulates, but an event can still be missed: if the loader crosses a switching band faster than the card-plus-scan lag, two consecutive scans straddle the band and the logic never sees a position inside it. Size each band wider than the lag in counts, or shorten the lag, before trusting a narrow window.
How do I convert lag in counts into degrees or loader travel?
Degrees at the encoder shaft equal lag in counts times 360 divided by counts per revolution. Travel at the mechanism equals lag in counts times chain movement per encoder revolution divided by counts per revolution, where chain movement per revolution comes from the drive sprocket's pitch diameter. With a one-count-per-degree encoder the first step is direct; the second needs your drive ratio.
At what count rate should I move to a faster input card?
When the count interval falls to about the card's worst-case delay, the two-times margin on each pin is gone. Below that point edges depend on scan-phase luck, and the 0.8 ms class of card, or a high-speed digital input module, the class every PLC vendor's I/O line keeps for fast signals, is the correct choice. If the job is counting edges rather than sampling positions, that module is the right tool from the start.
Why might the decoded position jump wildly for one scan?
Gray code guarantees an old-or-new word only when all bits are sampled at one instant. If the card or the program assembles the word from channels read at different times, a transition can yield a mixed word that is not an adjacent code, and the decode lands far away for a single scan. Read the bits as one image word, and confirm from the card's documentation that the byte or word updates coherently rather than channel by channel.