6-4
Programmer’s Guide
Trace Data Transfers
Querying the Measurement Trace Using BASIC
In the previous BASIC program segment, the array Trace(1:201)
contains 201 real (floating point) numbers. The SCPI command
"FORM:DATA ASCII,5"
specifies ASCII data encoding, with 5
significant digits. The command
"TRACE:DATA? CH1FDATA"
instructs
the analyzer to send the measurement trace. The
ENTER
statement reads
the measurement data sent by the analyzer into the Trace(1:201) array.
It is important to make sure that the Trace array declared in your
program is the same size as the measurement trace on the analyzer, or
an error will occur. The ENTER statement attempts to read data from
the analyzer until it completely fills the Trace array, at which point it
expects to receive an end-of-data terminator from the analyzer. To be
safe, your program should use the
"SENS:SWE:POIN"
SCPI command to
set the number of measurement data points to the desired value.
Refer to the example program ASCDATA in the Example Programs
Guide for a complete example.
Smith Chart and Polar Formats
Each measurement point is represented by a single floating point
number. This is the case for all of the analyzer's measurement formats
except Smith Chart and Polar. When Smith Chart or Polar format is
selected, each point is represented by two numbers, the first one being
the real portion and the second being the imaginary portion of the
complex measurement value.
Below is a modified example program that will work when using Smith
Chart or Polar formats.
10
REAL Trace(1:201,1:2)
20
ASSIGN @Hp8711 TO 716
30
! Take sweep here
40
OUTPUT @Hp8711;"FORM:DATA ASCII,5"
50
OUTPUT @Hp8711;"TRACE:DATA? CH1FDATA"
60
ENTER @Hp8711;Trace(*)
70
DISP Trace(1,1),Trace(1,2),". . . .",Trace(201,1),Trace(201,
2)
Summary of Contents for 8712ES
Page 11: ...1 1 1 Introduction to GPIB Programming ...
Page 27: ...2 1 2 Synchronizing the Analyzer and a Controller ...
Page 36: ...3 1 3 Passing Control ...
Page 39: ...4 1 4 Data Types and Encoding ...
Page 46: ...5 1 5 Using Status Registers ...
Page 71: ...6 1 6 Trace Data Transfers ...
Page 98: ...6 28 Programmer sGuide Trace Data Transfers Internal Measurement Arrays ...
Page 99: ...7 1 7 Using Graphics ...
Page 105: ...8 1 8 Front Panel Keycodes ...
Page 111: ...9 1 9 Introduction to SCPI ...
Page 129: ...10 1 10 Menu Map with SCPI Commands ...
Page 268: ...12 1 12 SCPI Conformance Information ...
Page 290: ...13 1 13 SCPI Error Messages ...