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

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

Advertisement

Programming Examples
Entering Amplitude Correction Data
viStatus=viOpenDefaultRM(&defaultRM) ;
viStatus=viOpen(defaultRM,"GPIBO : :18",VI NULL,VI NULL,&viESA) ;
if(viStatus )
{
printf("Could not open a session to HP-IB device at address 181\n") ;
exit(0) ;
}
/*Clear the instrument* /
viClear(viESA) ;
/*Reset the instrument* /
viPrintf(viESA,"*RST\n") ;
/*Display the program heading * /
printf("\n\t\t Amplitude Correction Program \n\n" ) ;
/*Set the stop frequency to 1 .5 GHz * /
viPrintf(viESA,"SENS :FREQ :STOP 1 .5 GHz\n") ;
/* Check for the instrument model number and route the 50MHz signal accordingly* /
Route50MHzSignal() ;
/* Purge any currently-loaded amplitude correction factors* /
viPrintf(viESA,"SENS :CORR :CSET1 :DEL \n") ;
/* Enter amp cor frequency/amplitude pairs :
0 Hz, 0 dB, 100 MHz, 5 dB, 1 GHz, -5 dB, 1 .5GHz,10* /
viPrintf(viESA,"SENS :CORR :CSET1 :DATA ") ;
viPrintf(viESA,"O, 0 .0,") ;
viPrintf(viESA,"100 .E6, 5 .0,") ;
viPrintf(viESA,"1 .E9, -5 .0,") ;
viPrintf(viESA,"1 .5E9, 10 \n") ;
/* Activate amplitude correction . Notice that the noise floor slope s
up from 0 Hz to 100 MHz, then downward by 10 dB to 1 GHz, then upward s
again by 15 dB to 1 .5 GHz .* /
viPrintf(viESA,"SENS :CORR :CSET1 :STATE ON \n") ;
viPrintf(viESA,"SENS :CORR :CSETI :ALL :STAT ON \n") ;
/*Query the analyzer for its amplitude correction factors * /
viQueryf(viESA,"%s\n", "%#t","SENS :CORR :CSETI :DATA?" , &iNum , cResult) ;
/*Remove the "," from the amplitude correction for analyzing data* /
cToken = strtok(cResult,",") ;
/*Store the array (frequency) value into a two-dimensional real array* /
Chapter 3
3-55

Advertisement

Table of Contents
loading

Table of Contents