EasyManuals Logo

Agilent Technologies EMC Series Programmer's Guide

Agilent Technologies EMC Series
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 #175 background imageLoading...
Page #175 background image
Chapter 3 175
Programming Examples
Measuring Harmonic Distortion (RS-232)
/*Read the marker frequency. */
viQueryf(viESA,"CALC:MARK:X? \n","%lf",&dMarkerFreq);
dFundamental = dMarkerFreq;
/*Measure each harmonic amplitude as follows: */
for ( lNum=2;lNum<=lMaxHarmonic;lNum++)
{
/*Measuring the Harmonic No#[%d] message */
printf("\n\t Measuring the Harmonic No [%d] \n",lNum );
/*Set the span to 20 MHz*/
viPrintf(viESA,"SENS:FREQ:SPAN 20 MHZ\n");
/*Set the center frequency to the nominal harmonic frquency*/
dHarmFreq = lNum * dFundamental;
viPrintf(viESA,"SENS:FREQ:CENT %lf HZ\n",dHarmFreq);
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/*Perform a peak search and wait for completion */
viPrintf(viESA,"CALC:MARK:MAX\n");
/*Increase timeout to 60 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,60000);
/*Activate signal track */
viPrintf(viESA,"CALC:MARK:TRCK:STAT ON\n");
/*Zoom down to a 100 KHz span */
viPrintf(viESA,"SENS:FREQ:SPAN 10e4\n");
/*Take a sweep and wait for the sweep completion*/
TakeSweep();
/* Signal track off */
viPrintf(viESA,"CALC:MARK:TRCK:STAT OFF\n");
/*Reset timeout to 3 sec*/
viSetAttribute(viESA,VI_ATTR_TMO_VALUE,3000);
/*Set marker amplitude in Volts*/
viPrintf(viESA,"UNIT:POW V\n");
/*Perform a peak search and wait for completion*/
viPrintf(viESA,"CALC:MARK:MAX\n");

Table of Contents

Other manuals for Agilent Technologies EMC Series

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies EMC Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelEMC Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals