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

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

Advertisement

Programming Examples
Measuring Harmonic Distortion (RS-232)
/*
Set marker amplitude in volts
/*
UNIT:POW V
/*
Query, read the marker amplitude in volts
/*
CALC:MARK:Y?
/*
Change the amplitude units to dBm and read the
/*
marker amplitude.
/*
UNIT:POW DBM
/* - Calculate the relative amplitude of each harmonic
/*
reletive to the fundamental
/* - Calculate the total harmonic distortion
/* - Display the fundamental amplitude in dBm, fundamental
/*
frequency in MHz, relative amplitude of each harmonic
/*
in dBc and total harmonic distortion in percent
/* - Close the session
/************************************************************/
#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
#define hpESA_IDN_E4411B
ViSession defaultRM, viESA;
ViStatus
errStatus;
ViChar
cIdBuff[256]= {0};
char
cEnter = 0;
int
iResult = 0;
long
lOpc =0L ;
/*Set the input port to 50MHz 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 50MHz amplitude reference for the models*/
/*E4411B, E4401B*/
viPrintf(viESA,"CAL:SOUR:STAT ON\n");
3-80
"Hewlett-Packard, E4401B"
"Hewlett-Packard, E4411B"
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents