beautypg.com

Delta Electronics Extension Digital I/O Module DOP-EXIO14RAE User Manual

Page 88

background image

Appendix D Use of Application Instructions|DOP-EXIO Series

Revision March, 2008, Doc. Name: 2007PDD23000014

D-7

5. When X14 is On, CALL P14 is executed and the program jumps to the subroutine designated by

P14. When SRET is executed, the program returns to the previous P** subroutine and continues

its execution.

6. After SRET instruction is executed in P10 subroutine, returning to the main program.

X0

X10

INC

D0

Y0

CALL

P10

X0

INC

D1

Y1

FEND

INC

D10

X2

P10

Y4

X2

X11

CALL

P11

INC

D11

Y5

SRET

INC

D20

X2

P11

Y6

X12

CALL

P12

X2

INC

D21

Y7

SRET

X2

X13

X2

X2

X2

X14

X2

P13

P14

P12

INC

D30

Y10

CALL

P13

INC

D31

Y11

SRET

INC

D40

Y12

CALL

P14

INC

D41

Y13

SRET

INC

D50

Y14

SRET

END

Main

Program

Main

Program

subroutine

subroutine

subroutine

subroutine

subroutine