Call/Return Of Subroutine Program: Call, Ret - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU

5.4.17 Call/return of subroutine program: CALL, RET

Setting
data
X
Y
M
P
[Setting data]
[Function]
[Error]
Bit device
SM
F
T
C
D
[Instruction]
Command
CALL
P**
RET
Setting data
P**
(1) Subroutine program calls (CALL)
• When the CALL (P) instruction is executed, executes the subroutine program of
the program specified by P**.
(2) Return from subroutine programs (RET)
• Indicates end of subroutine program
• When the RET instruction is executed, returns to the step following the CALL
instruction which called the subroutine program.
In any of the following cases, sequence program abnormal warning occurs.
Safety observation errors (SM57) are turned ON and error code (SD32): 10, detail
code (SD33): 0400H are stored.
• There is no subroutine program for the pointer specified in the CALL instruction.
• The CALL instruction was executed on subroutine program (Nesting is not possible.).
Usable device
Word device
W
T
C
SD
Z
Subroutine program
Head pointer number of a subroutine program (P0 to P249)
5 - 51
Constant
Pointer
Level
K
H
P
N
CALL
P**
RET
Description
Digit
desig-
Index
nation
: Usable

Advertisement

Table of Contents
loading

Table of Contents