# Shift Registers - Programmable Logic controllers

A register is a number of internal relays grouped together, normally 8, 16, or 32. Each internal relay is either effectively open or closed, these states being designated 0 and 1. The term bit is used for each such binary digit. Therefore, if we have eight internal relays in the register, we can store eight 0/1 states. Thus we might have, for internal relays:1 2 3 4 5 6 7 8and each relay might store an on/off signal such that the state of the register at some instant is: 1 0 1 1 0 0 1 0

that is, relay 1 is on, relay 2 is off, relay 3 is on, relay 4 is on, relay 5 is off, and so on. Such an arrangement is termed an 8-bit register. Registers can be used for storing data that originate from input sources other than just simple, single on/off devices such as switches.With the shift register it is possible to shift stored bits. Shift registers require three inputs:

One to load data into the first location of the register, one as the command to shift data along by one location, and one to reset or clear the register of data. To illustrate this idea, consider the following situation where we start with an 8-bit register in the following state:

1 0 1 1 0 0 1 0

Suppose we now receive the input signal 0. This is an input signal to the first internal relay. Input 0

! 1 0 1 1 0 0 1 0

If we also receive the shift signal, the input signal enters the first location in the register, and all the bits shift along one location. The last bit overflows and is lost. Overflow 0

0 1 0 1 1 0 0 1 !

Thus a set of internal relays that were initially on, off, on, on, off, off, on, off are now off, on, off, on, on, off, off, on.

The grouping together of internal relays to form a shift register is done automatically by a PLC when the shift register function is selected. With the Mitsubishi PLC, this is done using the programming code SFT (shift) against the internal relay number that is to be the first in the register array. This then causes a block of relays, starting from that initial number, to be reserved for the shift register.