A SERVICE OF

logo

8. Function Commands
BREAK, BREAKP
- 233 -
Program example
(1) Program to force FOR to NEXT loop to end when D0 data reaches 30, that is, FOR to NEXT loop
has been executed 30 times.
Coding
No. of
steps
Com-
mand
Device
10 LD M30
11 MOV K0 D0
14 FOR K100
19 LD M30
20 INC D0
22 LD= D0 K30
25
BREAKP
D1 P0
36 NEXT
10
14
19
22
36
40
M30
M30
MOV K0 D0
40 P0
Caution
(1) The value 71 is stored in D1 when the BREAK command is executed in the program above.
(2) Be sure not to use the BREAK or BREAKP command in a case other than with the FOR to NEXT
loop.
(3) Be sure that the pointer No. designated with Pn exists in the program file.