U511 User’s Manual Programming Commands
Version 1.1 Aerotech, Inc. 5-101
5.5.85. WHILE/ENDWHILE
The WHILE command evaluates the expression and if true, executes to the ENDWHILE
statement. The ENDWHILE statement returns to the WHILE statement and the loop is
executed until the expression becomes false.
SYNTAX:
WHILE (expression)
WH (expression)
ENDWHILE
ENDW
expression Any valid U511 expression.
EXAMPLE:
V0=0 ;Assign zero to variable
WHILE (V0<10) ;Do while variable less than 10
G1 X10 F1000 ;Move axis
V0=V0+1 ;Increment variable by 1
ENDWHILE ;Return to WHILE as long as V0 less than 10. Otherwise
;quit
Related commands:
LOOP, NEXT, IF, GOTO
∇ ∇ ∇
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com