________________________________________________________________________________________________________
1592025400 – Vers. 1.0
- 56
-
8. PROGRAMMING LANGUAGES
8.1 ST language – General concepts
The environment of ST language is composed by:
•
STATEMENT
:=
assignment
( )
priority
IF, THEN, ELSE, ELSIF, END_IF;
binary
selection
CASE, OF, ELSE, END_CASE;
selection
WHILE, REPEAT, END_WHILE, END_REPEAT;
iterations
FOR, TO, BY, DO, END_FOR;
indexed
iterations
RETURN;
program
termination
EXIT;
iteration statement termination
BOOLEAN OPERATOR (decreasing priority)
NOT
boolean
negation
AND
boolean
AND
OR
boolean
OR
XOR
boolean
exclusive
OR
=, <>, >=, <=, <, >
comparisons
+, -, *, /
arithmetic
operators
Beware of:
WHILE and REPEAT have to be used with special care.
arithmetic
operator can be used for integer DINT or REAL.
•
TIME
+
addition
-
subtraction
Beware of subtraction: negative timer as result means nothing.