Keysight N9320B Programmer's Manual page 56

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

Advertisement

Programming Example
Using C with Marker Peak Search and Peak Excursion
/*Open a USB session.*/
viStatus=viOpenDefaultRM(&defaultRM);
viStatus=viOpen(defaultRM,"USB0::2391::8472::0000000000::0::INSTR",V
I_NULL,VI_NULL,&viN9320B);
if(viStatus)
{
printf("Could not open a session to USB device\n");
exit(0);
}
/*Clear the instrument*/
viClear(viN9320B);
/*Reset the instrument*/
viPrintf(viN9320B,"*RST\n");
/*Set Y-Axis units to dBm*/
viPrintf(viN9320B,"UNIT:POW DBM\n");
/*Set the analyzer center frequency to 50MHZ*/
viPrintf(viN9320B,"SENS:FREQ:CENT 50e6\n");
/*Set the analyzer span to 50MHZ*/
viPrintf(viN9320B,"SENS:FREQ:SPAN 50e6\n");
/*Display the program heading */
printf("\n\t\t Marker Program \n\n" );
/* Check for the instrument model number and route the 50MHz signal
accordingly*/
Route50MHzSignal();
/*Set analyzer to single sweep mode*/
viPrintf(viN9320B,"INIT:CONT 0 \n ");
/*User enters the peak excursion value*/
printf("\t Enter PEAK EXCURSION in dB: ");
scanf( "%f",&fPeakExcursion);
50

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents