Rockwell Automation 57C419 5V-24V DC Input Module User Manual
Page 22
4Ć6
3003
!
be as meaningful as possible. The watchdog timeout has been
3004
!
disabled because the interrupt is not periodic.
3005
!
3006
!
3007
!
3010
EVENT A NAME=HW EVENT, INTERRUPT STATUS=ISCR%,&
3011
TIMEOUT=DISABLED
4000
!
4001
!
The following statements reset the latch status bits
4002
!
4010
LATCH ACK B17@=FALSE
4011
LATCH ACK B18@=FALSE
4012
LATCH ACK B20@=FALSE
5000
!
5001
!
The following statements enable interrupts
5002
!
5010
INTRP ENABLE B17@=TRUE
5011
INTRP ENABLE B18@=TRUE
5012
INTRP ENABLE B20@=TRUE
5500
!
5600
!
complete the remainder of task initialization here
5700
!
6000
!
6001
!
The next statement synchronizes the task with the external
6002
!
event via the interrupt. Task execution will be suspended
6003
!
until the interrupt occurs. When the interrupt occurs, if this
6004
!
task is the highest priority task waiting to execute, it will
6005
!
become active. If it is not the highest priority task, it will
6006
!
remain suspended until all higher priority tasks have executed,
6007
!
at which point it will become active.
6008
!
6010
WAIT ONHW EVENT
7000
!
7001
!
The next statements determine which bit generated the interrupt
7002
!
by examining the latch status bit. If a latch is
7003
!
found, it is reset. The interrupt service routine is
7004
!
then executed.
7005
!
7010
IF NOT LATCH STATUS B17@ THENGO TO 8010
7020
LATCH_RESET B17@ = FALSE
7030
B17 CNT% = B17 CNT% + 1
\!Interrupt service routine for B17
7040
!
8000
!
Test B18 interrupt
8005
!
8010
IF NOT LATCH STATUS B18@ THENGO TO 9010
8015
LATCH_RESET B18@ = FALSE
8020
B18 CNT% = B18 CNT% + !
\!Interrupt service routine for B18
8050
!
9000
!
Test B20 interrupt
9005
!
9010
IF NOT LATCH STATUS B20@ THENGO TO 10010
9015
LATCH_RESET B20@ = FALSE
9020
B20 CNT% = B20 CNT% +
\!Interrupt service routine for B20
10020 !
10010 GO TO 6010
15000 !
18000 !
20000 END