EasyManuals Logo

Mitsubishi MELSEC-A series Programming Manual

Mitsubishi MELSEC-A series
508 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #291 background imageLoading...
Page #291 background image
7. APPLICATION INSTRUCTIONS
7 89
MELSEC-A
(4) Up to five levels of the nesting of FOR is allowed.
Operation Errors In the following cases, operation occurs and the PC stops its operation.
After the execution of FOR instruction, the END (FEND) instruction has been
executed before the NEXT instruction is executed.
The NEXT instruction has been executed before the FOR instruction is executed.
The number of the FOR instructions is different from that of the NEXT
instructions.
The JMP instruction is executed in the FOR to NEXT processing to exit from the
FOR to NEXT processing.
There is a STOP instruction in the FOR to NEXT processing.
Program Example FOR , NEXT
Program which executes the FOR to NEXT instructions when X8 is off and does not
execute the FOR to NEXT instructions when X8 is on.
NEXT
NEXT
NEXT
X000
X001
X002
Up to five levels of the
nesting of FOR is allowed.
K
FOR 5
K
FOR 3
K
FOR 100
()
X008
M0
M0
0
4
10
13
22
23
P8
CJ P8
K
FOR 4
INC Z
MOV Z D0
MOV 0 Z
Z
NEXT
Y033
Coding
0 LD X008
1 CJ P8
4 LDI M0
5 MOV K0 Z
10 FOR K4
13 LDI M0
14 MOV Z D0Z
19 INC Z
22 NEXT
23 P8
24 LD X00A
25 OUT Y033
26 END
X00A
K

Table of Contents

Other manuals for Mitsubishi MELSEC-A series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-A series and is the answer not in the manual?

Mitsubishi MELSEC-A series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-A series
CategoryController
LanguageEnglish

Related product manuals