HP ESA-E Series Programmer's Manual page 135

Esa spectrum analyzers
Table of Contents

Advertisement

#define hpESA_IDN_E4411B
ViSession defaultRM, viESA;
ViStatus
errStatus;
ViChar
cIdBuff[256] = {0};
char
cEnter = 0;
int
iResult = 0;
long
lOpc = 0L;
void TakeSweep()
{
/*Take a sweep and wait for the sweep completion*/
viPrintf(viESA,"INIT:IMM
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)
{
printf("Program Abort! Error occurred: last command
was not completed! \n");
exit(0);
}
}
/*Set the input port to the 50 MHz amplitude reference/
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)));
if( iResult == 0 )
{
/*Set the input port to the 50 MHz amplitude reference
if the model is E4401B, E4411B*/
viPrintf(viESA,"CAL:SOUR:STAT ON \n");
}
else
{
/*For the >= 3Ghz,ask user to connect amplitude
reference output to input */
printf ("Connect amplitude reference
input \n");
printf ("......Press any key to continue \n");
scanf( "%c",&cEnter);
/* 50 MHz Signal is externally routed */
viPrintf(viESA,"CAL:SOUR:STAT ON \n");
Chapter 3
Measuring Harmonic Distortion (HP-IB)
"Hewlett-Packard, E4411B"
\n");
Programming Examples
output to the
3-71

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents