Agilent Technologies 8590 TV Converter Box User Manual


 
Returning the Spectrum Analyzer to its Former State
The following programs read a trace stored in a file and load it into a variable.
Program Example for the HP-IB Interface
10
!FILE:
"IBPROGS"
20
!define
202 character string:
30 DIM
Learn,string$[202]
40 !create
401 point array to store trace:
50 INTEGER
Trace,a(l:401)
60 Analyzer=718
70
!assign
path to the file:
80 ASSIGN @File TO "STATE"
90
!get values for Learn-string$
100
!and Trace-a(*) from disk:
110 ENTER
OFile;Learn-string$,Trace,a(*)
120
!send
learnstring to spectrum analyzer:
130 OUTPUT
Analyzer;"IP
DONE;"
140 ENTER Analyzer
150 OUTPUT
Analyzer;Learn-string$
160
!set single sweep mode:
170 OUTPUT
Analyzer;"SNGLS;"
180
!prepare
spectrum analyzer for a trace from
190
!the computer:
200 OUTPUT
Analyzer;"TRA
#A";
210 !send
trace to the spectrum analyzer
220 OUTPUT Analyzer USING
"#,W";802,Trace-a(*)
230 !view
trace to see it was sent:
240 OUTPUT
Analyzer;"VIEW
TRA;"
250 !close
file:
260 ASSIGN
@File
TO
*
270 END
The HP-IB program reads a trace stored in the file STATE, then loads it into the variable
Trace-$
*).
First, the settings of the spectrum analyzer that were stored in the variable
LEARN$
are
recalled. The spectrum analyzer state is changed to the same state as when the trace was
stored. Then previously stored trace data is returned to the spectrum analyzer and the trace is
viewed on the spectrum analyzer screen. Finally, line 220 uses the HP BASIC USING command
to format the trace data.
3-l
2 Programming Topics