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

Using Symbols and Expressions
in Report Generation
Chapter 8
8Ć13
If you enter:
$CACC:1 = 50
$CACC:2 = 37
A = ($CACC:l.GT. $CACC:2)
The value of user symbol A would be 1 since 50 is greater than 37. If the
statement is false, the value of the user symbol would be 0 for false.
If you enter:
STRD =? ’ABCD’
STRE =? ‘ABCE’
A = (STRD.SEQ.STRE)
P A
The value of user symbol A would be 0 since the two strings do not match.
Report generation supports the following complement operators:
.NOT.—logical complement
~ or .BNOT.—bitwise 32-bit complement
The result of a logical complement is either 1 for true or 0 for false. For
example:
If you enter:
A = 0
P (.NOT.A)
The 1775-S4B scanner would print a 1, because A is equal to zero. If A
equals any value other than zero, the 1775-S4B scanner would return a 0
for false.
When executing the .BNOT. operator for a bitwise 32-bit complement of a
32-bit value, the 1775-S4B scanner returns the opposite state of each bit in
the value. For example:
If you enter:
P (.BNOT.B)
8.5.3
Complement Operation