Fsc Expressions; 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

Operator
Description
+
Add
-
Subtract/negate
*
Multiply
/
Divide
=
Equal
<
Less than
<=
Less than or equal
>
Greater than
>=
Greater than or equal
<>
Not equal
**
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
Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)

FSC Expressions

You program expressions in FSC instructions the same as expressions in CMP
instructions. Use the following sections for information on valid operators,
format, and order of operation, which are common to both instructions.

Valid Operators

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

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
LN
Natural log
LOG
Log base 10
MOD
Modulo-divide
NOT
Bbitwise 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
Chapter 8
Optimal
REAL
REAL
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)
367

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents