Structure Creation Instructions; Structure Creation Instructions; For To Next Instruction Loop - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

7.6

Structure Creation Instructions

FOR to NEXT instruction loop

FOR, NEXT
High
Basic
Process
Redundant Universal
performance
FOR
NEXT
n:
Number of repetitions of FOR to NEXT loop (1 to 32767) (BIN 16 bits)
Setting
Internal device
data
Bit
Word
n
Processing details
• When the processing in the FOR to NEXT loop is executed n-times without conditions, the step following the NEXT
instruction will be executed.
• The value of n can be designated at between 1 and 32767. If it is designated from -32768 to 0, the processing which is
executed when n=1 will be performed.
• If you do not desire to execute the processing called for within the FOR to NEXT loop, use the CJ or SCJ instruction to
jump.
• FOR instructions can be nested up to 16 deep.
FOR
X
FOR
X1
FOR
X2
LCPU
Repeat program
R, ZR
J\
Bit
K5
K3
FOR instructions can be
K100
nested up to 16 deep.
NEXT
NEXT
NEXT
FOR
U\G
Zn
Word
7 APPLICATION INSTRUCTIONS

7.6 Structure Creation Instructions

n
NEXT
Constant
Others
K, H
457
7

Advertisement

Table of Contents
loading

Table of Contents