Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 571

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

Advertisement

Processing details
• When the ECALL(P) instruction is executed, these instructions execute the subroutine program corresponding to the
pointer specified by (P) of the specified program file name. The ECALL(P) instructions can also call the subroutine program
using the local pointer of another program file.
[File name: MAIN]
Main routine program
ECALL ʺABCʺ (P)
END
• Only a program file stored in program memory can be specified for the file name.
• Extension ".PRG" need not be specified for the file name. (Only .PRG files can be processed by these instructions.)
• When the subroutine program uses function devices (FX, FY, FD), specify the devices corresponding to the function
devices in (s1) to (s5). The following figure the contents of the devices specified by (s1) to (s5).
[MAIN]
X10
ECALLP
[ABC]
P0
FX0
• Before execution of the subroutine program, bit data is transferred to FX and word data is transferred to FD.
• After execution of the subroutine program, the contents of FY and FD are transferred to the corresponding devices.
• Function devices FX and FY are processed in units of bits. Function device FD is processed in units of 4 words. The size of data to be processed varies
depending on the type of the device specified by an argument. The device specified as a function device should be secured for the data size. An error occurs
if it cannot be secured for the data size.
• The following table lists the data sizes of individual types of function devices.
Function device
FX, FY
FD
*2 An error does not occur even if the device number specified by (s1) to (s5) is not a multiple of 16 in bit device digit specification mode.
*3 The data size varies depending on the instruction used.
Ex.
Content of specified device
X0
ECALL
(1) M0 occupied (The data is transferred to FX0.)
(2) D0 to D3 occupied (The data is transferred to FD1.)
(3) D30 to D33 occupied (The data is transferred to FD2.)
• The ECALL(P) instruction can use (s1) to (s5).
(P)
"ABC"
P0
X0
D*
FD1
Device
Bit device
When a bit-specified word device is used
When the bit device digit is specified
Word device
"A-LINE"
P0
M0
(1)
[File name: ABC]
Subroutine program
RET
D0
D100
FEND
K100
FD2
RET
*2
D0
D30
(2)
(3)
7 APPLICATION INSTRUCTIONS
7.4 Structure Creation Instructions
Data size
1 point
1 bit
*3
4 words
*3
4 words
7
569

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents