Agilent Technologies 8590 TV Converter Box User Manual


 
Controlling Trace Data with a Computer
Using sample programs, this section shows you how to read trace data and store the data with
your computer.
Reading Trace Data
The following program, which has been annotated with comments, reads a trace from the
spectrum analyzer and stores the trace data in a variable.
Program Example for the HP-IB Interface
10
!FILE:
“IBPROG5”
20
!create
a 401 point trace array:
30 REAL
Trace,a(l:401)
40 Analyzer=718
50 OUTPUT
Analyzer;“IP;
‘I
60
!set the output format of the spectrum analyzer for
70
!real
numbers:
80 OUTPUT Analyzer
;
“TDF
P
;
I’
90
!set
the spectrum analyzer parameters:
100 OUTPUT Analyzer;
“SNGLS;
‘I
110
OUTPUT Analyzer
;
“CF
300MZ
;
‘I
120 OUTPUT Analyzer
;
“SP
200MZ
;
‘I
130 OUTPUT Analyzer
;
“TS
;
‘I
140 OUTPUT Analyzer;
“MKPK
HI ;
‘I
150
!move
peak to center of spectrum analyzer screen:
160
OUTPUT Analyzer
;
“MKCF
;
I’
170 OUTPUT Analyzer
;
“TS
;
‘I
180
!ask the spectrum analyzer for trace data:
190 OUTPUT Analyzer
;
“TRA?
;
‘I
200
!send
the trace data to the computer:
210
ENTER
Analyzer;Trace-a(*)
220 OUTPUT Analyzer
;
“CONTS;
I’
230 LOCAL 7
240 END
Trace data can be read with the computer by making three changes to the program created in
Chapter 2. First, we modify the program to create a 401-point trace array, called Trace-a, in
which the trace data will be stored. Second, the program uses the TRA command to request
trace A data. (The MKA and MKF commands from the previous program have been deleted.)
Third, the spectrum analyzer sends trace A data to the variable, Trace-a.
3-2 Programming Topics