Bradley Smoker PLC-5 user manual Logical Instructions

Models: PLC-5

1 388
Download 388 pages 13.97 Kb
Page 314
Image 314

D-14Instruction Set Quick Reference

Logical Instructions

Instruction

Description

 

 

 

AND

 

 

 

 

 

 

BITWISE AND

 

 

Source A

D9:3

 

 

 

3F37

 

Source B

D9:4

 

 

 

00FF

 

Dest

D9:5

 

 

 

0037

 

 

 

 

AND

When the input conditions are true, the controller performs an AND operation (bit-by-bit) between Source A (D9:3) and Sourc 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

D9:3

 

 

 

00FF

 

Dest

D9:5

 

 

 

FF00

 

 

 

 

NOT Operation

When the input conditions are true, the controller performs 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

D9:3

 

3F37

Source B

D9:4

 

00FF

Dest

D9:5

 

3FFF

OR

When the input conditions are true, the controller performs an 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

D9:3

 

3F37

Source B

D9:4

 

3F37

Dest

D9:5

 

0000

Exclusive OR XOR

When the input conditions are true, the controller performs an exclusive OR operation (bit-by-bit) between Source A (D9:3) an 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

Descriptio

Bit

 

 

C

always

 

 

V

always

 

 

Z

sets if the result is zero; otherwise

Ssets if the most significant bit (bit 15 for decimal or bit 17 for octal) is set (1); otherwise resets

Publication 1785-UM012D-EN-P - July 2005

Page 314
Image 314
Bradley Smoker PLC-5 user manual Logical Instructions