EasyManuals Logo

Agilent Technologies E7401A Programmer's Guide

Agilent Technologies E7401A
349 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #166 background imageLoading...
Page #166 background image
166 Chapter 3
Programming Examples
Measuring Harmonic Distortion (GPIB)
viPrintf(viESA,"INIT:IMM;*WAI\n");
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX \n");
/*increase timeout to 60 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,60000);
/*Perform activate signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT ON \n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Perform narrow span and wait */
viPrintf(viESA,"SENS:FREQ:SPAN 10e4 \n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*De activate the signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT OFF \n");
/*Reset timeout to 3 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,3000);
/*Set units to DBM*/
viPrintf(viESA,"UNIT:POW DBM \n");
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX \n");
/*Read the marker amplitude, this is the fundamental amplitude
in dBm */
viQueryf(viESA,"CALC:MARK:Y?\n","%1f", &fFundaAmptdDbm);
/*Change the amplitude units to Volts */
viPrintf(viESA,"UNIT:POW V \n");
/*Read the marker amplitude in volts, This is the fundamental amplitude
in Volts (necessary for the THD calculation).*/
viQueryf(viESA,"CALC:MARK:Y?\n","%lf",&dFundaAmptdV);
/*Read the marker frequency. */
viQueryf(viESA,"CALC:MARK:X? \n","%lf",&dMarkerFreq);
dFundamental = dMarkerFreq;

Table of Contents

Other manuals for Agilent Technologies E7401A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies E7401A and is the answer not in the manual?

Agilent Technologies E7401A Specifications

General IconGeneral
BrandAgilent Technologies
ModelE7401A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals