Valid Operators; Format Expressions - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 6
Compute/Math Instructions (CPT, ADD, SUB, MUL, DIV, MOD, SQR, SQRT, NEG, ABS)
Operator
Description
+
add
-
subtract/negate
*
multiply
/
divide
**
exponent (x to y)
ABS
absolute value
ACS
arc cosine
AND
bitwise AND
ASN
arc sine
ATN
arc tangent
COS
cosine
DEG
radians to degrees
FRD
BCD to integer
LN
natural log
LOG
log base 10
264

Valid Operators

Optimal
DINT, REAL
DINT, REAL
DINT, REAL
DINT, REAL
DINT, REAL
DINT, REAL
REAL
DINT
REAL
REAL
REAL
DINT, REAL
DINT
REAL
REAL

Format Expressions

For each operator that you use in an expression, you have to provide one or two
operands (tags or immediate values). Use the following table to format operators
and operands within an expression.
For operators that
operate on
One operand
Two operands
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Operator
Description
MOD
modulo-divide
NOT
bitwise complement
OR
bitwise OR
RAD
degrees to radians
SIN
sine
SQR
square root
TAN
tangent
TOD
integer to BCD
TRN
truncate
XOR
bitwise exclusive OR
Use this format
Operator(operand)
Operand_a operator operand_b
Optimal
DINT, REAL
DINT
DINT
DINT, REAL
REAL
DINT, REAL
REAL
DINT
DINT, REAL
DINT
Examples
ABS(tag_a)
·tag_b + 5
·tag_c AND tag_d
·(tag_e ** 2) MOD (tag_f /
tag_g)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents