Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
7-113
CALL(P)
1
2
3
4
6
6
7
8
7.6 Structure creation instructions
7.6.3 Subroutine program calls (CALL(P))
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.
(8) Up to 16 nesting levels are possible with the CALL(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.
(9) Devices which are turned ON within subroutine programs will be latched even if the
subroutine program is not executed. Devices which are turned ON during the execution of a
subroutine program can be turned OFF by the execution of the FCALL(P) instruction.
D0
D3
D2
D1
0
Indefinite
Indefinite
Indefinite
Indefinite
1000
0
100
10
D0
D3
D2
D1
0
1000
100
10
0
1000
0
100
10
Immediately after the
execution of CALL
instruction
D0
D3
D2
D1
33 *2
Indefinite
Indefinite
Indefinite
Indefinite
1000 *2
100
100 *2
1 *2
D0
D3
D4
D4
D2
D1
0
1000
100
1 *1
33 *1
1000
100 *1
100
10
After the execution
of RET instruction
FD0 FD0 FD0 FD0
D4
D4
Transfer
Transfer
Before the execution
of subroutine program
At the time of
subroutine program
execution
P0CALL
FEND RET RET RET
END
P0
P10
P20
CALL P10 CALL P20