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

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

Advertisement

Programming Examples
Using Marker Peak Search and Peak Excursion
double dMarkerFreq = 0;
double dMarkerAmpl = 0;
float fPeakExcursion =0;
long lOpc = 0L;
/*Open an HP-IB session at address 18.*/
viStatus=viOpenDefaultRM(&defaultRM);
viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,&viESA);
if(viStatus)
{
printf("Could not open a session to HP-IB device at address 18!\n");
exit(0);
}
/*Clear the instrument*/
viClear(viESA);
/*Reset the instrument*/
viPrintf(viESA,"*RST\n");
/*Set the
analyzer center frequency to 50MHZ*/
viPrintf(viESA,"SENS:FREQ:CENT 50e6\n");
/*Set the analyzer span to 50MHZ*/
viPrintf(viESA,"SENS:FREQ:SPAN 50e6\n");
/*Display the program heading */
printf("\n\t\t Marker Program \n\n" );
/* Check for the instrument model number and route the 50MHz signal accordingly*/
Route50MHzSignal();
/*Set analyzer to single sweep mode*/
viPrintf(viESA,"INIT:CONT 0 \n");
/*User enters the peak excursion value*/
printf("\t Enter PEAK EXCURSION in dB:
scanf( "%f",&fPeakExcursion);
/*Set the peak excursion*/
viPrintf(viESA,"CALC:MARK:PEAK:EXC %1fDB \n",fPeakExcursion);
/*Set the peak thresold */
viPrintf(viESA,"CALC:MARK:PEAK:THR -90 \n");
/*Trigger a sweep*/
viPrintf(viESA,"INIT:IMM\n");
3-14
");
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents