beautypg.com

8ć14 – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 82

background image

Using Symbols and Expressions

in Report Generation

Chapter 8

8Ć14

If user symbol B’s bit pattern contains:

1001001100000000

The 1775-S4B scanner would return the following for the expression:

0110110011111111

Report generation supports the following bitwise operators:

& or .BAND.—bitwise 32-bit AND

^ or .BXOR.—bitwise 32-bit EXCLUSIVE OR

| or .BOR.—bitwise 32-bit OR

Bitwise operators enable you to manipulate 32-bit values. For example:

If you enter:

G=(Q.BAND.T)

G stores a 32-bit result of the binary AND operation between user symbols
Q and T. You can also use.BXOR. and.BOR. operators to perform binary
EXCLUSIVE OR and binary OR operations.

Report generation supports the following logical operators:

.AND.—logical AND

.OR.—logical OR

Logical operations return 1 if the expression is true and 0 if the expression
is false. For example:

If you enter:

A=10
B=9
C=3
D=4
P (A.GT.B .AND. C.NE.D)

The 1775-S4B scanner prints out a 1 in this case because 10 is greater than
9 and 3 is not equal to 4.

8.5.4
Bitwise Operations

8.5.5
Logical Operations