Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 562

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

Advertisement

Processing details
• These instructions execute the subroutine program of the pointer specified by (P). The instructions can execute the
subroutine program specified by a pointer in the same program file or the subroutine program specified by a global pointer.
A
CALL (P)
END
A: Main routine program
B: Subroutine program
• When the function device (FX, FY, or FD) is used in the subroutine program, specify the device corresponding to the
function device in (s1) to (s5). The following figure shows the data of the device areas specified by (s1) to (s5).
X10
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 data in 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 an appropriate data area cannot be secured.
• The following table lists the data sizes of each function device.
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.
*3 The data size varies depending on the instruction used.
Ex.
Data in the specified devices
X0
(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 CALL(P) instruction can use (s1) to (s5).
• The number of function devices used in the subroutine program must be identical to the number of arguments of the
CALL(P) instruction. Also, the types of function devices and CALL(P) instruction arguments must be the same.
• Set the device numbers in the argument of the CALL(P) instruction so that they do not overlap. If they overlap, normal
operation cannot be performed.
• If the timer or counter is specified as a device in the argument of the CALL(P) instruction, only the current value is
transmitted/received.
7 APPLICATION INSTRUCTIONS
560
7.4 Structure Creation Instructions
B
(P)
RET
CALLP
P0
X0
D*
FD1
Device to be used
Bit device
Bit-specified word device
*2
Digit-specified bit device
Word device
CALL
P0
M0
(1)
D0
D100
FEND
K100
FD2
RET
D0
D30
(2)
(3)
Data size
1 point
1 bit
*3
4 words
*3
4 words

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents