Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 584

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Ex.
Correct operation: While D0 is specified for FD0 in the subroutine program, D4 is used in the subroutine program.
M0
P0
M0
Before the execution of
the subroutine program
D0
0
D1
10
D2
100
D3
1000
0
D4
(3)
(3)
FD0
(3)
(3)
(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.
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.
Operation error
Error code
Description
(SD0)
2820H
The device specified in an argument from (s1) to (s5) cannot be secured for the data size.
3360H
More than 16 XCALL instructions are nested. (The 17th instruction is executed.)
3380H
The subroutine program corresponding to the pointer specified by (P) does not exist.
3381H
After execution of the XCALL instruction, the END, FEND, GOEND, or STOP instruction is executed before the RET instruction.
3382H
The RET instruction is executed before the XCALL instruction.
7 APPLICATION INSTRUCTIONS
582
7.4 Structure Creation Instructions
Immediately after the execution of
the XCALL instruction
D0
0
D1
10
D2
100
Transfer
D3
1000
0
D4
D4
D4
0
10
FD0
100
1000
XCALL
P0
/
K100
K3
+
K100
At the execution of
the subroutine program
D0
0
D1
10
D2
100
D3
1000
100
D4
33
1
FD0
100
1000
D0
FEND
FD0
D4
RET
After the execution of
the RET instruction
D0
D0
D0
D0
D0
33
D1
D1
1
D2
D2
100
Transfer
D3
D3
1000
(1)
100
D4
D4
D4
(1)
(3)
(1)
(3)
FD0
(3)
(3)
(2)
(2)
(2)
(2)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents