Call Subroutine; Subroutine Return - Delta DVP-PLC Applications Manual

Table of Contents

Advertisement

API
Mnemonic
01
CALL
P
OP
P0 ~ P255
Operands:
S: The pointer of call subroutine.
Explanations:
1.
Operand S can designate P.
2.
P can be modified by index register E, F.
3.
In ES/EX/SS series models: Operand S can designate P0 ~ P63.
4.
In SA/SX/SC/EH/EH2/SV series models: Operand S can designate P0 ~ P255.
5.
Edit the subroutine designated by the pointer after FEND instruction.
6.
The number of pointer P, when used by CALL, cannot be the same as the number designated by CJ instruction.
7.
If only CALL instruction is in use, it can call subroutines of the same pointer number with no limit on times.
8.
Subroutine can be nested for 5 levels including the initial CALL instruction. (If entering the sixth level, the
subroutine won't be executed.)
API
Mnemonic
02
SRET
OP
Automatically returns to the step immediately following the
N/A
CALL instruction which activated the subroutine
Explanations:
1.
No operand. No contact to drive the instruction is required.
2.
The subroutine will return to main program by SRET after the termination of subroutine and execute the
sequence program located at the next step to the CALL instruction.
Program Example 1:
When X0 = On, CALL instruction is executed and the program jumps to the subroutine designated by P2. When
SRET instruction is executed, the program returns to address 24 and continues its execution.
DVP-PLC Application Manual
Operands

Call Subroutine

Range
PULSE
ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV

Subroutine Return

Descriptions
PULSE
ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV
6 Application Instructions API 00-49
Function
CALL, CALLP: 3 steps
16-bit
Function
SRET: 1 steps
16-bit
Controllers
ES/EX/SS SA/SX/SC EH/SV
Program Steps
32-bit
Controllers
ES/EX/SS SA/SX/SC EH/SV
Program Steps
32-bit
6-5

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DVP-PLC and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF