Publication 1763-RM001C-EN-P - October 2009
Using Interrupts
261
•
Anytime during End of Scan
The interrupt is only serviced by the controller at these opportunities. If
the interrupt is disabled, the pending bit is set at the next occurrence of
one of the three occasions listed above.
Priority of User Interrupts
When multiple interrupts occur, the interrupts are serviced based upon
their individual priority.
When an interrupt occurs and another interrupt(s) has already occurred
but has not been serviced, the new interrupt is scheduled for execution
based on its priority relative to the other pending interrupts. At the next
point in time when an interrupt can be serviced, all the interrupts are
executed in the sequence of highest priority to lowest priority.
If an interrupt occurs while a lower priority interrupt is being serviced
(executed), the currently executing interrupt routine is suspended, and
the higher priority interrupt is serviced. Then the lower priority interrupt
is allowed to complete before returning to normal processing.
If an interrupt occurs while a higher priority interrupt is being serviced
(executed), and the pending bit has been set for the lower priority
interrupt, the currently executing interrupt routine continues to
completion. Then the lower priority interrupt runs before returning to
normal processing.
The priorities from highest to lowest are:
ATTENTION
If you enable interrupts during the program scan via an
OTL, OTE, or UIE, this instruction (OTL, OTE, or UIE)
must
be the
last
instruction executed on the rung (last
instruction on last branch). It is recommended this be the
only output instruction on the rung.
User Fault Routine
highest priority
Event Interrupt 0
Event Interrupt 1
High-Speed Counter Interrupt 0
Event Interrupt 2
Event Interrupt 3
Selectable Timed Interrupt
lowest priority
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive