Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 39

Advertising
background image

Developing Applications

3–13

Publication 1747-6.5.3 Junel 1998

if (OC_GetExtendedError(OChandle, &exterr) == SUCCESS)
{
if ( exterr.ErrorCode != 0 )
{
OC_ExtendedErrorMsg(OChandle, &exterr, &msg);
printf("\n\nERROR: %d %s\n", msg, exterr.ErrorCode);
}
}
OC_CloseScanner(OChandle);

exit(rc);

} /* end Ioexit() */

/*************************************************************************
* Entry point:
* tErrorEvent
*
* Description:
* Thread to handle errors.
*
* Arguments:
* none
*
* External effects:
* none
*
* Return value:
* none
*
* Access: Public
*
*-----------------------------------------------------------------------
* Notes:
*
************************************************************************/
void tErrorEvent( void *dummy )
{

while(1)
{
/* Sleep until the scanner reports an error */
OC_WaitForExtError(OChandle, INFINITE);

/* An error has occurred. Perform whatever error handling */
/* that is necessary. In this case, we just print a message */
/* and exit the process. */

Ioexit(1);
}

} /* end tErrorEvent() */

Advertising
This manual is related to the following products: