Rockwell Automation 1785 PLC-5 User Manual Page 314

  • Download
  • Add to my manuals
  • Print
  • Page
    / 388
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 313
Publication 1785-UM012D-EN-P - July 2005
D-14 Instruction Set Quick Reference
Logical Instructions
Instruction Description
AND
NOT Operation
OR
Exclusive OR
XOR
AND
BITWISE AND
Source A
Source B
Dest
D9:3
D9:4
D9:5
3F37
00FF
0037
When the input conditions are true, the controller performs a
n
AND operation (bit-by-bit) between Source A (D9:3) and Sour
c
B (D9:4) and stores the result in the Destination (D9:5). The
truth table for an AND operation is:
Source ASource BResult
000
100
010
111
NOT
NOT
Source A
Dest
D9:3
D9:5
00FF
FF00
Wh
en t
h
e
i
nput con
di
t
i
ons are true, t
h
e contro
ll
er per
f
orms a
NOT (takes the opposite of) operation (bit-by-bit) on the Sourc
(D9:3) and stores the result in the Destination (D9:5). The trut
table for a NOT operation is:
SourceDestination
01
10
OR
BITWISE INCLUSIVE OR
Source A
Source B
Dest
D9:3
D9:4
D9:5
3F37
00FF
3FFF
When the input conditions are true, the controller performs a
n
OR operation (bit-by-bit) between Source A (D9:3) and Source
(D9:4) and stores the result in the Destination (D9:5). The trut
table for an OR operation is:
Source ASource BResult
000
101
011
111
XOR
BITWISE EXCLUSIVE OR
Source A
Source B
Dest
D9:4
D9:5
3F37
3F37
0000
D9:3
When the input conditions are true, the controller performs a
n
exclusive OR operation (bit-by-bit) between Source A (D9:3) a
n
Source B (D9:4) and stores the result in the Destination (D9:5)
The truth table for an XOR operation is:
Source ASource BResult
000
101
011
110
Status
Bit
Descriptio
C
V
Z
S
always
always
sets if the result is zero; otherwise
sets if the most significant bit (bit 15 for decimal or bit 17 for
octal) is set (1); otherwise resets
Page view 313
1 2 ... 309 310 311 312 313 314 315 316 317 318 319 ... 387 388

Comments to this Manuals

No comments