Break, Breakp - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

7.6.2

BREAK, BREAKP

Forced end of FOR to NEXT instruction loop
7.6.2
BREAK, BREAKP
BREAK
BREAKP
: Number of the device where the remaining number of loops will be stored (BIN 16 bits)
D
Pn
: Number of the pointer (device name (pointer)) where the program is branched at the forced end of a loop.
Internal Devices
Setting
Data
Bit
D
Pn
Function
(1) Forces an end to a FOR to NEXT instruction loop and shifts the operation to the pointer specified by Pn. Only a pointer
within the same program file can be assigned to Pn. If a pointer of the other program file is used, an operation error will
be returned.
Forced end condition
When forced end condition is satisfied
Pn
(2) The remaining number of the FOR to NEXT instruction loop times is stored at
Note that the remaining number includes the operation when the BREAK instruction is executed.
(3) The BREAK instruction can be used only during the execution of a FOR to NEXT instruction loop.
(4) The BREAK instruction can be used only when there is only one level of nesting. When an end is forced to the multiple
nesting levels, execute the same number of BREAK instructions for the nesting levels.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
The BREAK instruction is used in a case other than with the FOR to
4203
NEXT instruction loop.
The jump destination for the pointer specified by Pn does not exist.
4210
The pointer of another program file is specified for Pn.
Command
Command
R, ZR
Word
Bit
––
* *
FOR
K
D
BREAK
Pn
NEXT
Error details
High
Basic
performance
D
BREAK
BREAKP
D
J
\
U
\G
Word
If the BREAK instruction is not executed,
program returns to the FOR instruction
as many times as the number specified
with the FOR instruction.
.
D
Q00J/
Q00/
QnH
Q01
BREAK, BREAKP
Process
LCPU
Redundant Universal
Pn
Pn
Other
Zn
Constants
P
––
––
––
QnPH QnPRH
QnU
LCPU
1
2
3
4
4
6
7
8
385

Advertisement

Table of Contents
loading

Table of Contents