Mitsubishi Electronics C6 Home Safety Product User Manual


 
8. Function Commands
FOR, NEXT
- 230 -
{ FOR, NEXT ... Command loop
Usable device
Bit device Word device
Con-
stant
Pointer
X Y M L F BSB T SM VTCDRWSWZSDKH P
Digit
desig-
nation
Index
No. of
steps
n
{ { { { { { { { {
5/4
(Note) "n" is used with FOR command.
FOR
n
FOR
Setting data
Number of repetitions
of the FOR to NEXT
loop
(from 1 to 32767).
n
NEXT
Repeated program
NEXT
Function
(1) After the processing in the FOR to NEXT loop is executed n-times without conditions, the step
following the NEXT command will be executed.
(2) The value of "n" can be designated at between 1 and 32767.
If it is designated at a value of from, -32768 to 0, it will be executed as though n=1.
(3) If you do not desire to execute the processing called for within the FOR to NEXT loop, use the CJ
command to jump past it.
(4) FOR command can be nested up to 16 deep.
FOR command can be
nested up to 16 deep.
K5FOR
K3FOR
K100FOR
NEXT
NEXT
NEXT
X
X1
X2