Allen-Bradley 1784-KTX Reference Manual page 37

Table of Contents

Advertisement

if (dp–>config_data.enable_cos_detect &&
(dp–>COS_link_address != COS_ACKNOWLEDGE)) {
temp = dp–>COS_link_address ;
dp–>COS_link_address = COS_ACKNOWLEDGE;
if (dp–>operating_status.cos_overrun) {
/**** When this bit is set, it indicates the host is unable
***** to keep up with COS interrupts, i.e., the system input
***** state is changing more rapidly than the host is able to
***** process.
***** systems that have infrequent state changes.
****/
}
/**** The application programmer should write a routine that
***** services the COS.
***** below is not one of the supplied examples.
****/
handle_input_COS (temp);
}
/*============================================================================
**
**
Service the end–of–scan–list interrupt next, since it is also
**
time–critical.
**
1) make sure it's enabled
**
2) if so, see if we got an end–of–scan–list interrupt
**
3) if so, acknowledge it
**
=============================================================================*/
if (dp–>config_data.interrupt_after_each_scan
&& dp–>running_status.end_of_scan_list) {
/**** Acknowledge the end_of_scan_list interrupt ****/
dp–>running_status.end_of_scan_list = FALSE;
/**** The application programmer may want to write a routine that
***** services the I/O image tables whenever a end_of_scan_list
***** interrupt occurs.
***** links operating at a high baud rate and with short scan lists
***** are likely to cause frequent interrupts.
***** capable of handling these interrupts in a timely fashion.
****/
}
/*============================================================================
**
**
Service the regular interrupt next, since it is queued
**
1) see what type it is
**
2) service by type...
**
=============================================================================*/
/**** dp–>int_status_to_host is the interrupt type ****/
switch (dp–>int_status_to_host) {
Allen-Bradley Parts
COS interrupts should be enabled only in
The handle_input_COS routine called
The designer should keep in mind that
Chapter 3
Programming Overview
The host should be
3-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

1784-ktxd1784-kts

Table of Contents