16 IEC Structured Text
ST is a high level textual editor, which has the appearance of PASCAL but is a dedicated lan
-
guage for industrial control applications.
POUs, Functions and Function Blocks can be created using ST.
IEC Structured Text example:
IF …..THEN ….. ELSE conditions
CASE ...ELSE .... END_CASE structures
REPEAT
RETURN
Expression Evaluation
Variable Declaration etc
Complex mathematical expressions can be realised using these operators, in a few lines of text.
16.1 Structured Text Operators
Training Manual GX IEC Developer 16 - 1
IEC Structured Text Structured Text Operators
Operator Description Precedence
(….) Parenthesised express ion Highest
Function(….) Parameter list of a function, function evaluation
** Exponentiation, ie raising to a pow er
- Negation
NOT Boolean compliment
* Multiplication
/ Div ision
MOD Modulus operation
+ Addition
- Subtraction
<,>,<=,>= Comparison operators
= Equality
<> Non equality
AND, & Boolean AND
XOR Boolean exclusive OR
OR Boolean OR Lowest