DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming won’t be executed at this time. P** 0 X0 X1 Y1 P1 N X2 Y2 CALL subroutine, SRET subroutine END: When X0 is ON, program will jump to P2 to execute the designated subroutine. When SRET instruction is executed, it returns to address 24 to go on executing. P** 20 Call subroutine P** 24 (subroutine P2) P2 Interrupt pointer I: used with application instruction API 04 EI, API 05 DI, API 03 IRET. There are four types of interruption pointers. To insert an interruption, users need to combine EI (enable interruption), DI (disable interruption) and IRET (interruption return) instructions.
When the instruction EI is enabled, the PLC will check if there is any interrupt that need to be done everytime an instruction is executed. If an interrupt is found, the PLC will stop executing the instruction and execute the interrupt first. If no interrupt is found, the PLC will keep executing the instruction. From the explanation, we can conclude that the maximum waiting time for an interrupt to be executed is the execution time of an instruction. Check interrupt Check interrupt EI One instruction executing time One instruction executing time One instruction executing time One instruction executing time Interrupt occurred IRET Interrupt sub-routine 1.
External interrupt When input signal of input terminal X0~X7 is triggered on rising-edge or falling-edge, it will interrupt current program execution and jump to the designated interrupt subroutine pointer 2-44 0 CJ P1 X0 CALL X1 Y1 FEND Y0 Y1 SRET 0 CALL P2 SRET