8 APPLICATION INSTRUCTION
8.4 Structuring Instruction
395
8
8.4
Structuring Instruction
FOR to NEXT
FOR, NEXT
When the processing between the FOR and NEXT instructions is executed (n) times without any condition, the processing of
the step following the NEXT instruction is executed.
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• When the processing between the FOR and NEXT instructions is executed (n) times without any condition, the processing
of the step following the NEXT instruction is executed.
• In (n), any of 1 to 32767 can be specified. If any of -32768 to 0 is specified, the processing of (n)=1 is applied.
• To skip the processing between the FOR and NEXT instructions, jump the program execution with the CJ instruction.
• Up to 16 FOR instructions can be nested.
Ladder diagram
Structured text
A: Repetition program
Not supported
FBD/LD
Operand
Description
Range
Data type
Data type (label)
(n)
Number of repetitions of the loop between FOR and NEXT
instructions
1 to 32767
16-bit signed binary
ANY16
EN
Execution condition
Bit
BOOL
ENO
Execution result
Bit
BOOL
Operand
Bit
Word
Double word Indirect
specification
Constant
Others
X, Y, M, L, SM,
F, B, SB, S
T, ST, C, D, W,
SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(n)
FOR
NEXT
(n)
A
EN
FOR
ENO
n
EN
ENO
NEXT
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......