2-12
2
1
100 REM BASIC GPIB ADDRESS SETTING PROGRAM
110 DIM A$[100], B$[20]
120 CLEAR 7
130 WAIT .1
140 INPUT “Enter Current Device Address (0-30):”, Devadr
150 Adr=700
160 SEND 7; UNL LISTEN Devadr
170 WAIT .1
180 A$=”SYST:COMM:GPIB:ADDR?”
190 OUTPUT Adr; A$ END
200 ENTER Adr; B$
210 PRINT “ Device address = “;B$
220 INPUT “ Enter new device address (0-30): “,Newadr
230 A$=” SYST:COMM:GPIB:ADDR “
240 OUTPUT Adr;A$;Newadr END
250 WAIT .1
260 Adr=700
270 A$=”SYST:COMM:GPIB:ADDR?”
280 OUTPUT Adr;A$ END
290 ENTER Adr; B$
300 PRINT “ New Device address = “;B$
310 OUTPUT Adr;”*SAV 0” END
330 END
Figure 2-3 HP BASIC Address Configuration Program