Special Functions
6-7.
C all have interrupt function. There are two kinds of interrupt function: external
errupt function, some special program can be disposed, not
affecte
6-7-1.External Interrupt
Inpu
with an eternal in
correspond interrupt su
main program.
Interruption Function
XC series PL
interrupt and time interrupt. Via int
d by PLC’s scan cycle.
t terminal X can be used as external interrupt’s input, each input terminal corresponds
terrupt, the rising edge or falling edge of each input can both active the interrupt.
The interrupt subroutine is written behind the main program (Behind FEND command). When
interrupt activates, the main program will immediately stop executing, turn to execute the
broutine. After finish executing the interrupt subroutine, go on execute the
Definition of external interrupt port:
XC3-14 models
Pointer’s tag
Input
terminal
Rising interrupt Falling interrupt
Forbid interrupt
instruction
X7 I0000 I0001 M8050
XC3-24/32 models, XP-18 and XC5-48/60 models
Pointer’s tag
Input
terminal
Rising interrupt Falling interrupt
Forbid interrupt
instruction
X2 I0000 I0001 M8050
X5 I0100 I0101 M8051
X10 I0201 52 I0200 M80
XC3-48/60 m
nter’s t
odels
Poi ag
Input
terminal
Rising interrupt
Falling interrupt
instruction
Forbid interrupt
X11 I0001 50 I0000 M80
X10 I0100 I0101 M8051
X7 I0200 I0201 M8052
Interrupt Instructio
Main program
Main program
Interrupt subroutine
Input interruption
n
18