Forcibly Terminating The For To Next Instruction Loop - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Forcibly terminating the FOR to NEXT instruction loop

BREAK(P)
This instruction forcibly terminates the FOR to NEXT instruction loop and shifts the program execution to the pointer specified
by (P).
Ladder diagram
(d)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(d)
Device number storing the number of remaining loops
(P)
Pointer number of the branch destination when the loop is
forcibly terminated
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(d)
(P)
Processing details
• This instruction forcibly terminates the FOR to NEXT instruction loop and shifts the program execution to the pointer
specified by (P). Only the pointer numbers within the same program file can be specified in (P). If a pointer in another
program is specified in (P), an operation error occurs.
Forced
termination
condition
BREAK
When the forced termination
condition is satisfied
(P)
• In (d), the number of remaining FOR to NEXT instruction loops at the forced termination is stored. Note that the number
includes the loop when the BREAK(P) instructions are executed.
• The BREAK(P) instructions can be used only between the FOR and NEXT instructions.
• The BREAK(P) instructions can be used for only one nesting level. To forcibly terminate multiple nesting levels, execute as
many BREAK(P) instructions as the number of nesting levels.
Precautions
• If the branch pointer number of the BREAK instruction outside two nesting levels or more is specified, an operation error
occurs and the program execution stops when the BREAK instruction is executed.
7 APPLICATION INSTRUCTION
342
7.4 Structuring instruction
(P)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
FOR
K**
(d)
(P)
NEXT
Structured text
Not supported
Range
Double word Indirect
U\G
Z
LC
LZ
When the BREAK instruction is
not executed, the program
execution returns to the FOR
instruction as many times as
specified by the FOR
instruction.
Data type
Data type (label)
16-bit signed binary
ANY16
Device name
ANY16
Constant
specification
K, H
E
Others
$

Advertisement

Table of Contents
loading

Table of Contents