Rockwell-automation 1747-PCIS API Software - Open Controller Manual de usuario Pagina 44

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 174
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 43
Publication 1747-UM002A-US-P - June 2000
3-12 Developing Applications
*
* External effects:
* The program is terminated.
*
* Return value:
* none
*
* Access: Public
* -----------------------------------------------------------------------
* Notes:
*
*************************************************************************/
void Ioexit
int rc
) {
OCEXTERR exterr;
char *msg;
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() */
Vista de pagina 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 173 174

Comentarios a estos manuales

Sin comentarios