Mitsubishi MELSEC Q Series Programming Manual page 506

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

Advertisement

XCALL
(7) Up to 16 nesting levels can be used with the XCALL instruction. However, this 16 levels is
the total number of levels in the CALL(P), FCALL(P), ECALL(P), EFCALL(P), and XCALL
instructions.
(8) The device used for the argument of the XCALL instruction must not be used in a subroutine
program.
If used, it will not be possible to perform correct calculations.
(Refer to the following program example.)
The processing to be executed when D1 is used in a subroutine program with D0 designated
for FD0 in a subroutine program is shown below.
[Program example]
[Operation performed after subroutine program execution]
Before the execution
of subroutine program
D0
D1
D2
D3
Indefinite
Indefinite
FD0
Indefinite
Indefinite
*1: Stores the execution result of the subroutine program.
*2: Replaced by the value of the function device. D1 does not reflect the operation result in the subroutine
program.
7-132
XCALL
P0 X0
XCALL
FEND
END
Immediately after the
execution of
XCALL instruction
0
D0
10
D1
100
D2
Transfer
1000
D3
1000
FD0
1000
P0
P10 X10
XCALL
P20 X20
RET
RET
At the time of
subroutine program
execution
0
D0
10
D1
110
100
D2
100
D3
1000
0
1
10
FD0
100
100
1000
P20
RET
After the execution
of RET instruction
0
D0
1
*1
D1
10
D2
100
Transfer
1000
D3
*1
Indefinite
10
Indefinite
FD0
Indefinite
Indefinite
*2
*2
*2
*2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents