![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/5/d7/5d720816-19b5-4859-9a46-b543c4868a04/5d720816-19b5-4859-9a46-b543c4868a04-bgb1.png)
Chapter 3 177
Programming Examples
Making Faster Measurements (multiple measurements)
Making Faster Measurements (multiple measurements)
/************************************************************/
/* Average.c Agilent Technologies 1999 */
/* */
/* This C programming example does the following: */
/* Performs Power Averaging of Multiple ESA Measurements */
/* and Writes the Result back to a Trace for display */
/* */
/* The required SCPI instrument commands are given as */
/* reference. */
/* */
/* - Opens a GPIB device at address 18 */
/* - Clears and Resets the Analyzer to a known state */
/* SYST:PRES:TYPE FACT */
/* *RST */
/* - Identify the Instrument model */
/* *IDN? */
/* - Sets the analyzer center frequency and span */
/* SENS:FREQ:CENT freq */
/* SENS:FREQ:SPAN freq */
/* - Sets the analyzer resolution bandwidth */
/* SENS:BAND rbw */
/* - Selects sampled as the detector mode */
/* SENS:DET SAMP */
/* - Disable optional Input/Output functions */
/*
:SYST:PORT:IFVS:ENAB OFF */
/* - Turn off auto-alignment */
/* CAL:AUTO OFF */
/* - Select the desired number of sweep points */
/* SWE:POINTS points */
/* - Select the appropriate display reference level and */
/* amplitude reference routing */
/* E4402B/03B/04B/05B/07B/08B or E7402A/03A/04A/05A */
/* DISP:WIND:TRAC:Y:RLEV -20 DBM */
/* CAL:SOUR:STAT ON */
/* E4401B, E4411B, or E7401A */
/* DISP:WIND:TRAC:Y:RLEV -25 DBM */
/* CAL:SOUR:STAT ON; */
/* - Select single sweep mode */
/* INIT:CONT OFF */
/* - Disable local display */
/* DISP:ENAB OFF */
/* - Select internal machine binary data format (milli-dBm) */