Chapter 13 PLC Logic and Bit Shift Instructions 279
Figure 13-7 displays the input and output files for Example 13-1.
The output files are created from the assumed input files.
13.3 Shift Left Instruction
PLC shift instructions are often used to control display signs in a
plant or outside. A flashing arrow display showing that one lane in a
highway is closed due to construction is one example. It can easily be
constructed with a PLC bit shift instruction.
0000
0002 End
NOT
NOT
Source B3:2
1111111101010101
Dest B3:3
0000000010101010
0001
OR
Bitwise Inclusive OR
Source A B3:0
5555h
Source B B3:1
FF00h
Dest B3:2
FF55h
0000
0002
End
NOT
NOT
Source B3:2
1010000011001110
Dest B3:3
0101111100110000
0001
XOR
Bitwise exclusive OR
Source A B3:0
CE3Ch
Source B B3:1
6EF2h
Dest B3:2
A0CEh
Figure 13-4. Using an OR and a NOT instruction to create a NOR instruction.
Figure 13-5. Using an XOR and a NOT instruction to create an XNOR instruction.