286 Programmable Logic Controllers: Hardware and Programming
When the PLC starts operating, all the lights are off. Closing the
switch in rung 0000 starts the timer. After four seconds, the timer done
status coil (T4:0/DN) energizes. Then, the normally closed contact in
rung 0000 (T4:0/DN) opens and the normally open contact in rung
0001 (T4:0/DN) closes.
When the normally closed contact in rung 0000 opens, the non-
retentive timer ON-delay zero (T4:0) resets the content of its accumu-
lated register to zero (T4:0.ACC = 0). When the normally open contact
in rung 0001 closes, the bit shift right instruction (BSR) shifts the bit
B3/3 to the right.
Now, the bit B3/2 is high. Therefore, red pilot light (Red_PLT)
turns on.
Notice that the non-retentive timer ON-delay (T4:0) resets when
normally closed contact (T4:0/DN) is opened. After another four sec-
onds, the timer done coil (T4:0/DN) energizes. Then, the BSR instruc-
tion shifts the bits to the right once more. Now, the white pilot light
(White_PLT) turns on and the red pilot light (Red_PLT) turns off.
Following the pattern, you can see that each of the output lights
(O:2/0, O:2/1, and O:2/2) will turn on sequentially for four seconds. Then,
all the outputs turn off and the process continues until the switch in rung
0000 is opened to stop the timer instruction. Closing the normally open
reset pushbutton in rung 0006 can also reset the BSR instruction.
13.5 LogixPro Simulator Examples
Example 13-4
The diagram in Figure 13-14 shows the programming for a rotat-
ing bit shift left function. Pressing the pushbutton at address I:1/0
shifts the bits in file #B3 to the left once. Closing the switch at address
I:1/1 will generate pulses with a one-second duty cycle that will auto-
matically shift the bits in file #B3 to the left once every one-second
time interval. Closing the switch at address I:1/2 re-enters the unload
bit (R6:0/UL) to the beginning bit address in file #B3. This unloading
Figure 13-13. Bit data file for Example 13-3.