AN Automation Nodes, Reliability and Excellence Get a quote
Automation · 7 min read

How a PLC shift register remembers every bad part on a conveyor

Inspection happens at one point, the reject pusher sits several part positions further on. A shift register – one bit per part position – carries each inspection result down the line: inspect, shift, reject, with the ladder logic, the timing maths and the field tips that make it reliable.

AutomationBy the Automation Nodes engineering team · 25 Nov 202605PLC Programming · part 5 of 5
3D render: conveyor with a vision camera at position 0, a pneumatic reject pusher at position 8, a reject bin and a PLC display showing register R3D VIEW
Animated conveyor and 16-bit register: bit 8 = 1 fires the pusher Q0.0, with the SHL ladder logicHOW IT WORKS · LIVE
The inspection camera, the reject pusher eight positions later and the PLC register (top) and the live tracking: every bit moves with its part (bottom).

A camera or sensor checks each part at one point. The reject pusher sits several part positions further down the line. So how does the PLC know which part to push when it finally arrives? The answer is a shift register: one bit per part position.

The idea in one line

Bit N of the register always belongs to the part at position N on the belt. Load the inspection result into bit 0, shift every bit one place each time the belt moves one part pitch, and the result arrives at bit 8 at exactly the same moment the part arrives at the pusher.

Tag table

TagAddressMeaning
ClockI0.0One pulse per part pitch (encoder, cam or part sensor)
InspectI0.1Inspection result at position 0: 1 = bad, 0 = good
ResetI0.2Clear the register after a jam or manual removal
Register RMW / DB word, 16 bitsBit N = part at position N
PusherQ0.0Reject solenoid at position 8

Step 1 – Inspect

The sensor I0.1 checks the part at position 0. A bad part loads a 1 into bit 0 and a good part loads a 0. The value is taken at the moment of the shift, so the sensor result must be stable when the clock pulse arrives.

Step 2 – Shift

Every clock pulse from I0.0 – one per part pitch – moves all bits one place, exactly as the parts move on the belt. Bit 0 → bit 1, bit 1 → bit 2 … bit 14 → bit 15, and bit 15 drops out of the register because its part has already passed the pusher.

Step 3 – Reject

When bit 8 = 1, the part in front of the pusher is the bad one: Q0.0 fires and the part goes to the reject bin. A good part (bit 8 = 0) passes straight on.

The ladder logic

NetworkLogicPurpose
1I0.0 —(P)— SHL R, 1 bit, data in = I0.1Shift once per pitch and load the inspection result into bit 0
2R.8 —( )— Q0.0Fire the pusher for a bad part at position 8
3I0.2 —— MOVE 0 → RClear the register after a jam or manual removal

On a Siemens S7-1200/1500 this is SHL on a Word with the new bit ORed into bit 0 (or the BSL/bit-shift instruction where available); on Allen-Bradley it is a BSL (bit shift left) with I0.1 as the source bit and the length set to the number of positions. Size the register for at least the pusher distance – here 8 positions – plus some margin.

The numbers

QuantityFormulaExample
Pitch time60 ÷ parts per minute30 parts/min → 2 s
Delay to the pusherN × pitch timepusher at bit 8 → 8 × 2 s = 16 s
Shift leftold × 2 + d37 × 2 + 1 = 75

Why × 2? In binary, moving every bit one place to the left doubles the number; the new inspection bit d is then added into bit 0. 37 = 0000 0000 0010 0101 becomes 75 = 0000 0000 0100 1011.

Why not just a timer? A 16 s timer works only while the belt speed never changes. A shift register clocked by the belt itself stays correct when the line slows down, stops or restarts – the bits only move when the parts move.

Field tips

  • Use a one-shot (P contact) on the clock, so the register shifts only once per pulse – without it, it shifts on every PLC scan while I0.0 is on.
  • Take the clock from an encoder count when you can (one pulse per pitch from a high-speed counter compare). A part sensor can miss gaps in the flow, and then the register falls out of step.
  • Reset the register after a jam or manual removal, so old data does not fire the pusher on a good part.
  • Add a reject-confirm sensor after the pusher and raise an alarm if a 1 bit passes without a confirmed reject – a bad part must never reach the customer silently.
  • Make the register retentive if the line can stop with parts on it during a short power dip, or purge the line on restart.
  • Time the pusher pulse to the part, not to the bit: hold Q0.0 for a fixed time (TP) long enough to clear the part.

Need inspection, reject tracking or line automation on your conveyor? We design, program and commission PLC-controlled lines.

Members edition · free

Members Edition reference card

A two-page A4 edition prepared in your name: a gold-framed cover with our verification seal, plus a reference sheet with the key points, the field checklist or key data, the standards and a QR code back to the full article.

Free account · takes 30 seconds · no password

Download PDF

Need help on site? Automation Nodes designs, builds, tests and commissions LT panels, automation and electrical installations across India.