7 APPLICATION INSTRUCTIONS
7.4 Structure Creation Instructions
571
7
Ex.
Correct operation: While D0 is specified for FD0 in the subroutine program, D4 is used in the subroutine program.
• The device numbers specified by the ECALL(P) instruction arguments must not be overlapping. If they are overlapping,
normal operation cannot be performed.
• Up to 16 ECALL(P) instructions can be nested. Note that the 16-level nesting is the total of the CALL(P), FCALL(P),
ECALL(P), EFCALL(P), and XCALL instructions.
• Devices which are turned on in the subroutine program are retained even while the subroutine program is not executed.
Devices which are turned on during execution of the subroutine program can be turned off by the EFCALL(P) instruction.
Precautions
• An FBD/LD program cannot be created as a subroutine program.
• FBD/LD does not support the execution of a subroutine program with an argument.
(1) The operation result of the subroutine program is stored.
(2) These values are replaced with the function device values.
(3) Undefined values are stored.
M0
P0
/
K100
K3
FD0
FEND
M0
"ABC"
ECALL
P0
D0
[MAIN]
[ABC]
+
K100
D4
RET
1000
100
10
0
1000
100
1
33
FD0
FD0
FD0
FD0
1000
100
10
0
1000
100
10
0
1000
100
10
1000
0
0
100
100
100
1
33
D0
D1
D2
D3
D0
D1
D2
0
D0
D1
D2
D3
D0
D1
D2
D3
D0
D1
D2
D3
(2)
(2)
(2)
(2)
(1)
D0
D0
D0
D3
D4
D4
D4
D4
D4
D4
D4
D4
(1)
(1)
(3)
(3)
(3)
(3)
(3)
(3)
(3)
(3)
Before the execution of
the subroutine program
Immediately after the execution of
the ECALL instruction
At the execution of
the subroutine program
After the execution of
the RET instruction
ʺABCʺ P0
ECALL
FEND
RET
RET
RET
END
P0
P10
P20
ECALL ʺDEFʺ P10
ECALL ʺGHIʺ P20
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......