Mitsubishi Electric MELSEC-Q/L Programming Manual page 481

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• When function devices (FX, FY, FD) are used by a subroutine program, specify a device corresponding to the function
device with (S1) to (S5).
[MAIN]
[ABC]
• Prior to execution of the subroutine program, bit data is transmitted to FX, and word data is transmitted to FD.
• After the execution of the subroutine program, the contents of FY and FD are transmitted to the corresponding devices.
• The function devices FX and FY are processed in units of bits. The function device FD is processed in units of 4 words. The size of the data to be dealt with
will differ depending on the device specified in the argument. The device specified as a function device should be secured for the data size. An error will occur
if it cannot be secured for the data size.
Function devices
• FX
• FY
• FD
*1 An error will not occur even when the device number specified by (S1) to (S5) is not a multiple of 16 at the digit designation of the bit
device.
[Main routine program]
X0
EFCALL
"ABC"
P0
M0
• (S1) to (S5) can be used with the EFCALL (P) instruction.
• The number of function devices used by subroutine programs must be identical to the number of arguments used by the
EFCALL (P) instruction. Further, the function devices should be identical to the types of arguments used by the EFCALL (P)
instruction.
• Up to 16 levels of nesting can be used with the EFCALL (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.
ECALL
"ABC" P0
P0
EFCALL
"ABC" P0
ECALL "DEF" P10
EFCALL"DEF" P10
FEND
RET
END
Device
Bit device
When bit designation has been made
for word device
When digit designation of a bit device
*1
is used
Word device
D0
D30
Occupies from D30 to D33 (Transfer to FD2).
Occupies from D0 to D3 (Transfer to FD1).
Occupies M0 (Transfer to FX0).
P10
ECALL "GHI" P20
EFCALL "GHI" P20
RET
Data size
1 point
1 bit
4 words
4 words
P20
RET
7 APPLICATION INSTRUCTIONS
7.6 Structure Creation Instructions
Remark
The upper 2 words of FD become 0.
479
7

Advertisement

Table of Contents
loading

Table of Contents