Agilent Technologies N9340B Programmer's Manual page 56

Spectrum analyzer
Table of Contents

Advertisement

4
Programming Example
/*Reset the Instrument*/
/*Display the program heading */
signal accordingly*/
nal.*/
}
50
viPrintf(viN9340B,"*RST\n");
printf("\n\t\t Noise Program \n\n" );
/* Check for the instrument model number and route the 50 MHz
Route50MHzSignal();
/*Set the analyzer center frequency to 50 MHz*/
viPrintf(viN9340B,"SENS:FREQ:CENT 50e6\n");
/*Set the analyzer span to 10 MHz*/
viPrintf(viN9340B,"SENS:FREQ:SPAN 10e6\n");
/*Set the marker to the maximum peak*/
viPrintf(viN9340B,"CALC:MARK1:MAX \n");
/*Activate the noise marker function.*/
viPrintf(viN9340B,"CALC:MARK1:PHN ON \n");
/*Set the offset to 20 kHz. This places the
active marker two divisions to the right of the input sig-
viPrintf(viN9340B,":CALC:PHN:OFFS 20KHz \n");
/*Query and read the phase noise from the analyzer */
viQueryf(viN9340B,":CALC:MARK:PHN:Y? \n","%lf",&dMarkAmp);
/*Report the phase nosie */
printf("\t Marker Amplitude =%lf dBc/Hz\n",dMarkAmp);
/*Close the session*/
viClose(viN9340B);
viClose(defaultRM);
N9340B Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents