Mitsubishi Electric M800VW Series Programming Manual page 283

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.5 Program Branch Instructions
 Operation errors
 In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The BREAK instruction is used in a case other than with the FOR to NEXT instruction loop. (Error code: 32)
- The jump destination for the pointer designated by Pn does not exist. (Error code: 85)
- The pointer of another program file is designated for Pn. (Error code: 85)
 Program example
 The following program forces the FOR to NEXT loop to end when the value of D2 reaches 30 (when the FOR to NEXT loop
has been executed 30 times).
10
14
19
22
= D0 K30
36
P0
40
[Remark]
 The value 71 is stored at D1 as the remaining number of repetitions when the BREAK instruction is executed.
IB-1501667-B
[Ladder mode]
M30
MOV K0 D0
FOR K100
M30
INC D0
BREAKP D1 P0
Steps
10
11
14
19
20
22
25
NEXT
36
40
262
[List mode]
Inst.
Device
LD
M30
MOV
K0
D0
FOR
K100
LD
M30
INC
D0
LD=
D0
K30
BREAKP
D1
P0
NEXT
P0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents