Chapter 3 177
ProgrammingExamples
Making Faster Measurements (multiple measurements)
Making Faster Measurements (multiple measurements)
/******************************* *****************************/
/* Average.c Agilent Technolo gies 1999 */
/* */
/* This C programming example do es the following: */
/* Performs Power Averaging of M ultiple 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 addr ess 18 */
/* - Clears and Resets the Analy zer to a known state */
/* SYST:PRES:TYPE FACT */
/* *RST */
/* - Identify the Instrument mod el */
/* *IDN? */
/* - Sets the analyzer center fr equency and span */
/* SENS:FREQ:CENT freq */
/* SENS:FREQ:SPAN freq */
/* - Sets the analyzer resolutio n bandwidth */
/* SENS:BAND rbw */
/* - Selects sampled as the dete ctor mode */
/* SENS:DET SAMP */
/* - Disable optional Input/Outp ut functions */
/* :SYST:PORT:IFVS:ENAB OFF */
/* - Turn off auto-alignment */
/* CAL:AUTO OFF */
/* - Select the desired number o f sweep points */
/* SWE:POINTS points */
/* - Select the appropriate disp lay reference level and */
/* amplitude reference routi ng */
/* E4402B/03B/04B/05B/07B/08B or E7402A/03A/04A/05A */
/* DISP:WIND:TRAC:Y:RLEV -2 0 DBM */
/* CAL:SOUR:STAT ON */
/* E4401B, E4411B, or E7401A */
/* DISP:WIND:TRAC:Y:RLEV -2 5 DBM */
/* CAL:SOUR:STAT ON; */
/* - Select single sweep mode */
/* INIT:CONT OFF */
/* - Disable local display */
/* DISP:ENAB OFF */
/* - Select internal machine bin ary data format (milli-dBm) */