EasyManua.ls Logo

HP ESA-E Series - Page 113

HP ESA-E Series
398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 3-49
Programming Examples
Measuring Noise
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);
}

Table of Contents