![HP 86060C Series User Manual Download Page 83](http://html.mh-extra.com/html/hp/86060c-series/86060c-series_user-manual_165794083.webp)
4-33
Programming
Example 1: Switch position using the *WAI command
Example 1: Switch position using the *WAI command
This program prompts the operator for the desired switch position and then
moves the switch to this position. The switch error queue is then read and
printed. The program shows how to use the *WAI command to ensure that the
switch has settled to its new position.
Listing
10 INTEGER
Switch_addr,A_position,B_position
20
DIM Command$[80],Channel$[80],Error_return$[80],
Dummy$[80]
30 Switch_addr=711
40 CLEAR
SCREEN
50
INPUT "Enter A-port position : ",A_position
60
INPUT "Enter B-port position : ",B_position
70 Channel$="A"&TRIM$(VAL$(A_position))&",B"&TRIM$
(VAL$(B_position))
80 Command$="ROUTE:LAYER1:CHANNEL
"&Channel$
90 OUTPUT
Switch_addr;Command$
100
GOSUB Wait_to_settle
110 REPEAT
120 OUTPUT
Switch_addr;"SYSTEM:ERROR?"
130 ENTER
Switch_addr;Error_return$
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 OUTPUT
Switch_addr;"*WAI"
210 OUTPUT Switch_addr;"SYSTEM CONFIG?"
220 ENTER
Switch_addr;Dummy$
230 RETURN
240 !
250 Exit_prog:!
260 END
Description
Line No.
1
10 to 20
Declare some variables for use in the program.
30
Set the HP 8606X Optical Switch address variable,
Switch_addr
, to 711 (factory default).
40 to 60
Clear the screen and prompt the operator for the desired
switch position. Store the positions in variables
A_position and B_position
.
70
Set
Channel$
to represent the switch channel positions in
Summary of Contents for 86060C Series
Page 1: ...User s Guide HP 86060C Series Lightwave Switches ...
Page 18: ...1 12 General Information Specifications and Regulatory Information ...
Page 46: ...3 6 Using the Switch Changing Switch Position Changing Switch Position ...
Page 93: ...5 Spare Channel Replacement Procedure 5 4 Electrostatic Discharge Information 5 7 Servicing ...
Page 104: ...Index 4 Index ...