Mitsubishi MELSEC-Q/L Programming Manual page 395

Table of Contents

Advertisement

(4) When function devices (FX, FY, FD) are used by a subroutine program, specify a device with
the function device. The contents to the devices specified by
(a) Prior to execution of the subroutine program, bit data is transmitted to FX, and word data is transmitted to FD.
(b) After the execution of the subroutine program, the contents of FY and FD are transmitted to the corresponding
devices.
(c) The processing units for the function devices are as follows:
• FX, FY: Bits
• FD
: 4-word units
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
Bit device
• FY
When Bit Designation has been Made for Word Device
When digit designation of a bit device is used*1
• FD
Word device
*1:
An error will not occur if the device number specified by
[Main routine program]
X0
(5) The FCALL (P) instruction can use from
(6) Up to 16 nesting levels are possible with the FCALL(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.
Device
FCALL
P0
M0
D0
D30
to
.
S1
S5
CALL
P0
P0
FCALL
P0
CALL
FCALL P10
FEND
RET
END
to
are as indicated below.
S1
S5
Data Size
1 point
1 bit
4 words
4 words
to
is not a multiple of 16 at the digit designation of the bit device.
S1
S5
Occupies from D30 to D33 (Transfer to FD2).
Occupies from D0 to D3 (Transfer to FD1).
Occupies M0 (Transfer to FX0).
P10
P10
CALL
P20
FCALL P20
RET
FCALL, FCALLP
to
corresponding to
S1
S5
Remark
––––
The upper 2 words of FD become 0.
––––
P20
RET
393
1
2
3
4
4
6
7
8

Advertisement

Table of Contents
loading

Table of Contents