Agilent Technologies FS2010 Guide de l'utilisateur Page 79

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 160
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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);
}
Vue de la page 78
1 2 ... 74 75 76 77 78 79 80 81 82 83 84 ... 159 160

Commentaires sur ces manuels

Pas de commentaire