HP ESA-E Series Programmer's Manual page 77

Esa spectrum analyzers
Table of Contents

Advertisement

/*Clear the analyzer*/
viClear(viESA);
/*Reset the analyzer*/
viPrintf(viESA,"*RST\n");
/*Set the analyzer center frequency to 50 MHz*/
viPrintf(viESA,"SENS:FREQ:CENT 50e6\n");
/*Set the analyzer span to 50 MHz*/
viPrintf(viESA,"SENS:FREQ:SPAN 50e6\n");
/*Display the program heading*/
printf("\n\t\t Marker Program \n\n" );
/*Check for the analyzer model number and route the 50
MHz signal accordingly*/
Route50MHzSignal();
/*Set the analyzer to single sweep mode*/
viPrintf(viESA,"INIT:CONT 0 \n");
/*User enters the peak excursion value*/
printf("Enter PEAK EXCURSION in dB:
scanf( "%f",&fPeakExcursion);
/*Set the peak excursion*/
viPrintf(viESA,"CALC:MARK:PEAK:EXC %1fDB
\n",fPeakExcursion);
/*Set the peak threshold*/
viPrintf(viESA,"TRAC:MATH:PEAK:THR:STAT ON \n");
viPrintf(viESA,"TRAC:MATH:PEAK:THR -90 \n");
/*Trigger a sweep*/
viPrintf(viESA,"INIT:IMM\n");
/*Make sure the previous command has been completed*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! error ocurred: last command
was not completed!\n");
exit(0);
}
Chapter 3
Programming Examples
Using Marker Peak Search and Peak Excursion
");
3-13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents