Troubleshooting
PLC scan time for a slow absolute encoder turntable
Short answer
At its rated 3 RPM, a turntable encoder tagged 720 counts per revolution hands the PLC a new position every 27.8 ms. A small PLC scanning in the low milliseconds reads every one through ordinary inputs - the real risks are the unresolved nameplate, the input filters, and a stop strategy that catches the last count while the table creeps.

On this page
A 3 RPM turntable is slow enough that scan time is almost never what bites you. The arithmetic below puts a fresh position in front of the PLC every few tens of milliseconds, while a small brick PLC scans in single-digit milliseconds, so the count interval is comfortably longer than the scan. What decides this job is the input path and the stop strategy. Settle the nameplate first, because the two figures printed on it describe two different resolutions with two different rates; then check the interval against your measured worst-case scan; then ramp down early and creep in, so the final count arrives while the table is nearly stopped. When a count does go missing at this speed, the likely cause is input filtering, a code word sampled mid-change, or a drive that coasts past the target - not a PLC that is too slow.
Settle what the nameplate really says #
A nameplate that lists both a bit count and a pulse figure is offering two different devices, and programming against the wrong one shifts everything downstream: the counts-to-degrees scaling, the target values, and the ramp distance.
- A 10-bit position code holds 1,024 distinct codes per revolution, each worth 0.352 degrees.
- A 720-pulse figure gives 720 counts per revolution, each worth 0.5 degrees.
The interval between positions at the table's top speed follows from those two readings:
| Nameplate reading | Positions per revolution | Angle per position | Interval at full speed |
|---|---|---|---|
| 720 counts per revolution | 720 | 0.5 degrees | 27.8 ms |
| 10-bit code | 1,024 | 0.352 degrees | 19.5 ms |
Settle the output type at the same time, because it decides which timing rule applies. A coded parallel position (Gray or binary) is sampled as one whole word; a pulse train has to be caught one edge at a time; an encoder that reports over a serial link or network delivers position at its own documented update rate, and that update period replaces the scan question entirely. If the datasheet cannot settle the resolution, design to the tighter number, 19.5 ms, and confirm on the bench.
The interval arithmetic at full speed #
Inputs: the table's top speed and the counts-per-revolution figure from the table above. Carry the units through:
- 3 RPM ÷ 60 = 0.05 revolutions per second.
- 0.05 revolutions per second × 720 counts per revolution = 36 counts per second.
- 1 second ÷ 36 counts per second = 0.0278 seconds, so one count arrives every 27.8 ms.
At the same speed the 10-bit reading gives 0.05 × 1,024 = 51.2 codes per second, one code every 19.5 ms. These are calculated examples for these inputs, not measured results.
For scale, Rockwell's PLC-5 controller manual documents a program scan of roughly 2.5 ms per 1,000 words of user program for examine-on/off and block instructions; a small brick PLC with a few hundred words of ladder and a couple of dozen I/O points lands in the low milliseconds. Both sit well under the tighter interval in the table. Read your own worst-case scan from the controller's scan-time data with every routine running, and if it is below 19.5 ms the scan alone cannot skip a count at full speed.
What the scan has to do depends on the output #
With a coded parallel position, the scan never chases edges. It samples the whole code word once per scan, and a value that holds for the interval in the table cannot slip between two scans a few milliseconds apart. Two things matter more than scan speed: keep the discrete input filters at their shortest practical setting, a few milliseconds, so filter delay stays well under the interval and every bit of one code arrives as a single snapshot; and confirm the input image your logic reads is updated in the same scan, which local I/O does and networked I/O may not. Move the feedback to a dedicated absolute-encoder input card and scan time leaves the picture entirely - the card's documented response time and count rate take over, a tradeoff compared in absolute encoder input card response time vs count rate.
With a pulse train on ordinary inputs, a polled scan loses a count only when the input turns on and off between two samples. At 36 pulses per second, a half-duty signal holds each state for about 13.9 ms, so a scan shorter than that catches every state, while a scan between half and the full pulse period can skip one. The failure mechanism, and the capture inputs that remove it, are covered in why a PLC misses short input pulses and how to catch them.
Read the code without inventing positions #
A parallel code sampled while several bits are changing can return a value the shaft never physically occupied. Gray-code outputs prevent that: exactly one bit changes between adjacent positions, so a sample taken mid-transition yields the old value or the new one, never a third. Wiring and reading such a code into the controller is walked through in reading a Gray code absolute encoder into a PLC.
With a binary-coded output, add a software guard instead: reject any reading that differs from the last accepted one by more than a single position, allowing for the wrap boundary where the top count rolls over to zero, and re-read before using the value. If the table can turn more than one revolution between references, a single-turn code wraps at that boundary - turning a single-turn absolute encoder into multi-turn position covers extending the range.
A stop strategy that catches the last count #
Timing settled, the stop strategy decides whether you land in tolerance. Four settings do the work:
- Start the deceleration about 25 counts before the target. At full speed that is 25 × 27.8 ms per count = 695 ms, call it 0.7 s of runway; check it covers the drive's decel ramp plus the inertia of the load.
- Creep the last stretch at about 5 percent of top speed, roughly 0.15 RPM: that is 1.8 counts per second, one count every 556 ms, which any scan catches without effort.
- Accept ±2 counts as the final tolerance. Tighter needs the axis to hold position under power - a brake, or creep onto a positive stop - because a free load walks after the drive reports done.
- If the drive takes its speed reference over a serial link such as RS-485, a velocity proportional to the square root of the distance still to travel, clamped between the creep speed and the top speed, gives a smooth approach; the lower clamp is what delivers the creep. Smooth writes do not make the drive instant - its decel ramp and the load inertia set the distance covered after each change - so trend the reference against the settled stop point while tuning.
The commitment: ramp at 25 counts out, creep at 5 percent, live with ±2 counts, and add holding torque if the load can drift.
When a count goes missing, check in this order #
Verify counts with the guard closed wherever you can; for any hands-on work near the rotating table, lock out the stored and electrical energy first, as OSHA 29 CFR 1910.147 requires for hazardous energy control in the US, and work to the machine's own risk assessment.
Then work the symptom down this list, cheapest check first:
- Position value jumps by more than one count while the table turns. Log raw values with timestamps. Steps of exactly one position mean the feedback path is healthy and the jump is real motion; a step of several, or a value holding longer than the encoder's documented update period, points at input filters, a mid-change sample, or a scan too slow for an edge-counted signal.
- The value reads cleanly but the table stops short of target. Double the ramp distance and re-run. If the shortfall shrinks, the drive's decel ramp plus load inertia needs more runway than the current distance gives.
- The settled position walks a count or two after the stop. Log the value for a few seconds after motion complete; a walking value means nothing holds the load. Engage the brake or creep onto a positive stop rather than tightening the tolerance.
- The reading is frozen or absurd. Re-read once, then check the input point, the wiring shield and the encoder supply in that order. A frozen bit is a failed channel, not a timing problem.
The decision #
Coded absolute position on ordinary inputs: no high-speed counter and no faster PLC. Confirm the resolution behind the nameplate, keep the measured worst-case scan under the tighter interval from the table with filters at a few milliseconds, guard each reading against the last, ramp 25 counts early, creep at about 5 percent of top speed, and hold ±2 counts - adding a brake if the load drifts.
Pulse output counted through the scan: keep the scan under half the pulse period, which is 13.9 ms at these speeds, or move the counting to a counter or capture input. Either way, prove the fix with a logged full revolution in which every step is exactly one count. Shortening the ladder only helps when the scan was the limiter; it does nothing for filters, transition skew, drive coast or a drifting load - and at 3 RPM the scan was never the limiter to begin with.
Questions asked
What if the pulse figure on the nameplate is actually a quadrature line count?
Then the count math changes by a factor of four. A line count decoded in quadrature yields four edges per line, so the nameplate becomes 2,880 counts per revolution - about 144 counts per second at the table's top speed, one every 6.9 ms. Ordinary scanned inputs can no longer guarantee capture at that rate; use a real quadrature counter input, and re-derive the ramp distance in the new counts.
How big is the accepted two-count error at the table edge?
Two counts at 0.5 degrees each is a plus or minus one degree error at the table shaft. Rim error grows with radius: at a 300 mm radius, one degree of arc is about 5.2 mm, so a two-count tolerance means about plus or minus 5.2 mm of rim travel there. Scale linearly - at a 150 mm radius the same tolerance is about 2.6 mm.
Why did the PLC once show a position the table never occupied?
With a multi-bit binary-coded output, two or more bits can change within one count, and a scan that samples mid-change reads a code between two real positions - a value that never existed physically. A Gray-code output changes exactly one bit per count and cannot do that; on a binary encoder, a software check that rejects any reading more than one position from the last catches it.
How do I tell a real stop from a table that is still drifting?
After the drive reports done, keep logging the position value for five to ten seconds. A settled axis repeats one count; a drifting table walks a count every few hundred milliseconds, and the walk direction shows which way the load falls out of balance. If the value walks, the fix is holding torque - a brake or a creep onto a positive stop - not a faster scan or a tighter tolerance.

