Agilent Technologies ESA-E Series Programmer's Manual page 90

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples
Reading Trace Data Using 32-bit Real Format (GPIB )
#include <stdio .h >
#include <stdlib .h>
#include <math .h>
#include <conio .h>
#include <ctype .h>
#include <string .h>
#include "visa .h "
#define hpESA IDN E4401B
"Hewlett-Packard, E4401B "
#define hpESA IDN E4411B "Hewlett-Packard, E4411B "
ViSession defaultRM, viESA ;
ViChar
cIdBuff[256] ;
char
cEnter =0 ;
int
iResult =0 ;
void Route50MHzSignal( )
{
viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff) ;
iResult = (strncmp( cIdBuff, hpESA IDN_E4401B, strlen(hpESA IDN_E4401B)) &&
strncmp( cIdBuff, hpESA IDN E4411B, strlen(hpESA IDN E4411B))) ;
/*Set the input port to the 50MHz internal reference source for the models* /
/*E4411B and E4401B* /
viPrintf(viESA,"CAL :SOUR :STAT ON \n") ;
/* For the analyzers having frequency limits >= 3GHz, prompt the user to* /
/* connect the amplitude reference output to the input* /
printf ("Connect AMPTD REF OUT to the INPUT \n") ;
printf ("
Press Return to continue \n") ;
scanf( "%c",&cEnter) ;
/*Externally route the 50MHz Signal*/
viPrintf(viESA,"CAL :SOUR :STAT ON \n") ;
}
}
void main( )
{
/*Program Variables* /
ViStatus viStatus= 0 ;
ViChar VI FAR cResult[5000] = {0} ;
if( iResult = 0 )
{
3-30
Chapter 3

Advertisement

Table of Contents
loading

Table of Contents