Agilent Technologies N9340B Programmer's Manual page 47

Spectrum analyzer
Table of Contents

Advertisement

Programming Example
4
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include "visa.h"
ViSession defaultRM, viN9340B;
ViStatus errStatus;
ViChar cIdBuff[256]= {0};
char cEnter = 0;
int iResult = 0;
/*Set the input port to 50MHz amplitude reference*/
void Route50MHzSignal()
{
viQueryf(viN9340B, "*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 50MHz Signal*/
viPrintf(viN9340B,"CAL:SOUR:STAT ON \n");
}
void main()
{
/*Program Variables*/
ViStatus viStatus = 0;
double dMarkerFreq = 0;
double dMarkerAmpl = 0;
float fPeakExcursion =0;
N9340B Programmer's Guide
41

Advertisement

Table of Contents
loading

Table of Contents