
7 APPLICATION INSTRUCTION
7.4 Structuring instruction
349
7
Calling a subroutine program
XCALL
This instruction executes CALL for (turns on and executes) the subroutine program specified by (P) when the execution
condition is established. When the condition is turned off, this instruction executes FCALL for (turns off and terminates) the
subroutine program.
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• The XCALL instruction controls the execution and non-execution processing of subroutine programs.
• The following table lists the operation result of each coil instruction after the non-execution processing. Regardless of the
status of the condition contact, the following result is applied.
• The following shows the operation of the XCALL instruction.
Ladder diagram
Structured text
Not supported
Operand
Description
Range
Data type
Data type (label)
(P)
Start pointer number of the subroutine program
Device name
ANY16
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(P)
• In the execution of subroutine programs, each coil instruction is operated according to the ON/OFF status of the condition contact.
• In the non-execution processing of subroutine programs, each coil instruction is operated with the OFF status of the condition contact applied.
Device used for operation
Operation result (device status)
1 ms timer, 10 ms timer, 100 ms timer
0
1 ms retentive timer, 10 ms retentive timer, 100 ms retentive timer, counter
The current status is held.
Device in the OUT instruction
Forcibly turned off.
Device in the SET, RST, or SFT(P) instruction or basic/applied instruction
The current status is held.
PLS instruction, pulse instruction (
P)
Same as when the condition contact is off
(1) Rising edge of X0 (OFF
ON): The subroutine program of P1 is executed.
(2) While X0 is on: The subroutine program of P1 is executed. (The rising edge of X0 is not included.)
(3) Falling edge of X0 (ON
OFF): The non-execution processing of the subroutine program of P1 is executed.
(P)
X0
OFF
(1)
X0
M0
XCALL
P1
FEND
M1
RET
P1
(2)
(3)
ON
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......