Agilent Technologies N9340B Programmer's Manual page 52

Spectrum analyzer
Table of Contents

Advertisement

4
Programming Example
46
/* Open an USB session*/
viStatus=viOpenDefaultRM(&defaultRM);
viStatus=viO-
pen(defaultRM,"USB0::2391::8472::9876543210::0::INSTR",VI_NULL,V
I_NULL,&viN9340B);
if(viStatus)
printf("Could not open a session to USB device!\n");
exit(0);
}
/*Clear the instrument*/
viClear(viN9340B);
/*Reset the instrument*/
viPrintf(viN9340B,"*RST\n");
/*Display the program heading */
printf("\n\t\t Marker Delta Program \n\n" );
/*Check for the instrument model number and route the 50MHz
signal accordingly*/
Route50MHzSignal();
/*Set the analyzer to single sweep mode*/
viPrintf(viN9340B,"INIT:CONT 0\n");
/*Prompt the user for the start frequency*/
printf("\t Enter the Start frequency in MHz ");
/*The user enters the start frequency*/
scanf("%lf",&dStartFreq);
/*Prompt the user for the stop frequency*/
printf("\t Enter the Stop frequency in MHz ");
/*The user enters the stop frequency*/
scanf("%lf",&dStopFreq);
N9340B Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents