4-40
Programming
Example 4: Input/output multiplexers
80
PRINT "IT WILL STOP MEASURING AFTER 50 MEASUREMENT
CYCLES."
90
PRINT "TO HALT PROGRAM EARLIER, PRESS F8."
100 !
110 GOSUB
Init_system
120 !
130 ON TIME 300 GOSUB Measure_duts
140 ON KEY 8 LABEL "QUIT" GOTO End_prog
150 !
160 Meas_count=0
170 REPEAT
180 UNTIL
Meas_count=50
190 GOTO
End_prog
200 !
210 Init_system:! Initialize HPIB instruments
220
CLEAR (7) ! clear HPIB interface
230
! set HPIB instrument addresses
240 In_switch_addr=711
250 Out_switch_addr=712
260 Opt_meter_addr=722
270
! set minimum power allowed to 1 microwatt
280 Min_power=1.E-6
290
! Turn on autoranging
300 OUTPUT
@Opt_meter_addr;"SENSE2:POWER:RANGE:AUTO
ON"
310
! Select Watts as output units
320
OUTPUT @Opt_meter_addr;"SENSE2:POWER:UNIT WATT"
330
! Select 1550 nm wavelength from source
340 OUTPUT
@Opt_meter_addr;"SOURCE1:POWER:WAVELENGTH
UPPER"
350 RETURN
360 !
370 !
380 Measure_duts:! measure all eight duts
390
! Turn on laser
400
OUTPUT @Opt_meter_addr;"SOURCE1:POWER:STATE ON"
410
! step through and measure all DUTs
420
FOR Current_dut=1 TO 8
430
! build hpib commands to send to switches
440 In_switch$="ROUTE:LAYER1:CHANNEL
B"&TRIM$(VAL$(Current_dut))
450 Out_switch$="ROUTE:LAYER1:CHANNEL
B"&TRIM$(VAL$(Current_dut))
460
! send command to switches
470 OUTPUT
@In_switch_addr;In_switch$
480 OUTPUT
@Out_switch_addr;Out_switch$
490
! wait for switches to settle
500 OUTPUT
@In_switch_addr;"*WAI"
510 OUTPUT
@In_switch_addr;"SYSTEM:CONFIG?"
520 ENTER
@In_switch_addr;Dummy$
530 OUTPUT
@Out_switch_addr;"*WAI"
Содержание 86060C Series
Страница 1: ...User s Guide HP 86060C Series Lightwave Switches ...
Страница 18: ...1 12 General Information Specifications and Regulatory Information ...
Страница 46: ...3 6 Using the Switch Changing Switch Position Changing Switch Position ...
Страница 93: ...5 Spare Channel Replacement Procedure 5 4 Electrostatic Discharge Information 5 7 Servicing ...
Страница 98: ...5 6 Servicing Spare Channel Replacement Procedure Figure 5 2 Top view of the HP 86062C lightwave switch ...
Страница 104: ...Index 4 Index ...