EasyManua.ls Logo

HP ESA-E Series - Page 77

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-13
Programming Examples
Using Marker Peak Search and Peak Excursion
/*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);
}

Table of Contents

Related product manuals