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

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

Advertisement

Programming Examples
Measuring Noise
/*Check for operation complete*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was not completed!\n");
exit(0);
}
/*Set the analyzer in a single sweep mode*/
viPrintf(viESA,"INIT:CONT 0 \n");
/*Trigger a spectrum measurement*/
viPrintf(viESA,"INIT:IMM \n");
/*Set the analyzer in active delta marker mode*/
viPrintf(viESA,"CALC:MARK:MODE DELT \n");
/*Set the marker delta frequency to 2 MHz. This places the
active marker two divisions to the right of the input signal.*/
viPrintf(viESA,"CALC:MARK:X 2E+6 \n");
/*Activate the noise marker function.*/
viPrintf(viESA,"CALC:MARK:FUNC NOIS \n");
/*Trigger a spectrum measurement*/
viPrintf(viESA,"INIT:IMM \n");
/*Check for operation complete*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was not completed!\n");
exit(0);
}
/*Query and read the marker delta amplitude from the analyzer*/
viPrintf(viESA,"CALC:MARK:Y? \n");
viScanf(viESA,"%lf",&dMarkAmp);
/*Report the marker delta amplitude as the carrier-to-noise ratio in dBc/Hz*/
printf("\t Marker Amplitude = %lf dBc/Hz\n",dMarkAmp);
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}
3-52
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents