224 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 5 Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ)
Determine the Order of Operation
The operations you write into the expression are performed by the instruction in
a prescribed order, not necessarily the order you write them. You can override the
order of operation by grouping terms within parentheses, forcing the instruction
to perform an operation within the parentheses ahead of other operations.
Operations of equal order are performed from left to right.
Order Operation
1.
( )
2.
ABS, ACS, ASN, ATN, COS, DEG, FRD, LN, LOG,
RAD, SIN, SQR, TAN, TOD, TRN
3.
**
4.
− (negate), NOT
5.
*, /, MOD
6.
<, <=, >, >=, =
7.
− (subtract), +
8.
AND
9.
XOR
10.
OR