Delta AS Series Programming Manual page 704

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
1302
BREAK
Device
X
Y
M
D
Data
type
D
Symbol
Explanation
1.
This instruction terminates the FOR/NEXT loop. The remaining number of times the FOR/NEXT loop can be
repeated is stored in D. After the loop has executed D times, the program jumps to the NEXT instruction and
executes the instruction after the NEXT instruction.
2.
When the instruction is executed, the remaining number of times the FOR/NEXT loop can be repeated is stored in
D, including this time the instruction BREAK is executed.
3.
When the BREAK instruction is executed for the first time to terminate the FOR/NEXT loop, the program does not
jump out of the FOR/NEXT loop to execute the next instruction. If the BREAK instruction is executed more than one
time to terminate the FOR/NEXT loop, the program jumps to the NEXT instruction and executes the instruction
following the NEXT instruction.
Example
When the FOR/NEXT loop is executed, 1 is added to the value in D0. When the value in D0 is equal to 30, the
FOR/NEXT loop is terminated, and the remaining number of times the FOR/NEXT loop can be repeated, i.e. 71, is stored
in D10. The execution of the program jumps to LABEL 1:, i.e. network 6, and 1 is added to the value in D2.
Operand
D
S
T
C
HC
D
Pulse instruction
Ch ap te r 6 Ap pl ie d Instruc ti ons
Function
Terminating the FOR-NEXT loop
FR
SM
SR
E
16-bit instruction
AS
Device where the remaining number
D :
of times the loop can be executed is
stored
K
16#
"$"
F
32-bit instruction
6 - 4 2 5
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents