Agilent Technologies 8590 TV Converter Box User Manual


 
The HP-IB version stores the trace in the variable called Trace-a(*). The state of the spectrum
analyzer is stored in the variable Learn-string& These two variables are then saved in a file
called STATE. Finally, the file is stored on a disk.
Using the data stored in STATE, the spectrum analyzer settings can be reset according to the
saved state. Then, using the stored trace data, trace data can be viewed on the spectrum
analyzer display.
Line 30 gives the dimensions of the learn string using the HP BASIC DIM command. Learn
strings for the spectrum analyzer require 202 bytes of storage space. Also see the output learn
string (OL) command.
Line 70 uses TDF B to format the output in binary. Binary provides the fastest data transfer
and requires the least amount of memory to store data. Each data point is transferred in
binary as two 8-bit bytes. The data points are in the internal representation of measurement
data. (See “Different Formats for Trace Data Transfers” at the end of this chapter for more
information about trace data formats.)
When the trace and state data are sent from the spectrum analyzer to the computer, they
must be formatted. Lines 120 and 150 format trace data with the HP BASIC USING command.
In the formatting statement,
I‘#”
indicates that the statement is terminated when the last
ENTER item is terminated. EOI (end-or-identify) and LF (line feed) are item terminators, and
early termination will result in an inaccurate learn string. “W” specifies word format. “202A”
indicates the size of the learn string.
Line 170 creates a file called STATE that is 4 records long. (lb determine the number of records
for the computer in our example, the 401-point trace is multiplied by 2 bytes per point and the
202-byte learn string is added to give 1004 bytes total. This total is divided by 256 bytes per
record, resulting in 4 records.)
Note
If the program containing the CREATE command is run twice, the computer
will report an error the second time because the file already exists. lb prevent
this, place an exclamation mark before the CREATE command to “comment
out” line 170 after the program has been executed.
Programming Topics
3-9