EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 477

Mitsubishi Electric MELSEC-Q/L
1084 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 APPLICATION INSTRUCTIONS
7.6 Structure Creation Instructions
475
7
Correct operation example
The following example shows the operation performed when D0 is specified for FD0 in the subroutine program and D4 is used
in the subroutine program.
[Program example]
[Operation performed after subroutine program execution]
*1 Stores the execution result of the subroutine program.
*2 Replaced by the value of the function device.
The device numbers specified as the arguments of the ECALL(P) instruction should not overlap. If they do overlap, it will
not be possible to obtain accurate calculations.
Up to 16 levels of nesting can be used with the ECALL(P) instruction. However, this 16 levels is the total number of levels in
the CALL(P), FCALL(P), ECALL(P), EFCALL(P), and XCALL instructions.
Devices which are turned ON within subroutine programs will be latched even if the subroutine program is not executed.
Devices turned ON during the execution of a subroutine program can be turned OFF by the EFCALL(P) instruction.
[MAIN]
[ABC]
D0
D3
D2
D1
0
Indefinite
Indefinite
Indefinite
Indefinite
1000
100
10
D0
D3
D4
D2
D1
0
1000
100
10
0
1000
100
10
D0
D3
D2
D1
33 *2
Indefinite
Indefinite
Indefinite
Indefinite
1000 *2
100 *2
1 *2
D0
D3
D2
D1
0
1000
100
1 *1
33 *1
1000
100
10
D4 0 0
D4 100D4100 *1
After the execution of
RET instruction
FD0
FD0 FD0 FD0
Immediately after the
execution of ECALL
instruction
Transfer
Transfer
Before the execution
of subroutine program
At the time of
subroutine program
execution
"ABC" P0ECALL
FEND RET RET RET
END
P0
P10
P20
ECALL "DEF" P10 ECALL "GHI" P20

Table of Contents

Related product manuals