User guide
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 DWXX 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 ISXX and DWXX are combined.
2-7 Structured DO Command
DWXX (DO WHILE)
Expansion
condition
(AND · OR)
Input
condition
(I/O · Flag)
Command
Post
(Output port · Flag)
Command Operand 1 Operand 2
Optional Optional DWXX Variable no. Data · Variable no.
DWXX
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.