14 structural do – IAI America XSEL-KE User Manual

Page 196

Advertising
background image

181

Part 4 Commands

1.14 Structural

DO

z DWXX (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

DWXX

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 DWXX command is not executed, the program
will proceed to the step next to the corresponding EDDO.
A maximum of 15 nests are supported when IFXX and ISXX are combined.

DWXX

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
YDULDEOHFRQWDLQV³´

:

:

EDDO

If DWXX 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 DWXX-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 DOXX loop and proceed to the step next to EDDO.

[Example 1]

DWEQ

1

0

Repeat the commands up to an EDDO command while
YDULDEOHFRQWDLQVµ´

:

600

LEAV

Forcibly end the loop if flag 600 is ON and proceed to
the step next to an EDDO command.

:

EDDO

Advertising
This manual is related to the following products: