Address
|
Variable
|
---|---|
%M1
|
_000001
|
%I1
|
_100001
|
%IW1
|
_300001
|
%MW1
|
_400001
|
Suffix
|
Variable Type
|
|
---|---|---|
no suffix
|
%Mx, %Ix
|
EBOOL
|
%IWx, %MWx
|
UINT
|
|
I
|
INT
|
|
DI
|
DINT
|
|
UD
|
UDINT
|
|
R
|
REAL
|
|
W
|
WORD
|
Operation
|
Symbol
|
Precedence
|
---|---|---|
Parentheses
|
(expression)
|
HIGHEST
|
Function evaluation
|
identifier (argument list)
|
-
|
Negation
|
-
|
-
|
Complement
|
~
|
-
|
Exponentiation
|
**
|
-
|
Multiply
|
*
|
-
|
Divide
|
/
|
-
|
Add
|
+
|
-
|
Subtract
|
-
|
-
|
Comparison
|
< , > , <= , >=
|
-
|
Equality
|
=
|
-
|
Inequality
|
<>
|
-
|
Boolean AND
|
&
|
-
|
Boolean Exclusive OR
|
^
|
-
|
Boolean OR
|
|
|
-
|
Assignment
|
:=
|
LOWEST
|
Legacy Function Name
|
Control Expert Function Name
|
Argument Type*
|
Return Type*
|
Meaning
|
---|---|---|---|---|
ABS
|
ABS
|
S,U,L,UL,F
|
S,U,L,UL,F
|
absolute value
|
ARCCOS
|
ACOS
|
F
|
F
|
arc cosine
|
ARCSIN
|
ASIN
|
F
|
F
|
arc sine
|
ARCTAN
|
ATAN
|
F
|
F
|
arc tangent
|
COS
|
COS
|
F
|
F
|
cosine
|
COSD
|
COSD
|
F
|
F
|
cosine of degrees
|
EXP
|
EXP
|
F
|
F
|
exponent function (power of e)
(does not need to be a whole number)
|
FIX
|
REAL_TO
|
F
|
L
|
convert floating point to integer
(presumes an FP argument)
|
FLOAT
|
INT_TO
|
S, U, L, UL
|
F
|
converts integer to floating point
(presumes an integer argument)
|
LN
|
LN
|
F
|
F
|
natural logarithm (base e)
|
LOG
|
LOG
|
F
|
F
|
common logarithm (base 10)
|
SIN
|
SIN
|
F
|
F
|
sine of radians
|
SIND
|
SIND
|
F
|
F
|
sine of degrees
|
SQRT
|
SQRT
|
F
|
F
|
square root
|
TAN
|
TAN
|
F
|
F
|
tangent of radians
|
TAND
|
TAND
|
F
|
F
|
tangent of degrees
|
*: S=INT, U=UINT, L=DINT, UL=UDINT, F=REAL
|