How a PLC Shift Register Works
Set where the reject pusher sits, counted in part positions from the inspection point, and the conveyor rate. Watch each bad part load a 1 into bit 0, ride along the register one bit per part and fire the pusher when it reaches the chosen bit.
Quick answer: A PLC shift register moves every bit of a word or bit array one place on each clock pulse and loads a new bit at the first position. On a conveyor, one bit per part position lets the PLC remember which parts failed inspection until they reach the reject station.
What Is a PLC Shift Register?
Many machines inspect a product at one point and act on it further down the line. The PLC must remember the result for every part between the two points, even when several parts are on the way.
A shift register does this with one bit per part position. A clock pulse from a part sensor or encoder shifts all bits one place, and the inspection result is loaded into the first bit at the same time.
The bit at the reject position is then wired to the pusher output. In IEC 61131 3 this is done with the SHL or SHR function on a word, and many PLCs also have bit shift instructions such as BSL and BSR.
How a PLC Shift Register Works: Interactive Animation
- 1Inspection sensor loads the data bit
- 2Clock pulse: one shift per part pitch
- 3Shift register, bit 0 on the left
- 4Reject pusher output driven by bit N
- 5Bad part tracked by a 1 bit
- 6Ladder logic for the shift and the output
PLC Shift Register Working Principle Step by Step
- The inspection sensor checks the part that has just arrived at position 0 and gives a 1 for a bad part and a 0 for a good one.
- A clock pulse, made once per part pitch by a sensor or an encoder count, triggers the shift instruction.
- All bits move one place towards the reject station, the oldest bit drops out of the end and the new result is loaded into bit 0.
- Because the bits move exactly as the parts move, bit N always belongs to the part at position N.
- When bit N is 1, the PLC fires the reject pusher and that bad part is removed from the line.
PLC Shift Register Labelled Diagram

PLC Shift Register Formula
Pitch time = 60 ÷ parts per minute
Delay from inspection to reject = N × pitch time
Reject output = bit N of the register word
Example: N 8, 30 parts/min: pitch time = 60 ÷ 30 = 2 s, delay = 8 × 2 = 16 s; word 37 (0000 0000 0010 0101) shifted with d = 1 gives 37 × 2 + 1 = 75 (0000 0000 0100 1011)
Main Parts of a PLC Shift Register
| Part | What it does |
|---|---|
| Data input | Inspection sensor, camera or weigh check result for the part at position 0 |
| Clock input | Part sensor or encoder count that gives one pulse per part pitch |
| Shift register | Word or bit array; SHL, SHR, BSL or BSR instruction in the PLC |
| Reject output | Bit N driving a solenoid valve for the pusher or air jet |
| Reset | Clears the register at start up or after a jam so old data does not fire the pusher |
Where a PLC Shift Register Is Used
Advantages
- Simple and fast; one instruction per clock
- Tracks many parts at once with one word
- Easy to see on a programming terminal as a row of bits
Limitations
- Only works if parts stay at a fixed pitch with no slip
- A missed or double clock pulse shifts all data out of step
- Needs a reset strategy after jams, manual removal or power loss
PLC Shift Register Field Tips and Common Problems
- Use a one shot on the clock input so the register shifts only once per pulse, however long the sensor stays on.
- Make the clock from an encoder count when possible; a part sensor can miss gaps in the product flow.
- Check the bit numbering in your PLC: on some platforms SHL moves bits towards the higher number, BSL works on a bit array.
- Add a reject confirm sensor after the pusher and alarm if a 1 bit passes without a confirmed reject.
Related Calculators and Tools
Frequently Asked Questions
What is the difference between SHL and BSL?
SHL in IEC 61131 3 shifts a whole word by a number of bits and fills with zeros. BSL type instructions shift a bit array by one and load the data bit you give it.
Why does the register need a clock?
The bits must move exactly when the parts move one pitch. Shifting every PLC scan would push the data out of the register in milliseconds.
What happens if a part is removed by hand?
Its bit keeps travelling, so the pusher may fire on an empty position or a good part. Many lines clear the register or use a tracking sensor before the reject station.
How long can a shift register be?
As long as the PLC memory allows. Words can be chained, or a bit array of hundreds of bits can be used for a long conveyor.
Learn more on the blog
PLC shift register SHL and SHR
A practical guide on instrumentationblog.in that goes deeper into this topic with field examples.
Read Full ArticleMore How It Works
All How It Works animations · Instrumentation glossary · Comparisons
