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 */
Summary of Contents for E1459A
Page 4: ...4 Contents ...
Page 8: ...8 Notes ...
Page 10: ......
Page 28: ...28 Installing and Configuring the HP E1459A ...
Page 61: ...HP E1459A SCPI Command Reference 61 Figure 3 1 HP E1459A Status System Register Diagram ...
Page 72: ...72 HP E1459A SCPI Command Reference ...
Page 74: ...74 HP E1459A Specifications ...
Page 103: ...HP E1459A Register Definitions 103 1970 END ...
Page 104: ...104 HP E1459A Register Definitions ...
Page 106: ...106 Error Messages ...
Page 110: ...110 Index ...