Keysight N9320B Programmer's Manual page 63

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

Advertisement

ViSession defaultRM, viN9320B;
ViStatus errStatus;
ViChar cIdBuff[256]= {0};
char cEnter = 0;
int iResult = 0;
/*Set the input port to 50 MHz amplitude reference*/
void Route50MHzSignal()
{
viQueryf(viN9320B, "*IDN?\n", "%t", &cIdBuff);
/* prompt the user*/
/* to connect the amplitude reference output to the input*/
printf ("Connect CAL OUT to the RF IN \n");
printf ("......Press Return to continue \n");
scanf( "%c",&cEnter);
/*Externally route the 50 MHz Signal*/
viPrintf(viN9320B,"CAL:SOUR:STAT ON \n");
}
void main()
{
/*Program Variables*/
ViStatus viStatus = 0;
double dMarkAmp =0.0;
/*Open a USB session*/
viStatus=viOpenDefaultRM(&defaultRM);
viSta-
tus=viOpen(defaultRM,"USB0::2391::8472::0000000000::0::INSTR",VI_NU
LL,VI_NULL,&viN9320B);
if(viStatus)
{
printf("Could not open a session to USB device!\n");
exit(0);
}
/*Clear the Instrument*/
viClear(viN9320B);
Programming Example
Measuring Phase Noise
57

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents