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

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

Advertisement

Programming Examples
Making Faster Measurements (multiple measurements )
ViChar cInBuffer[sizeof("#nyyyyl") + (MAX_POINTS * DATA LENGTH) ] ;
ViChar cOutBuffer[sizeof("TRAC :DATA TRACE2,#nyyyyl") + (MAX_POINTS * DATA LENGT H
) ] ;
/******************
Calculate length byte in block header
***************** /
int HeaderLength(int iArrayLength)
{
int iHeaderLength ;
iHeaderLength = 3 ; /* iArrayLength >0 plus increment for "#" and "n "
while ( (iArrayLength = (iArrayLength / 10)) > 0 )
{
iHeaderLength++ ;
}
return(iHeaderLength) ;
}
/****************** *
void setup() {
prepare ESA for measurement
******************* /
int iModelNumber ;
char * cpModel ;
/* Identify the instrument and get the model number
* /
viQueryf(viESA, "*IDN?\n", "%t", &cBuffer) ;
iModelNumber = 0 ;
if( 1(strstr(cBuffer,"E44") = NULL))
{
cpModel = strstr(cBuffer,"44") ;
cpModel[4] = 0 ;
iModelNumber = atoi(cpModel) ;
{
printf("\nNo E44xx instrument found, program is exiting\n") ;
exit (1) ;
}
viPrintf(viESA, " :SENS :FREQ :CENT %i MHz\n " , iCenter) ;
viPrintf(viESA, " :SENS :FREQ :SPAN %i MHZ\n", iSpan) ;
viPrintf(viESA, " :SENS :BAND %i KHZ\n", iRbw) ;
/* use the sampling detector for power-average calculation s
viPrintf(viESA, " :DET SAMP\n " ) ;
/* Turn off analog output of option board to maximize measurement rate* /
viPrintf(viESA, " :SYST :PORT :IFVS :ENAB OFF\n") ;
}
else
3-90
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents