Agilent Technologies 8590 TV Converter Box User Manual


 
Reading Trace Data from a Computer Disk
If we want to return trace data to the spectrum analyzer for later viewing, we must work
the “saving” process in reverse. The following program reads a trace previously stored on a
computer disk and stores the trace in an array variable.
Program Example for the HP-IB Interface
10
!FILE:
"IBPROG7"
20
!create
a
401-point
trace array:
30 REAL
Trace-a(l:401)
40
!assign
path to the file with the
50
!trace
in it:
60 ASSIGN @File TO "DATA-A"
70
!enter
trace into variable Trace-a:
80 ENTER
QFile;Trace-a(*)
90
!close
file:
100 ASSIGN
OFile
TO
*
110 END
First, in line 30, the program creates a 401-point trace array. Then, in line 60, the program
assigns a path to the trace file. Finally, in line 80, the program sends the trace data to the
variable
Trace-N
*).
Program Example for the RS-232 Interface
10 'File =
232PROG7
20 OPEN
"COMl:9600,N,8,1"
AS
#l
30 'create a
401-point
trace array
40 DIM
TRCA(401)
50 'assign number to file with trace data in it
60 OPEN
"TRACEA"
FOR INPUT AS
#2
70 'enter the trace into the array
80 FOR
I=1
TO 401
90 INPUT
#2,TRCA(I)
100 NEXT I
110 CLOSE
120 END
First, in line 40, the program creates a 401-point trace array. Then, in lines 60 through 100, the
program reads the disk file
TRACEA
and stores data in the array variable TRCA.
3-6 Programming Topics