Delta Electronics Programmable Logic Controller DVP-PLC User Manual
Page 218

6 Application Instructions API 00-49
DVP-PLC Application Manual
6-6
X0
X1
CALL
P2
Y1
20
P***
24
FEND
SRET
P2
Y0
Y0
Subroutine P2
subroutine return
call subroutine P***
Program Example 2:
1.
When X10 goes from Off to On, its rising-edge trigger executes CALL P10 instruction and the program jumps to
the subroutine designated by P10.
2.
When X11 is On, CALL P11 is executed and the program jumps to the subroutine designated by P11.
3.
When X12 is On, CALL P12 is executed and the program jumps to the subroutine designated by P12.
4.
When X13 is On, CALL P13 is executed and the program jumps to the subroutine designated by P13.
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.