Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual
Page 79

Using Symbols and Expressions
in Report Generation
Chapter 8
8Ć11
Table 8.A
Expression Operators
Operator
Order of Execution
1
Description
~ or .BNOT.
.NOT.
/
*
%
+
Ć
>>
<<
& or .BAND.
^ or .BXOR.
| or .BOR.
.EQ.
.GE.
.GT.
.LE.
.LT.
.NE.
.SNE.
.SEQ.
.AND.
.OR.
1
1
1
2
2
3
3
4
4
5
6
7
8
8
8
8
8
8
8
8
9
10
Bitwise 32Ćbit complement
Logical complement
Bit test
Multiply
Divide
Add
Subtract
Bit Shift right
Bit Shift left
Bitwise 32Ćbit AND
Bitwise 32Ćbit EXCLUSIVE OR
Bitwise 32Ćbit OR
Compare equal
Compare grater or equal
Compare greater
Compare less or equal
Compare less
Compare not equal
String compare not equal
String compare equal
Logical AND
Logical OR
1
Order of execution moves from 1 to 10 with 1 executing first. When operators have the same order of execution number, the
order for their execution within an expression is from left to right.
The parentheses around the 6 + 3 tells the 1775-S4B scanner to execute the
contents of the inside parentheses first. Thus, the expression returns 18 as
the answer.
If two or more operators with the same level appear in an expression, the
1775-S4B scanner executes them in the order that they appear on the
statement line. For example:
(6 + 3 - 2)
The 1775-S4B scanner adds 6 and 3, then subtracts 2, and returns 7 as the
answer.
The following sections explain the functions of these operators.