Hp E1459A Bedienungsanleitung Seite 39

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 112
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 38
38 Using the HP E1459A Module
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}
/*
Enable Port 0 Edge Detection
*/
errStatus = viPrintf (E1459, "EVEN:PORT0:EDGE:ENAB ON\n");
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}
/*
Loop and poll Port Summary Register until event occurs
*/
while (event = 0)
{
errStatus = viQueryf (E1459, "EVEN:PSUM:EDGE?\n","%t",event);
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}
}
/*
Read NEDGE register and clear event detector register
*/
errStatus = viQueryf (E1459, "EVEN:PORT0:NEDGE?\n","%t",val);
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}
printf ("Negative Edge Event value = %s\n",val);
/*
Read PEDGE register and clear event detector register
*/
errStatus = viQueryf (E1459, "EVEN:PORT0:PEDGE?\n","%t",val);
if (VI_SUCCESS > errStatus){
printf("ERROR: viPrintf() returned 0x%x\n",errStatus);
return errStatus;}
printf ("Positive Edge Event value = %s\n",val);
/*
Close Sessions
*/
errStatus = viClose (E1459);
if (VI_SUCCESS > errStatus){
printf("ERROR: viClose() returned 0x%x\n",errStatus);
return 0;}
errStatus = viClose (viRM);
if (VI_SUCCESS > errStatus){
printf("ERROR: viClose() returned 0x%x\n",errStatus);
return 0;}
}
/* End of main program */
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Seitenansicht 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 111 112

Kommentare zu diesen Handbüchern

Keine Kommentare