7-118
Chapter 7
Programming Examples
Report Generation Examples
Example 7F: Reading ASCII Disk Files to the Instrument
Controller's Disk File
Another way to access the analyzer's test results is to store the data onto a disk file from
the analyzer. This operation generates an ASCII file of the analyzer data in a CITIFILE
format. A typical file generated by Example 7F is shown below:
CITIFILE A.01.00
#NA VERSION HP8753C.04.13
NAME DATA
VAR FREQ MAG 11
DATA S[1,1] RI
SEG_LIST_BEGIN
SEG 100000000 200000000 11
SEG_LIST_END
BEGIN
8.30566E-1,-1.36749E-1
8.27392E-1,-1.43676E-1
8.26080E-1,-1.52069E-1
8.25653E-1,-1.60003E-1
8.26385E-1,-1.68029E-1
8.26507E-1,-1.77154E-1
8.26263E-1,-1.87316E-1
8.26721E-1,-1.97265E-1
8.2724E-1,-2.07611E-1
8.28552E-1,-2.19940E-1
8.29620E-1,-2.31109E-1
END
This data file is stored by the analyzer under remote control or manually from the front
panel. See your analyzer’s user’s guide for more details on manual operation. This program
performs the same steps that are required to manually store a file from front panel.
This program stores a file in the same manner as an operator would store a file onto the
analyzer's internal disk drive from the front panel.
This example explains the process of storing the data from the analyzer to a file on the
internal disk drive. There is also a program to read the data from the file into a data array
for further processing or reformatting to another file type. The internal drive will store in
the same format that is present on the disk. A new disk may be formatted in either LIF or
DOS. For the example, the assumption has been made that the format transformation has
already taken place, and there is a file that can be read record by record, from which data
can be retrieved.
The goal of this example is to recover an array of stimulus frequency along with the
trace-data values. CITIFILES contain the real and imaginary values of each data point.
Some further transformation will be required to obtain magnitude values, for example.
The disk file contents for this example are shown above. This file contains more
information than will be used in this example. The file is accessed and the records read
from the file and printed on the controller display to observe the actual file contents. The
file pointer is reset and the records are then read and interpreted for their data contents.
The first six records are skipped for this example. The seventh record contains the
stimulus-frequency values and the number of points in the trace. These values are read
from the record. The frequency increment, or point spacing, is calculated and used later in
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...