6F3B0250
Basic Hardware and Function 223
7. Instructions

FUN 132 FOR FOR (FOR-NEXT loop)

Expression
Input -[ FOR
n
]- Output
Function
When the input is ON, the program segment between FOR and NEXT is executed
n
times repeatedly
in a scan.
When the input is OFF, the repetition is not performed. ( the segment is executed once)
Execution condition
Input Operation Output
OFF No repetition OFF
ON Repetition ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
n
Repetition
times ÖÖÖÖÖÖÖÖÖÖ
1 - 32767
Example
This segment is executed 30 times repeatedly in a scan.
When R005 is ON, the program segment between FOR and NEXT is executed 30 times in a scan.
R005
| | [ FOR 30 ]
[ NEXT ]
Executed 30 times in a scan when
R005 is ON.
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net