Logical
> Greater than
>= Greater or equal
= Equal
< Less than
<> Not equal
<= Less or equal
AND Bitwise AND
OR Bitwise OR
XOR Bitwise exclusive OR
NOT Bitwise NOT
MUX(K, in0,.. in_n) Selects the Kth value out of a group of values
SEL(G,in0,in1) Bin. sel. btw in0 (G is FALSE) and in1 (G is TRUE)
Bitwise operations
in1 MOD in2 Modulo Division
INDEXOF(in) Internal index of POU in1; [INT]
SIZEOF(in) Number of bytes required for given data type of in
SHL(in,K) Bitwise left-shift of operator in by K
SHR(in,K) Bitwise right-shift of operator in by K
ROL(in,K) Bitwise rotation to the left of operator in by K
ROR(in,K) Bitwise rotation to the right of operator in by K
Math operations
ABS(in) Absolute value of operand in
SQRT(in) Square root of operand in
LN(in) Natural logarithm of operand in
LOG(in) Logarithm of operand in, base 10
EXP(in) Exponential function of operand in
SIN(in) Sine of operand in
COS(IN) Cosine of operand in
TAN(in) Tangent of operand in
ASIN(in) Arc sine of operand in
ACOS(in) Arc cosine of operand in
ATAN(in) Arc tangent of operand in
EXPT(in,expt) Exponentation of operand in with expt
MAX(in0,in1) Returns the greater of 2 values
MIN(in0,in1) Returns the lesser of 2 values in0 and in1
Conversion operations
BOOL_TO_<type>(in) Conv. of the boolean operand
<type>_TO_BOOL(in) Conv. to BOOL
INT_TO_<type>(in) Conv. of an INT Operand to another elementary type
REAL_TO_<type>(in) Conv. of an REAL operand to another elementary type
LREAL_TO_<type>(in) Conv. of a LREAL operand to another elementary type
TIME_TO_<type>(in) Conv. of a TIME operand to another elementary type
TOD_TO_<type>(in) Conv. of a TOD operand to another elementary type
DATE_TO_<type>(in) Conv. of a DATE operand to another elementary type
DT_TO_<type>(in) Conv. of a DT operand to another elementary type
STRING_TO_<type>(in) Conv. of a STRING operand to another elementary type
TRUNC(in) Conversion from REAL to INT
String operations
LEN(in) String length of operand in
LEFT(str, size) Left inital string of given size of string str
RIGHT(str, size) Right initial string of given size of string str
MID(str, len, pos) Partial string of str of given length
CONCAT(str1, str2) Concatenation of two subsequent strings standard.lib
INSERT(str1, str2, pos) Insert string str1 in String str2 at position pos
DELETE(str1, len, pos) Del. partial string (length len), start at pos of str1
REPLACE(str1,str2,len,pos) Repl. part. str of len by str2, start at pos of str1
FIND(str1, str2) Search for partial string str2 in str1
Timers and Counters
CTU FB: Counts up
CTD FB: Counts down
CTUD FB: Counts up and down
TP FB: trigger
TON FB: on-delay timer
TOF FB: off-delay timer
Other
' String delimiters (e.g. 'string')
^ Derefereced Pointer (e.g. pointer1^)
LIMIT(Min,in,Max) Limits the value range
ADR(in) Address of the operand in [DWORD]
RETURN Leave POU and go back to caller
EXIT Exit statement
SR Bistable FB is set dominant
RS Bistable FB is set back
SEMA FB: Software Semaphor (interruptable)
R_TRIG FB: rising edge is detected
F_TRIG FB: falling edge is detected