Mitsubishi Electric MELSEC-Q/L Programming Manual page 486

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• 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. (Page 484 Incorrect operation example)
■Incorrect operation example
The following example shows the operation performed when D0 is specified for FD0 in the subroutine program and D1 is used
in the subroutine program.
[Program example]
[Operation performed after subroutine program execution]
Before the execution
of subroutine program
D0
0
D1
10
D2
100
D3
1000
Indefinite
Indefinite
FD0
Indefinite
Indefinite
*1 Stores the execution result of the subroutine program.
*2 Replaced by the value of the function device.
*3 D1 does not reflect the operation result in the subroutine program.
7 APPLICATION INSTRUCTIONS
484
7.6 Structure Creation Instructions
Immediately after the execution
of XCALL instruction
D0
0
D1
10
D2
100
Transfer
D3
1000
0
10
FD0
100
1000
At the time of subroutine
program execution
0
D0
*1
D1
110
D2
100
Transfer
D3
1000
*1
1
10
FD0
100
1000
After the execution
of RET instruction
*2
D0
1
*3
D1
10
*2
D2
100
*2
D3
1000
Indefinite
Indefinite
FD0
Indefinite
Indefinite

Advertisement

Table of Contents
loading

Table of Contents