278 Programmable Logic Controllers: Hardware and Programming
Example 13-1
For this example, assume that an expanded chassis SLC 503
PLC has two input modules (I:1/0 and I:2/0) and one output module
(O:3/0). A logic one output must be generated whenever values of two
input ports do not match. In an Exclusive OR instruction, the output
is high if one input is low and the second one is high. Figure 13-6
displays the PLC ladder logic diagram for Example 13-1.
Figure 13-2. Binary bit data files for the logic
instructions shown in Figure 13-1.
0000
0002
End
NOT
NOT
Source B3:2
0000000010101010
Dest B3:3
1111111101010101
0001
AND
Bitwise AND
Source A B3:0
AAAAh
Source B B3:1
00FFh
Dest B3:2
00AAh
Figure 13-3. AND and NOT instructions can be combined to create a NAND instruction.