3. Instruction Set

API

 

Mnemonic

Function

 

 

 

 

02

 

SRET

Subroutine Return

 

 

 

 

Controllers

ES2/EX2

SS2

SA2

SX2

SE

 

OP

 

 

Descriptions

 

 

 

 

 

Program Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No contact to drive the instruction is required

 

 

 

 

SRET: 1 step

 

 

N/A

Automatically returns program execution to the address

 

 

 

 

 

 

 

 

after CALL instruction in O100.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

16-bit

 

 

 

 

32-bit

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

ES2/EX2

SS2

 

SA2

SX2

 

 

SE

 

SE

 

SE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Explanations:

SRET indicates the end of subroutine program. The subroutine will return to main program and begin execution with the instruction after the CALL instruction.

Program example 1:

When X0 = ON, the CALL instruction will jump to P2 and run the subroutine. With the execution of the SRET instruction, it will jump back to address 24 and continue the execution.

 

X0

 

Call subroutine P2

20

CALL

P2

24

X1

 

 

Y0

 

 

 

 

 

 

FEND

 

 

P2

M1

 

 

Y1

 

 

 

M2

Subroutine

 

 

 

 

Y2

 

 

 

SRET

Subroutine return

3 - 4 7

Page 163
Image 163
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Function, Sret, Subroutine Return, Descriptions Program Steps