Subroutine Program Calls - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

XCALL
7.6.8
XCALL

Subroutine program calls

7.6.8
XCALL
XCALL
Pn
: Head pointer number of a subroutine program (Device name)
to
: Number of the device to be passed as an argument to a subroutine program (bits, BIN 16 bits, BIN 32 bits)
S1
S5
Setting
Internal Devices
Data
Bit
P
––
(Other
to
S1
S5
than F)
Function
(1) XCALL instruction executes the subroutine program and performs non-execution processing of the subroutine program.
(a) Execution of subroutine program
Executes each coil instruction according to ON/OFF status of the condition contacts.
(b) Non-execution of subroutine program
Performs the same processing for each coil instruction as when the condition contacts are OFF status. The
operation results for the individual coil instructions following non-execution processing will be as follows, regardless
of the ON/OFF status of the individual contacts:
OUT instruction........................................................ Forced OFF
SET instruction
RST instruction
SFT instruction
Basic instructions
Application instructions
PLS instruction
Pulse generation
instruction (
P)
Present value of low speed/high speed timers......... 0
Present value of retentive timer
Present value of counter
(2) Operation of XCALL instruction varies according to the CPU module type. The following program example shows the
operation of XCALL instruction for each CPU module.
[Program example]
404
Command
R, ZR
Word
Bit
––
................
................
................ Preserves
Ver.
High
Basic
performance
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
XCALL
J
\
U
\G
Word
––
Maintains status
Processing identical to when condition contacts are OFF
Subroutine program (P1)
call by XCALL instruction
P1 subroutine program
Process
LCPU
Redundant Universal
Pn
to
S1
S5
Constants
Other
Zn
K, H
P
––

Advertisement

Table of Contents
loading

Table of Contents