Each interrupt is generated based on the high-speed counter value and record unit value.
Right-click the interrupt program INT_01 and
INT_02 in the program block, choose Property >
Interrupt Event, and set them to I001 and I605.
Insertion range with
interrupt enabled
Interrupt subprogram A
Insertion range with
interrupt disabled
Insertion range with
interrupt enabled
Interrupt subprogram B
The process of compiling the left-hand program in
AutoShop is as follows: Right-click the interrupt
program INT_01 or INT_02 in the program block
and choose Property, and then name 01 or 02 as
needed.
During the PLC's execution process, the interrupt
insertion subprogram A or B is executed when
any of the following conditions is met: the
scanning proceeds to a point between EI and DI
instructions; X0 is set to ON; the timer 5MS times
out. When subprogram execution proceeds to
IRET, the PLC returns to the main program and
continues execution.
ǒEIǓ
ǒDIǓ
ǒIRETǓ
(Y3)
ǒIRETǓ
(Y0)
(Y2)
X2
ǒEIǓ
(Y1)
X3
ǒFENDǓ
ĂĂ
I001
I605
ǒEIǓ
ǒDIǓ
(Y0)
X2
ǒEIǓ
(Y1)
X3
ĂĂ
Main program
(Y2)
Interrupt program INT_01
Interrupt program INT_02
The CJ instruction executes a program jump when conditions are met.