580
7 APPLICATION INSTRUCTIONS
7.4 Structure Creation 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).
• The following table lists the data sizes of individual types of function devices.
*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
• The XCALL 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 XCALL
instruction. Also, the types of function devices and XCALL instruction arguments must be the same.
• The device numbers specified by the XCALL instruction arguments must not be overlapping. If they are overlapping,
normal operation cannot be performed.
• Up to 16 XCALL instructions can be nested. Note that the 16-level nesting is the total of the CALL(P), FCALL(P),
ECALL(P), EFCALL(P), and XCALL instructions.
• 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.
Function device
Device
Data size
FX, FY
Bit device
1 point
When a bit is specified for a word device
1 bit
FD
When the bit device digit is specified
4 words
Word device
4 words
(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.)
X10
FX0
P0
XCALL
P0
X0
D0
D100
D*
FD1
K100
FD2
RET
FEND
X0
XCALL
P0
M0
D0
D30
(1)
(2)
(3)
P0
X0
XCALL
FEND
RET
RET
RET
END
P0
P10
P20
P10 X10
XCALL
P20 X20
XCALL
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......