Mitsubishi MELSEC Q Series Programming Manual page 497

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

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]
[MAIN]
[ABC]
[Operation performed after subroutine program execution]
Before the execution
of subroutine program
D0
0
D1
10
D2
100
Transfer
D3
1000
D4
0
Indefinite
Indefinite
FD0
Indefinite
Indefinite
*1: Stores the execution result of the subroutine program.
*2: Replaced by the value of the function device.
(7) The numbers of the devices designated by the arguments in the ECALL(P) instruction
should not overlap. If they do overlap, it will not be possible to obtain accurate calculations.
(8) 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.
ECALL
"ABC" P0
FEND
END
(9) 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.
Immediately after the
execution of ECALL
subroutine program
instruction
D0
0
D1
10
D2
100
D3
1000
0
D4
0
10
FD0
FD0
100
1000
P0
ECALL "DEF" P10
RET
At the time of
execution
D0
0
D0
D1
10
D1
Transfer
D2
100
D2
D3
1000
D3
D4
100 *1
D4
33 *1
1 *1
FD0
100
1000
P10
P20
ECALL "GHI" P20
RET
RET
ECALL(P)
1
2
3
4
6
6
7
After the execution of
8
RET instruction
33 *2
1 *2
100 *2
1000 *2
100
Indefinite
Indefinite
Indefinite
Indefinite
7-123

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents