385
BREAK, BREAKP
1
2
3
4
4
6
7
8
7.6
S
tructure cr
eation
instructions
7.6.2
B
REAK, BREAK
P
: Number of the device where the remaining number of loops will be stored (BIN 16 bits)
Pn
: Number of the pointer (device name (pointer)) where the program is branched at the forced end of a loop.
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.
(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.
BREAK, BREAKP
Forced end of FOR to NEXT instruction loop
7.6.2
BREAK, BREAKP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
Other
P
Bit
Word
Bit
Word
––
––
Pn
––
––
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4203
The BREAK instruction is used in a case other than with the FOR to
NEXT instruction loop.
4210
The jump destination for the pointer specified by Pn does not exist.
The pointer of another program file is specified for Pn.
Basic
Process
High
performance
Redundant Universal
LCPU
Pn
Pn
BREAK
BREAKP
D
D
Command
Command
BREAKP
BREAK
D
D
Pn
Pn
F
orced
end
cond
i
t
i
on
* *
BR
E
A
K
K
F
OR
NE
X
T
W
hen
forced
end
cond
i
t
i
on
i
s
sat
i
sf
i
ed
D
I
f
the
BR
E
A
K i
nstruct
i
on
i
s
not
executed
,
program
returns
to
the
F
OR
i
nstruct
i
on
as
man
y
t
i
mes
as
the
number
spec
i
f
i
ed
w
i
th
the
F
OR
i
nstruct
i
on
.
D