FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
8.9
FNC 08 – FOR / Start a FOR/NEXT Loop
Outline
FOR instruction specifies the number of repetition of the loop between FOR and NEXT (FNC 09) instructions.
1. Instruction format
FNC 08
FOR
2. Set data
Operand type
S
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
: This function is supported only in FX
Explanation of function and operation
Related instruction
FOR instruction and NEXT (FNC 09) instruction are set as a pair in programming.
240
Mnemonic
16-bit Instruction
3 steps
FOR
Number of repetition of the loop between FOR and NEXT instructions
[
= K1 to K32767]
S
(A value from −32768 to 0 is handled as "1".)
Digit Specification
/FX
3U
Operation Condition
32-bit Instruction
Continuous
Operation
Description
Word Devices
Special
System User
Unit
PLCs.
3UC
→ For details, refer to NEXT (FNC 09) instruction.
8 Program Flow – FNC 00 to FNC 09
8.9 FNC 08 – FOR / Start a FOR/NEXT Loop
Mnemonic
Operation Condition
−
Others
Con-
Real
Index
stant
Number
V
Z Modify K H
E
Data type
16-bit binary
Charac-
Pointer
ter String
" "
P