7-56
Chapter 7
Programming Examples
Measurement Data Transfer Examples
Measurement Data Transfer Examples
There are two methods that can be used to read trace information from the analyzer:
• selectively, using the trace markers
• completely, using the trace-data array
If only specific information (such as a single point on the trace or the result of a marker
search) is required, the marker output command can be used to read the information. If all
of the trace data is required, see Examples 3B through 3E for examples of the various
formats available.
Trace-Data Formats and Transfers
Refer to
. This table shows the number of bytes required to transfer a
201-point trace in the different formats. As you will see in the first example (FORM 4),
ASCII data is the easiest to transfer, but the most time consuming due to the number of
bytes in the trace. If you are using a PC-based controller, a more suitable format would be
FORM 5. To use any trace data format other than FORM 4 (ASCII data) requires some
care in transferring the data to the computer. Data types must be matched to read the
bytes from the analyzer directly into the variable array. The computer must be told to stop
formatting the incoming data and treat it as a binary-data transfer. All of the binary data
formats also have a four-byte header to deal with. The first two bytes are the ASCII
characters
“#A”
that indicate that a fixed length block transfer follows, and the next two
bytes form an integer containing the number of bytes in the block to follow. The header
must be read in to separate it from the rest of the block data that is to be mapped into an
array.
“Array-Data Formats” on page 4-6
discusses the different types of formats and their
compositions.
Data may also be transferred from several different locations in the trace-processing chain.
These examples will illustrate formatted-data transfers, but other locations in the
trace-data processing chains may be accessed. See
In this section, an example of each of the data formats will be shown for comparison. In
general, FORM 1 (internal binary format) should be used for traces that are not being
utilized for data content. Calibration data that is being transferred to a file and back is
good example. See
“Example 3D: Data Transfer Using Frequency-Array Information” on
Arrays which will be interpreted or processed within your program should be in FORM 2, 3
or 5, whichever is appropriate for your computer. Example 3C shows how to transfer a
trace in these formats.
In Examples 3B and 3C, the frequency counterpart of each data point in the array is also
determined. Many applications generate a frequency and magnitude, or a phase array for
the test results. Such data may be required for other data processing applications (such as
comparing data from other measurements).
In Example 3B, the frequency data is constructed from the frequency span information.
Alternatively, it is possible to read the frequencies directly out of the instrument with the
OUTPLIML
command.
OUTPLIML
reports the limit-test results by transmitting the stimulus
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 ...