EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 136

Mitsubishi Electric MELSEC FX Series
838 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
Loading...
7 Applied Instructions
7.1 Program Flow
134
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
2. In the case of CALL instruction
Cautions
1) The function FEND instruction is usually added automatically during compilation.
It is not necessary to program the FEND instruction in the program block except when creating a
subroutine. As for the subroutine programs, refer to the following.
Refer to Section 7.1.2.
2) When FEND instruction is programmed two or more times, put a subroutine program or interrupt routine
program between the last FEND instruction and END instruction.
3) When CALL or CALLP instruction is used, put a label after FEND instruction. And the SRET instruction is
required in every case.
4) When CALL or CALLP instruction is used, if FEND instruction is executed after CALL or CALLP
instruction was executed and before SRET instruction is executed, an error is caused.
5) When FOR instruction is used, if FEND instruction is executed after FOR instruction was executed and
before NEXT instruction is executed, an error is caused.
6) When the interrupt function (I) is used, be sure to program an interrupt label (pointer) after FEND
instruction. And IRET instruction is required in every case.
CALL
EN ENO
p
I100
P21
0
When X011
is ON
When X011 is OFF
X011
Main routine program
Main routine program
Subroutine program
Interrupt routine
program
FEND
EN ENO
P21

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals