Agilent Technologies 8156A Water Dispenser User Manual


 
139
Programming Examples
Example 4 - Running an Attenuation Sweep
9.4 Example 4 - Running an Attenuation Sweep
Function
We set up the instrument to sweep from 0dB to 5dB with an interval
of 0.5dB, dwelling for a second at each attenuation factor.
The requirements are an Agilent 8156A Attenuator.
Listing
10 !-------------------------------------------------
20 !
30 ! Agilent 8156A Programming Example 4
40 !
50 ! Running an Attenuation Sweep
60 !
70 !-------------------------------------------------
80 !
90 ! Definitions and Initializations
100 !
110 Att=728
130 !
140 Startatt=0.0
150 Stopatt=5.0
160 Stepatt=0.5
170 Dwell=1
180 !
190 ! Initialise the instrument
200 !
210 OUTPUT Att;"*rst;*cls"
220 !
230 ! Do the sweep
240 !
250 FOR Value=Startatt TO Stopatt STEP Stepatt
260 OUTPUT Att;"inp:att ";Value
270 WAIT Dwell
280 NEXT Value
290 END