2 Functions of Devices in DVP-PLC CJ Conditional Jump: When X0 = On, the program will jump from X0 P** address 0 to N (designated label P1) and keep 0 on the execution. The addresses in the middle will be ignored. X2 When X0 = Off, the program will execute from P1 N Y2 address 0 and keep on executing. At this time, CJ instruction will not be executed. CALL Call Subroutine, SRET Subroutine Return: When X0 = On, CALL instruction will be 20 P*** Call subroutine P*** executed and the program will jump to P2 and executed the designated subroutine. When 24 SRET instruction is executed, the program will return to address 24 and keep on the execution. P2 Interruption Pointer I:
Used with API 04 EI, API 05 DI, API 03 IRET. See Chapter 5.5 for more details. There are 6 types of interruption pointer. To insert an interruption, you have to combine the action with EI (enable interruption), DI (disable interruption), IRET (interruption return) instructions. 1. External interruption: Due to the special hardware design inside the MPU, the input signals coming in at input terminals X0 ~ X5 (EH3/SV2: X0~X17) when rising-edge or falling-edge triggers will not be affected by the scan cycle.
The currently executed program will be interrupted immediately and the execution will jump to the the execution reaches IRET instruction, the program will return to the original position and keep on its execution. designated interruption subroutine pointer I00 □ (X0), I10 □ (X1), I20 □ (X2), I30 □ (X3), I40 □ (X4), I50 □ (X5). Till In SA/SX series MPU, X0 (pulse input point) works with X4 (external interruption point), corresponding to C235, C251 and C253 work with I401, which will be able to interrupt and intercept the present value in the high-speed counter. D1181 is the device to store the 32-bit value.
X1 (pulse input point) works with X5 (external interruption point), corresponding to C236 works with I501, which will be able to interrupt and intercept the present value in the high-speed counter. D1198 and D1199 are the devices to store the 32-bit value. In SC series MPU, X10 (pulse input point) works with X4 (external interruption point), corresponding to C243 and C255 work with I401, which will be able to interrupt and intercept the present value in the high-speed counter. D1180 and D1181 are the devices to store the 32-bit value. X11 works with X5, corresponding to C245 works with I501, which will be able to interrupt and intercept the present value in the high-speed counter.
D1198 and D1199 DVP-PLC Application Manual 2-36 0 CJ P1 1 Y1 CJ P1 X0 CALL X1 Y1 FEND Y0 Y0 SRET END CALL P2