HP ESA-E Series Programmer's Manual page 131

Esa spectrum analyzers
Table of Contents

Advertisement

/*Configure the computer to respond to an
interrupt,install the handler and enable it */
viInstallHandler(viESA, VI_EVENT_SERVICE_REQ,
sSrqHdlr,ViAddr(10));
viEnableEvent(viESA,
VI_EVENT_SERVICE_REQ,VI_HNDLR,VI_NULL);
iSrqOccurred
/*Set the analyzer to a 500 MHz center frequency*/
viPrintf(viESA,"SENS:FREQ:CENT 500 MHZ \n");
/*Set the analyzer to a 100 MHz span*/
viPrintf(viESA,"SENS:FREQ:SPAN 100 MHZ\n");
/*Set the analyzer to a
viPrintf(viESA,"SENS:BAND:RES:AUTO 1\n");
/*Set the analyzer to a
viPrintf(viESA,"SENS:SWE:TIME:AUTO 1\n");
/*Allow analyzer to sweep several times.*/
viPrintf(viESA,"INIT:CONT 1 \n");
/*Manually couple sweeptime to 5ms. reduce resolution BW
to 30 kHz. "Meas Uncal" should be displayed on the screen,
and an interrupt should be generated.*/
viPrintf(viESA,"SENS:SWE:TIME 5 ms \n");
viPrintf(viESA,"SENS:BAND:RES 30 KHZ
/*Wait for SRQ*/
WaitForSRQ();
/* 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
viUninstallHandler(viESA, VI_EVENT_SERVICE_REQ,
sSrqHdlr,ViAddr(10));
Chapter 3
Determine if an Error has Occurred
=0;
auto resolution BW*/
Auto Sweep Time*/
(viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR);
Programming Examples
\n");
3-67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents