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

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

Advertisement

Programming Examples
Entering Amplitude Correction Data
aRealArray[lFreq=O][lCount=O] = atof( cToken) ;
/*Remove the "," from the amplitude correction for analyzing data* /
cToken =strtok(NULL,",") ;
/*Store the array(amplitude) value into a two-dimensional real array* /
aRealArray[lAmpltd=l][1Count] = atof(cToken) ;
while (cToken != NULL )
{
lCount++ ;
if (lCount = iNoOfPoints )
{
lCount -- ;
break ;
}
/*Remove the "," from the amplitude correction for analyzing data* /
cToken =strtok(NULL,",") ;
/*Store the array (frequency) value into a two-dimensional real array* /
aRealArray[lFreq][lCount] = atof(cToken) ;
cToken =strtok(NULL,",") ;
/*Store the array (amplitude) value into a two-dimensional real array* /
aRealArray[lAmpltd][1Count] = atof(cToken) ;
}
/*Display the contents of the array .* /
for (long i=0 ;i<=lCount ;i++ )
{
printf("\tFrequency of point[%d] = %f MHz\n",i,aRealArray[lFreq][i]/le6) ;
printf("\tAmplitude of point[%d] = %f dB\n",i,aRealArray[lAmpltd][i]) ;
}
/*Close the session* /
viClose(viESA) ;
viClose(defaultRM) ;
}
3-56
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents