Agilent Technologies 8590 TV Converter Box User Manual


 
Saving Trace Data
The trace data in the previous program can be stored on a computer disk by making three
program modifications.
10
!FILE:
"IBPROGG"
20
!create
a 401 point trace array:
30 REAL
Trace,a(l:401)
40 Analyzer=718
50 OUTPUT
Analyzer;"IP;"
60
!set the output format of the spectrum analyzer for
70
!real
numbers:
80 OUTPUT
Analyzer;"TDF
P;"
90
!set the spectrum analyzer parameters:
100 OUTPUT
Analyzer;"SNGLS;"
110 OUTPUT
Analyzer;"CF
300MZ;"
120 OUTPUT
Analyzer;"SP
200MZ;"
130 OUTPUT
Analyzer;"TS;"
140 OUTPUT
Analyzer;"MKPK
HI;"
150
!move
peak to center of spectrum analyzer screen:
160 OUTPUT
Analyzer;"MKCF;"
170 OUTPUT
Analyzer;"TS;"
180
!ask the spectrum analyzer for trace data:
190 OUTPUT
Analyzer;"TRA?;"
200
!send
the trace data to the computer:
210 ENTER
Analyzer;Trace-a(*)
220
!create
file to store trace
230
!file
is 13 records long:
240 CREATE BDAT
"DATA-A",13
250
!assign
path for the file:
260 ASSIGN @File TO "DATA-A"
270
!send
trace data to the file:
280 OUTPUT
OFile;Trace,a(*)
290 OUTPUT
Analyzer;"CONTS;"
300 LOCAL 7
310
!close
file:
320 ASSIGN
@File
TO
*
330 END
First, using the CREATE command, we create an empty file on the disk for storing the trace.
The file is 13 records long. (To determine the number of records, the 401-point trace is
multiplied by 8 bytes per point, the storage required for real numbers, then divided by 256
bytes per record. The result is rounded to the next largest integer.)
Next, we assign an input and an output path to the file DATA-A. Then, we send the trace data
to the file. (See lines 260 through 280.) Finally, in line 320, we close the file.
Note
If a program containing the CREATE command is run twice, the computer will
report an error the second time because the file already exists. To prevent this
error, place an exclamation mark before the CREATE command to “comment
out” the line after the first run. (See line 240.)
3-4 Programming Topics