Subroutines SECTION 4 CX-Supervisor Script Language
29
In this example, the fill for 'Ellipse_1' is gradually removed 20 times (100
times/-5).
4-3-5 DO WHILE/UNTIL Loop
Syntax
DO WHILE expression
statementblock
LOOP
or
DO
statementblock
LOOP WHILE expression
or
DO UNTIL expression
statementblock
LOOP
or
DO
statementblock
LOOP UNTIL expression
Remarks
Typical Example
DO WHILE dooropen == TRUE
Message ("You must shut the door before
continuing")
LOOP
DO
nextchar = Mid (Mystring, position, 1)
position = position + 1
LOOP UNTIL nextchar = "A"
4-4 Subroutines
4-4-1 Call
Syntax
CALL subroutine (arguments)
Remarks
Note: Loop statements should be used with caution, as they consume processor
time while they are running and some other parts of the system may not be
updated.
Argument Description
expression The expression may be a point, or a calculation of
constants and/or points that produces a result.
statementblock One or more statements to be executed multiple times
depending on expression.
Note: Loop statements should be used with caution, as they consume processor
time while they are running and some other parts of the system may not be
updated.