HP ESA-E Series Programmer's Manual page 113

Esa spectrum analyzers
Table of Contents

Advertisement

printf("Program Abort! error ocurred: last command was
not completed!\n");
exit(0);
}
/*Set the analyzer to single sweep mode*/
viPrintf(viESA,"INIT:CONT 0 \n");
/*Trigger a sweep*/
viPrintf(viESA,"INIT:IMM; \n");
/*Set the analyzer to 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 sweep*/
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("Marker Amplitude = %lf dBc/Hz\n",dMarkAmp);
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}
Chapter 3
Programming Examples
Measuring Noise
3-49

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents