Agilent Technologies ESA-E Series Programmer's Manual page 123

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples
Determine if an Error has Occurred
viPrintf(viESA,"SENS:BAND:RES 30 KHZ
/*Wait for SRQ*/
WaitForSRQ();
/*Pause for 5 seconds to observe "Meas Uncal" message on ESA display*/
Sleep(5000);
/* Set the service request mask to assert SRQ when either a measurement
is completed or an error message has occurred.*/
viPrintf(viESA,"*SRE 32\n");
viPrintf(viESA,"*ESE 35\n");
/*Send an undefined command to the device*/
viPrintf(viESA,"IDN\n");
/*Wait for SRQ*/
WaitForSRQ();
/*Disable and uninstall the interrupt handler*/
viDisableEvent
(viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR);
viUninstallHandler(viESA, VI_EVENT_SERVICE_REQ, sSrqHdlr,ViAddr(10));
/*Clear the instrument status register*/
viPrintf(viESA,"*SRE 0 \n");
viPrintf(viESA,"*ESE 0 \n");
viPrintf(viESA,"STAT:QUES:ENAB 0\n");
viPrintf(viESA,"STAT:QUES:INT:ENAB 0\n");
/*Clear the status byte of the instrument*/
viPrintf(viESA,"*CLS\n");
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}
3-68
\n");
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents