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

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_LENGTH
) ];
/******************
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() {
int iModelNumber;
char * cpModel;
/* Identify the instrument and get the model number
viQueryf(viESA, "*IDN?\n", "%t", &cBuffer);
iModelNumber = 0;
if( !(strstr(cBuffer,"E44") == NULL))
cpModel = strstr(cBuffer,"44");
cpModel[4] = 0;
iModelNumber = atoi(cpModel);
}
else
{
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 calculations
viPrintf(viESA, ":DET SAMP\n");
/* Turn off analog output of option board to maximize measurement rate*/
viPrintf(viESA, ":SYST:PORT:IFVS:ENAB OFF\n");
3-90
Calculate length byte in block header
{
prepare ESA for measurement
*****************/
{
*******************/
{
*/
*/
*/
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents