Chapter 4. programming – IAI America S-SEL-E User Manual
Page 177
![background image](/manuals/350298/177/background.png)
Page 172
Chapter 4. Programming
[Function]
Compares the contents of the variable in Operand 1 and the value in Operand 2. While the condition is established,
the commands are executed up to EDDO.
When the condition is not established, the program proceeds to the step after the corresponding EDDO command.
The LEAV command can be used to force the end of the loop.
When the input condition is not established, the DW
XX
command is not executed and the program proceeds to the
next step after the corresponding EDDO.
Up to 15 levels of nesting are available when IS
XX
and DW
XX
are combined.
2-7 Structured DO Command
DWXX (DO WHILE)
E x p a n s io n
c o n d itio n
(A N D · O R )
In p u t
c o n d itio n
(I/O · F la g )
C o m m a n d
P o s t
(O u tp u t p o rt · F la g )
C o m m a n d
O p e ra n d 1
O p e ra n d 2
O p tio n a l
O p tio n a l
D W X X
Va ria b le n o .
D a ta · Va ria b le n o .
DW
XX
EQ
· · ·
Operand 1 = Operand 2
NE
· · ·
Operand 1
≠
Operand 2
GT
· · ·
Operand 1 > Operand 2
GE
· · ·
Operand 1
≥
Operand 2
LT
· · ·
Operand 1 < Operand 2
LE
· · ·
Operand 1
≤
Operand 2
[Example]
DWEQ 1
0
·
·
600
LEAV
·
·
EDDO
While variable 1 is 0, the commands up to the EDDO command are repeated.
If flag 600 turns ON during this time, the loop is forced to end and the program proceeds to
the next step after the EDDO command.