User`s guide
4-36
Programming
Programming Examples
140 PRINT Error_return$
150 UNTIL (VAL(Error_return$)=0)
170 GOTO Exit_prog
180 !
190 Wait_to_settle: ! wait for switch to settle
200 REPEAT
210 OUTPUT Switch_addr;"*ESR?"
220 ENTER Switch_addr;Esr_byte
230 UNTIL BIT(Esr_byte,0)
240 RETURN
250 !
260 Exit_prog:!
270 END
Description Line No.
10 to 170 Same as in Example 1 except for declaration of
Esr_byte
.
190 to 240 The new
Wait_to_settle
subroutine.
200 Start
REPEAT
loop.
210 Send the *ESR? command to the switch. This queries the
switch for the Event Status Register value.
220 Read the value of the Event Status Register.
230 If the LSB of the ESR is 1 (that is, the switch is settled),
exit the loop. If the LSB is 0 (that is, switch is moving),
then loop back to line 200.
240 Return from subroutine.
Example 4: Input/output multiplexers
This program illustrates how two Agilent 86060C-series switches may be used
to function as input and output multiplexers in an automated test system. For
this example, two 1
×
8 switches are used to test 8 optical devices under test.
The block diagram for this test system is shown below.