Keysight N9320B Programmer's Manual page 57

Spectrum analyzer
Hide thumbs Also See for N9320B:
Table of Contents

Advertisement

Programming Example
Using C with Marker Peak Search and Peak Excursion
/*Set the peak excursion*/
viPrintf(viN9320B,"CALC:MARK:PEAK:EXC %1fDB \n",fPeakExcursion);
/*Set the peak thresold */
viPrintf(viN9320B,"CALC:MARK:PEAK:THR -90 \n");
/*Trigger a sweep and wait for completion*/
viPrintf(viN9320B,"INIT:IMM \n");
/*Set the marker to the maximum peak*/
viPrintf(viN9320B,"CALC:MARK:MAX \n");
/*Query and read the marker frequency*/
viQueryf(viN9320B,"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(viN9320B,"CALC:MARK:Y?\n","%lf",&dMarkerAmpl);
printf("\t RESULT: Marker Amplitude is: %lf dBm \n\n",dMarkerAmpl);
/*Close the session*/
viClose(viN9320B);
viClose(defaultRM);
}
51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents