IAI America ASEL User Manual
Page 209

Part 2 Programs
Chapter 3 Explanation of Commands
187
Part 2 Programs
1.14
Structural DO
z
DW (DO WHILE)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional
Optional
DW
Variable
number
Data
CP
[Function] Compare the content of the variable specified in operand 1 with the value specified in
operand 2, and execute the subsequent commands up to EDDO while the condition is
satisfied.
The program will proceed to the step next to the corresponding EDDO if the condition is no
longer satisfied.
A LEAV command can be used to forcibly end a loop.
If the input condition is not satisfied and the DW command is not executed, the program
will proceed to the step next to the corresponding EDDO.
A maximum of 15 nests are supported when IF and IS are combined.
DW
EQ
Operand 1 = Operand 2
NE
Operand 1 z Operand 2
GT
Operand 1 > Operand 2
GE
Operand 1 t Operand 2
LT
Operand 1 < Operand 2
LE
Operand 1 d Operand 2
[Example 1]
008
DWEQ
1
0
Repeat the command up to an EDDO command while
variable 1 contains “0.”
:
:
EDDO
If DW is specified at the start and input 8 is OFF, nothing will occur and the program
will proceed to the step next to EDDO.
(Note)
Using a GOTO command to branch out of or into a DW-EDDO syntax is prohibited.
z
LEAV (Pull out of DO WHILE)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional
Optional
LEAV
Prohibited Prohibited
CP
[Function] Pull out of a DO loop and proceed to the step next to EDDO.
[Example 1]
DWEQ
1
0
Repeat the commands up to an EDDO command while
variable 1 contains ‘0.”
:
600
LEAV
Forcibly end the loop if flag 600 is ON and proceed to
the step next to an EDDO command.
:
EDDO