Publication 1766-RM001A-EN-P - October 2008
308
Using Interrupts
An interrupt must be configured and enabled to execute. When any one
of the interrupts is configured (and enabled) and subsequently occurs, the
user program:
1.
suspends its execution
2.
performs a defined task based upon which interrupt occurred
3.
returns to the suspended operation.
Specifically, if the controller program is executing normally and an
interrupt event occurs:
1.
the controller stops its normal execution
2.
determines which interrupt occurred
3.
goes immediately to rung 0 of the subroutine specified for that User
Interrupt
4.
begins executing the User Interrupt subroutine (or set of subroutines
if the specified subroutine calls a subsequent subroutine)
5.
completes the subroutine(s)
6.
resumes normal execution from the point where the controller
program was interrupted
When Can the Controller Operation be Interrupted?
The Micrologix 1400 controllers only allow interrupts to be serviced
during certain periods of a program scan. They are:
•
At the start of a ladder rung
•
Anytime during End of Scan
Program File 2
Program File 10
rung 0
rung 123
rung 275
Interrupt Operation Example
Program File 2 is the main control program.
Program File 10 is the interrupt routine.
•
An Interrupt Event occurs at rung
123.
•
Program File 10 is executed.
•
Program File 2 execution resumes
immediately after program file 10 is
scanned.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive