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 #165 background imageLoading...
Page #165 background image
Chapter 3 165
Programming Examples
Measuring Harmonic Distortion (GPIB)
/* Open a GPIB session at address 18*/
viStatus=viOpenDefaultRM(&defaultRM);
viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,&viESA);
if(viStatus)
{
printf("Could not open a session to GPIB device at address 18!\n");
exit(0);
}
/*Clear the instrument*/
viClear(viESA);
/*Reset the instrument*/
viPrintf(viESA,"*RST\n");
/*Display the program heading */
printf("\n\t\t Harmonic Distortion Program \n\n" );
/* Check for the instrument model number and route the 50MHz-signal accordingly*/
Route50MHzSignal();
/*Prompt user for fundamental frequency*/
printf("\t Enter the input signal fundamental frequency in MHz ");
/*The user enters fundamental frequency*/
scanf("%lf",&dFundamental);
/*Set the analyzer center frequency to the fundamental frequency. */
viPrintf(viESA,"SENS:FREQ:CENT %lf MHZ \n;",dFundamental);
/*Set the analyzer to 10MHz Span */
viPrintf(viESA,"SENS:FREQ:SPAN 10 MHZ\n");
/*Put the analyzer in a single sweep */
viPrintf(viESA,"INIT:CONT 0 \n");
/*Trigger a sweep, wait for sweep completion*/
viPrintf(viESA,"INIT:IMM;*WAI\n");
/*Perform a peak search */
viPrintf(viESA,"CALC:MARK:MAX \n");
/* Place the signal at the reference level using the
marker-to-reference level command and take sweep */
viPrintf(viESA,"CALC:MARK:SET:RLEV \n");
/*Trigger a sweep, wait for sweep completion*/

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