Agilent Technologies N9340B Programmer's Manual page 49

Spectrum analyzer
Table of Contents

Advertisement

Programming Example
4
/*Set the peak excursion*/
viPrintf(viN9340B,"CALC:MARK:PEAK:EXC %1fDB \n",fPeakExcursion);
/*Set the peak thresold */
viPrintf(viN9340B,"CALC:MARK:PEAK:THR -90 \n");
/*Trigger a sweep and wait for completion*/
viPrintf(viN9340B,"INIT:IMM \n");
/*Set the marker to the maximum peak*/
viPrintf(viN9340B,"CALC:MARK:MAX \n");
/*Query and read the marker frequency*/
viQueryf(viN9340B,"CALC:MARK:X? \n","%lf",&dMarkerFreq);
printf("\n\t RESULT: Marker Frequency is: %lf MHZ \n\
n",dMarkerFreq/10e5);
/*Query and read the marker amplitude*/
viQueryf(viN9340B,"CALC:MARK:Y?\n","%lf",&dMarkerAmpl);
printf("\t RESULT: Marker Amplitude is: %lf dBm \n\n",dMarkerAmpl);
/*Close the session*/
viClose(viN9340B);
viClose(defaultRM);
}
N9340B Programmer's Guide
43

Advertisement

Table of Contents
loading

Table of Contents