Allen-Bradley 1784-KTX Reference Manual page 92

Table of Contents

Advertisement

/****************************************************************************
**
**
void interrupt KTX_watchdog()
**
**
This routine performs the watchdog handshaking with the KTX
**
(if enabled).
**
handler, printf's a message, and exits.
**
*****************************************************************************/
void
interrupt
KTX_watchdog()
{
/**** If accumulated == preset, check alive_flag */
if (++wdg_accum == wdg_preset) {
if (dp–>alive_flag != KTX_ALIVE) {
/**** Setting this to FALSE will allow main routine ****/
/**** to drop out of its loop and cleanup the
/**** interrupt vectors before exiting
ktx_alive = FALSE;
} else {
/**** Let KTX know that the host is still alive ****/
dp–>alive_flag = HOST_ALIVE;
wdg_accum = 0;
}
}
/**** Call the old routine ****/
oldhandler();
}
If the KTX is dead, it resets the Clock interrupt
Appendix B
Programming Examples
****/
****/
B-13

Advertisement

Table of Contents
loading

This manual is also suitable for:

1784-ktxd1784-kts

Table of Contents