EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Loop Instruction

LS Industrial Systems XBC-DR10E
542 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Instruction Details
XBC E-Type Main Unit 6-288 Ve r. 1
6.39 Loop Instruction
6.39.1 FOR, NEXT
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x
R.x
Con
st
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
FOR
n
O
O
O
-
O
O
O
-
O
-
-
O
O
O
O
O
2
O - -
NEXT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1
Operand Description Data Type
n Number of times to execute FOR~NEXT WORD
1) FOR~NEXT
(1) PLC meeting FOR in RUN mode will execute the process between FOR and NEXT instructions for “n”
times and then the next step of NEXT instruction.
(2) 1 ~ 65535 is available for “n”.
(3) NESTING of FOR~NEXT up to 16 times is possible. If this is exceeded, program downloading will be
unavailable.
(4) BREAK instruction can be used as another method to escape from FOR~NEXT loop.
(5) Since scan time may be longer than expected, use WDT instruction to not exceed WDT setting limit.
2) Program Example
PLC executes FOR~NEXT for 2 times in RUN mode.
NEXT
2
FOR
FOR
NEXT
FOR
n
NEXT

Table of Contents

Related product manuals