Agilent Technologies E2094S Guía de usuario Pagina 73

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 146
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 72
Programming with VISA 3
Agilent VISA User’s Guide 73
status = viOpenDefaultRM( &drm );
if ( status < VI_SUCCESS ) {
printf( "ERROR: viOpenDefaultRM failed with
error = 0x%lx\n", status );
return;
}
/* Install the exception handler and enable
events for it */
status = viInstallHandler(drm,
VI_EVENT_EXCEPTION, myExceptionHandler,
myUserHandle);
if ( status < VI_SUCCESS )
{
printf( "ERROR: viInstallHandler failed
with error 0x%lx\n", status );
}
status = viEnableEvent(drm, VI_EVENT_EXCEPTION,
VI_HNDLR, VI_NULL);
if ( status < VI_SUCCESS ) {
printf( "ERROR: viEnableEvent failed with
error 0x%lx\n", status );
}
/* Generate an error to demonstrate that the
handler will be called */
status = viOpen( drm, "badVisaName", NULL,
NULL, &vi );
if ( status < VI_SUCCESS ) {
printf("ERROR: viOpen failed with error
0x%lx\n"
"Exception Handler should have been
called\n"
"before this message was printed.\n",status
);
}
}
Vista de pagina 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 145 146

Comentarios a estos manuales

Sin comentarios