2 repeat (while wend), 1) overview, 2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual

Page 196

Advertising
background image

8.4 Program Control Commands

8-89

8

Command Reference

8.4.2 Repeat (WHILE WEND)

(1) Overview

The Repeat commands (WHILE WEND) repeatedly execute the blocks from WHILE and WEND as long as the
conditional expression is satisfied. When the conditional expression is no longer satisfied, program execution
will jump to the block after WEND.

• Nesting of the repeat commands (WHILE WEND) is restricted to a maximum of eight levels.
• If the repeated program section is created using only commands for which processing is completed in one

scan, the Machine Controller may be overloaded by the scan processing, resulting in scan time over or
watchdog timer error.
When using a command for which processing is completed in one scan, be sure to enter EOX (SCAN
WAIT) or TIM (DWELL TIME).
Refer to 7.5 Commands and Execution Scans for information on the commands for which processing is
completed in one scan.

(2) Format

Motion Programs

Sequence Programs

Applicable

Applicable

Conditional

expression

Process

Not satisfied

Satisfied

IMPORTANT

WHILE (conditional_expression) ;
··· ;
(Process) ;
··· ;
WEND ; " End of Repeat

Advertising