Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
6 - 134
6 MOTION PROGRAMS FOR POSITIONING CONTROL
6.16.3 Program control function (WHILE, DO, END statements)
Code WHILE, DO, END
Function Program control function
The flow of execution program is controlled based on the condition.
Format
WHILE identification number
(1 to 32)
W[
conditional expression
]
HILE
O
D
m;
ENDm ;
[Explanation]
(1) While the [conditional expression] holds, blocks between the next block and
ENDm block are executed repeatedly, and when it does not hold, execution shifts
to the block next to ENDm.
(2) WHILE [conditional expression] DOm and ENDm are used in pairs.
The range of identification No. m is 1 to 32.
(3) The multiprogramming depth of the WHILE statement is up to three levels.
[Example] (1) The identification No. m can be used any number of times as
desired.
WHILE [ ] D01 ;
END1 ;
WHILE [ ] D05 ;
END5 ;
WHILE [ ] D01 ;
END1 ;
:
:
:
:
:
(2) The multiprogramming depth is up to three levels.
WHILE [ ] D01 ;
WHILE [ ] D02 ;
WHILE [ ] D03 ;
END3 ;
END2 ;
END1 ;
(Third level) (Second level) (First level)
:
:
:
:
: