Chapter 13 PLC Logic and Bit Shift Instructions 277
a logic instruction is executed, the status bits in the status file are
updated. The status bits are in word S2:0 bits 0-3 in the processor
status file (S2). Descriptions of these bits are listed below.
Status Bit Description
S2:0/0 Carry (C)
S2:0/1 Overflow (O)
S2:0/2 Zero (Z)
S2:0/3 Sign (S)
0000
0004 End
NOT
NOT
Source B3:0
1111111100000000
Dest B3:1
0000000011111111
0001
AND
Bitwise AND
Source A B3:2
AAAAh
Source B B3:3
00FFh
Dest B3:4
00AAh
0002
0003
OR
Bitwise inclusive OR
Source A B3:5
5555h
Source B B3:6
FF00h
Dest B3:7
FF55h
XOR
Bitwise exclusive OR
Source A B3:8
CE3Ch
Source B B3:9
6EF2h
Dest B3:10
A0CEh
Figure 13-1. The four logic instructions for Allen-Bradley SLC 500 series PLCs.
Previous Page Next Page