Agilent Technologies FS2010 Guía de usuario Pagina 79

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 160
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 78
Programming with VISA 3
Agilent VISA User’s Guide 79
/* print the event information */
printf("Trigger Event Occurred!\n");
printf("...Original Device Session = %ld\n",
vi);
/* get trigger that fired */
viGetAttribute(eventVi, VI_ATTR_RECV_TRIG_ID,
&trigId);
printf("Trigger that fired: ");
switch(trigId){
case VI_TRIG_TTL0:
printf("TTL0");
break;
default:
printf("<other 0x%x>",trigId);
break;
}
printf("\n");
/* close the context before continuing */
viClose(eventVi);
/* get second event */
err=viWaitOnEvent(vi, VI_EVENT_TRIG, 10000,
&eventType, &eventVi);
if(err==VI_ERROR_TMO){
printf("Timeout Occurred! Event not
received.\n");
return;
}
printf("Got second event\n");
/* close the context before continuing */
viClose(eventVi);
/* disable event */
viDisableEvent(vi, VI_EVENT_TRIG, VI_QUEUE);
/* close the sessions */
viClose(vi);
viClose(defaultRM);
}
Vista de pagina 78
1 2 ... 74 75 76 77 78 79 80 81 82 83 84 ... 159 160

Comentarios a estos manuales

Sin comentarios