EasyManuals Logo

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 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 #408 background imageLoading...
Page #408 background image
406
XCALL
[Main routine program]
(4) to can be used by the XCALL instruction.
(5) The number of function devices used by a subroutine program must be identical to the number of arguments in the
XCALL instruction. Also, the function device and the type of XCALL argument should be identical.
(6) Device numbers specified in the argument of the XCALL instruction should not overlap.
If they do overlap, it will not be possible to obtain accurate calculations.
(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]
*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.
Occupies from D0 to D3 (Transfer to FD1).
X0
D30
Occupies from D30 to D33 (Transfer to FD2).
Occupies M0 (Transfer to FX0).
D0M0P0XCALL
S1
S5
P0 X0XCALL
FEND RET RET RET
END
P0
P20
P10 X10XCALL P20 X20XCALL
D0
D3
D2
D1
0
1000
100
10
D0
D3
D2
D1
0
1000
100
10
Immediately after the
execution of
XCALL instruction
D0
D3
D2
D1
1
*2
1000
*2
100
*2
10
*2
D0
D3
D2
D1
0
1000
100
110
*1
Indefinite
Indefinite
Indefinite
Indefinite
1000
100
10
0
Indefinite
Indefinite
Indefinite
Indefinite
1000
100
10
1
*1
FD0 FD0 FD0 FD0
Transfer
Transfer
After the execution
of RET instruction
Before the execution
of subroutine program
At the time of
subroutine program
execution

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals