Reference – Lenze E94P PositionServo with MVOB User Manual
Page 104
![background image](/manuals/566023/104/background.png)
102
L
PM94H201B_13xxxxxx_EN
Reference
Table 61: WAIT
WAIT
Wait
Statement
Purpose
This statement suspends the execution of the program until logical condition or conditions are met.
Conditions can include logical expressions, time expiration, or completion of motion commands.
Syntax
WAIT UNTIL <expression>
wait until expression becomes TRUE
WAIT WHILE <expression>
wait while expression is TRUE
WAIT TIME <time delay>
wait until <time delay> in mS is expired
WAIT MOTION COMPLETE
wait until last motion in Motion Queue completes
<expression>
Logical expression evaluating to True or False
<time delay>
time delay expressed in milliseconds
Remarks
Events that have been declared and enabled will continue to process while the main program
executes a WAIT statement. Events containing a JUMP statement could interrupt a WAIT statement
and cause an immediate jump to another point in the main program.
See Also
Example:
WAIT UNTIL (APOS>2 && APOS<3)
;Wait until Apos is > 2 and APOS < 3
WAIT WHILE (APOS <2 && APOS>1) ;Wait while Apos is <2 and >1
WAIT TIME 1000
;Wait 1 Sec (1 Sec=1000mS)
WAIT MOTION COMPLETE
;Wait until motion is done
Table 62: WHILE / ENDWHILE
WHILE/
ENDWHILE
While
Statement
Purpose
The WHILE <expression> executes statement(s) between keywords WHILE and ENDWHILE
repeatedly while the expression contained in the WHILE statement evaluates to TRUE.
Syntax
WHILE <expression>
{statement(s)}…
ENDWHILE
Remarks
WHILE block of statements has to end with ENDWHILE keyword.
See Also
DO/UNTIL
Example:
WHILE APOS<3
;Execute the statements while Apos is <3
{statement(s)}..
ENDWHILE