Programmer’s Guide
6-11
Trace Data Transfers
Taking Sweeps
Taking Sweeps
When making measurements and querying traces, your program should
perform the following steps:
1. Place the analyzer's sweep in hold.
2. Initiate a single sweep.
3. Wait for the sweep to complete.
4. Query the measurement trace.
Use the following program lines to perform these steps:
10 OUTPUT @Hp8711;"ABORT;:INIT1:CONT OFF"
20 OUTPUT @Hp8711;"INIT1"
30 OUTPUT @Hp8711;"*OPC?"
35 ENTER @Hp8711;Opc
40 OUTPUT @Hp8711;"TRACE:DATA? CH1FDATA"
45 ENTER @Hp8711;Fmt(*)
If you query the measurement trace while the analyzer is in continuous
sweep, the query will still work, but the data may not be correct. Using
INIT
and
*OPC?
ensures that a complete sweep has finished before you
query the measurement data. In many cases, you can also use the
command "
*WAI
" in place of the "
*OPC?
" query, replacing lines 30 and 35
above with:
30 OUTPUT @Hp8711;"*WAI"
However, there are cases where
"*WAI"
will produce incorrect results.
One case is when using IBASIC's high-speed subprograms to query the
trace data.
"*WAI"
only ensures that the SCPI commands following the
"*WAI"
are not executed until the commands before the
"*WAI"
are
complete. Since IBASIC subprograms don't use SCPI commands to
access the trace data,
"*WAI"
is ineffective, and
"*OPC?"
should be
used.
When using
"*OPC?"
, the
ENTER
statement following the
"*OPC?"
will
wait until the previous SCPI commands are complete, preventing your
program from executing beyond the
ENTER
statement. When using
"*WAI"
, your program can continue to run and send SCPI commands,
and the analyzer will buffer them and act upon them in order.
Chapter 2, “Synchronizing the Analyzer and a Controller,”
provides
additional details.
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 ...