Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 158

Advertising
background image

5.5 Program Control Instructions

5.5.7 WHILE Construct (WHILE, END_WHILE)

5-89

Instructions

5

( 3 ) Programming Example

In the following programming example, the registers from MW00100 to MW00105 are added together and stored in
the MW00000 register.
The conditional expression is I

≤ 5, so the ADD instruction is executed while I is 0 to 5.

The conditional expression is no longer satisfied when I is 6, so program execution jumps to the next step following the
END_WHILE instruction.

Execution of the programming is repeated for as long as the conditional expression for the WHILE instruction
is satisfied.
If the conditional expression never becomes unsatisfied, or if it takes too much time to become unsatisfied, the
Machine Controller system will shut down.
In the example given above, an endless loop would occur if the programming did not include the instruction
that increments I.

IMPORTANT

Advertising
This manual is related to the following products: