EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-A series

Mitsubishi MELSEC-A series Programming Manual

Mitsubishi MELSEC-A series
508 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #174 background imageLoading...
Page #174 background image
6. BASIC INSTRUCTIONS
6 62
MELSEC-A
6.5.2 Subroutine call, return
(CALL, CALLP, RET)
Available Device
Bit device Word (16-bit) device Constant Pointer
Level
Carry
flag
Error
flag
X Y M L S B F T C D W R A0 A1 Z V K H P I N
Digit specification
Index
M9012 (M9010, M9011)
P O O O
Functions CALL, CALLP
(1) Executes the subroutine program specified by the pointer (P**).
(2) Up to five levels of nesting of the CALL/CALLP instruction are allowed.
RET
(1) Executes the sequence program located at the next step to the CALL(P)
instruction when the RET instruction is executed.
(2) Indicates the end of subroutine program.
POINT
For the PC CPUs shown below, setting indicated below is required.
A0J2HCPU, AnSCPU, AnSHCPU,A2CCPU, AnCPU, AnNCPU, A3HCPU,
A3MCPU, A3VCPU
In a sequence between the RET instruction in a subroutine program and the
END instruction at the end of a sequence program, a dummy circuit must
always be set. Otherwise, the PC will fail to operate correctly.
(A NOP instruction has the same effect. However, take it into consideration
that "NOP batch deletion" must not be executed by a peripheral device.)
Applicable
CPU
All CPUs
Subroutine execution commands
P**
RET
CALL
P**
Head pointer number of
subroutine program (P0 to
253)
Setting data
Subroutine program
P** CALLP
Call of subroutine
program
Head pointer number
(label) of subroutine
program
Return of
subroutine
program
P**

Table of Contents

Other manuals for Mitsubishi MELSEC-A series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-A series and is the answer not in the manual?

Mitsubishi MELSEC-A series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-A series
CategoryController
LanguageEnglish

Related product manuals