Agilent Technologies 8156A Water Dispenser User Manual


 
137
Programming Examples
Example 3 - Measuring and Including the Insertion Loss
Listing
10 !-----------------------------------------
20 !
30 ! Programming Example 3
40 !
50 ! Measuring the Insertion Loss and using it as a Cal factor
60 !
70 !-----------------------------------------
80 !
90 ! Definitions and Initializations
100 !
110 Att=728
120 Mm=722
130 !
140 OUTPUT Mm;"*rst;*cls"
150 OUTPUT Att;"*rst;*cls"
160 !
170 !
Setup the instruments, with the output of the source connected
180 ! to the input of the sensor and wait for the ENTER key to
190 ! be pressed before continuing
200 !
210 CLEAR SCREEN
220 PRINT TABXY(4,17);""
230 I
NPUT "Connect the Source to the Sensor and then press ENTER",Inp$
240 !
250 ! Set the sensor wavelength to that of the source
260 !
270 OUTPUT Mm;"sour2:pow:wave?"
280 ENTER Mm;Wvl
290 OUTPUT Mm;"sens1:pow:wave ";Wvl
300 !
310 ! Activate the source
320 !
330 OUTPUT Mm;"sour2:pow:stat on"
340 !
350 !
Set the instrument to measure in dB, and take the current power
360 ! as the reference.
370 !
380 OUTPUT Mm;"sens1:pow:ref:stat on"
390 WAIT 2
Let everything settle before making a reading
400 OUTPUT Mm;"sens1:pow:ref:disp"
410 !
420 ! Switch off the source and prompt for the next hardware se
tup
430 !
440 OUTPUT Mm;"sour2:pow:stat off"
450 PRINT TABXY(4,17);""
460 INPUT "Connect the Attenuator into the setup and press ENTE
R to continue:,Inp$
470 !
480 ! Set the wavelength on the attenuator
490 !
500 OUTPUT Att;"inp:wave ";Wvl
510 !
520 ! Switch on the source, enable the attenuator