Example - HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

Programming Examples
Measuring Harmonic Distortion (HP-IB)
• Read the marker amplitude in volts, This is the fundamental
amplitude in volts.
• Read the marker frequency.
• Change the center frequency step size equal to the marker
frequency.
• Measure each harmonic amplitude as follows:
• Set the span to 20 MHz
• Increment the center frequency. The new center frequency should
roughly equal the frequency of the next harmonic.
• Take a sweep mode and wait for completion.
• Perform a peak search and wait for completion.
• Activate signal track.
• Zoom down to a 100 kHz span.
• Take a sweep and wait for the sweep completion.
• Signal track off.
• Perform a peak search and wait for completion.
• Set marker amplitude in volts.
• Query, read the marker amplitude in volts.
• Change the amplitude units to dBm and read the marker
amplitude.
• Calculate the relative amplitude of each harmonic relative to the
fundamental.
• Calculate the total harmonic distortion.
• Display fundamental amplitude in dBm, fundamental frequency in
MHz, relative amplitude of each harmonic in dBc and total harmonic
distortion in percent.
• Close the session.

Example:

#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
3-70
"Hewlett-Packard, E4401B"
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents