EasyManua.ls Logo

HP ESA-E Series - Example

HP ESA-E Series
398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3-70 Chapter3
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 "Hewlett-Packard, E4401B"

Table of Contents