4 ST PROGRAM EXPRESSIONS
4.3 Control Syntaxes
4.3.1 Control syntax list
4 - 6
Conditional statements and repeat statements are available for ST programs to
perform comparison and repetition.
Conditional statement: When a certain condition is satisfied, the selected statement is
Repeat statement:
The following table lists the control syntaxes.
Conditional statement
Repeat statement
Other control syntaxes
Precaution for use of a hierarchy for a control syntax
A hierarchy of up to 16 levels is enabled for a control syntax. A conversion error
will not occur if 17 or more levels are used. However, since a deep hierarchy
may make a program difficult to understand, it is recommended to program a
hierarchy up to 4 or 5 levels at the deepest.
executed.
One or more statements are executed repeatedly according to
the state of a certain variable or condition.
IF conditional statement
CASE conditional statement
FOR ... DO syntax
WHILE ... DO syntax
REPEAT ... UNTIL syntax
RETURN syntax
EXIT syntax
4 - 6