MDO3000 Programmer Manual.pdf - 第129页
Command Groups sources, the fo rmat is that for the RF frequency domain traces, which is 4-byte floating point data. NOTE. When you change the DATa:SOUrc e setting, all o f the associated settings for the waveform preambl…

Command Groups
MDO4MSO instal
led). When
DATa:SOUrce is set to one of these, the data points
are binary states (0 or 1). These data points can be transferred in widths of 1or2
bytes, as signed or unsigned integers.
DIGital - The Digital Collection. These data points are binary states (0 or 1) that
can be transferred in widths of 4 or 8 bytes, as signed or unsigned integers. For
ASCII encoding, the data is transferred as hexadecimal values with leadingzeroes
suppressed. When
DATa:SOUrce is set to DIGital, this represents a collection
of information that differs dependingonthedatawidth(setusingeitherthe
DATa:WIDt
h
or WFMOutpre:BYT_Nr command.)
When the data width is set to 4 bytes, the Digital Collection is the states of
digital c
hannels D0 – D15, plus the digital representations of analog channels
1 – 4, plus the trigger state.
When the
data width is set to 8 bytes, the Digital Collection is the transition
state information for digital channels D0 – D15, plus the digital representations
of analog channels 1 – 4. For more information, see the section below
“Further Explanation of Digital Collection Data”. (MSO/MDO4000/B models
only as well as MDO3000 and MDO4000C series models with options
MDO3MSO or MDO4MSO installed).
RF_NORMal, RF_AVErage, RF_MAXHold, RF_MINHold -thesearetheRF
frequency domain traces (MDO4000/B/C and MDO3000 models only). When
DATa
:SOUrce
is set to one of these traces, the data points represent the amplitude
of the trace in watts, and are floating point values. The frequency domain trace
data is returned as 4-byte floating point values. (Note that
CURVe? always returns
linear watts, not the display units.)
RF_AMPlitude, RF_FREQuency, RF_PHASe – these are the RF time domain
traces (MDO4000/B/C series models only.) When
DATa:SOUrce is set to one of
these traces, the data points are the Amplitude vs. Time, Frequency vs. Time, or
Phase vs. Time representations of the RF input signal.
The RF time domain traces are returned as 1-byte or 2-byte integers, depending
on the
DATa:WIDth setting. The default is 1 byte per point.
RF_FREQuency – frequency in Hz.
RF_PHASe – phase in degrees.
RF_AMPlitude – amplitude in Volts.
MATH — The format of MATH data is dependent upon the sources for the math
waveform. For analog channel sources, the format is that for the analog channels
described above. For spectrum math, the format is the same as for RF frequency
domain traces, which is 4-byte floating point data.
REF1-REF4 — The format of REF data is dependent upon the sources from
which the reference waveform was created. For analog channel sources, the
format is that for the analog channels described above. For RF frequency domain
2-98 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual

Command Groups
sources, the fo
rmat is that for the RF frequency domain traces, which is 4-byte
floating point data.
NOTE. When you change the
DATa:SOUrc e
setting, all of the associated settings
for the waveform preamble (
WFMOutpre
commands) are automatically adjusted
for the specified source waveform. The specified source waveform must be turned
on.
Data Encoding and Widths. Data transferred from the oscilloscope using the
CURVe query can be sent in either ASCII or binary formats. ASCII data is sent as
a comma-separated list of decimal values. Binary data is sent with the IEEE488.2
binary block header, immediately followed by the binary data.
You can specify the format for waveform transfers from the oscilloscope
using the combination of
WFMOutpre:ENCdg, WFMOutpre:BN_Fmt and
WFMOutpre:BYT_Or commands. Or else you can simply use the DATa:ENCdg
comman
d, which combines all three.
ASCII data is represented by signed integer values for analog and digital
chann
els and by 4-byte floating point values for the RF frequency domain traces
(RF_NORMal, RF_AVErage, RF_MAXHold, RF_MINHold). The range of the
values depends on the data width (specified using the
WFMOutpre:BYT-Nr or
DATa:WIDth command). One byte wide data ranges from -128 to 127. Two byte
wide data ranges from -32768 to 32767. For digital channels D0 through D15, the
values returned are 0 or 1. For the Digital Collection, ASCII data is returned in
hex
adecimal format with any leading zeroes omitted.
Transferring a Waveform
from a Computer to an
Oscilloscope’s Internal
Reference Memory
Waveforms sent from a computer program TO the oscilloscope are always
stored in one of the internal reference memory locations (REF1-4). Use
DA
Ta:DESTination
to specify the reference memory location, as well other
DATa commands to specify record start and stop points. Next, use the WFMInpre
commands to specify the waveform’s data format, scale, domain and other
attributes that will be used to convert raw data points into the scope's internal
waveform points. Then, use
WFMInpre? to verify your settings. Finally, use the
CURVe command to transfer the raw data points.
Following is an example command sequence that illustrates how to transfer
waveform data to the oscilloscope’s internal reference memory.
In this case, let’s say you have created a waveform on your computer and would
like to transfer 10,000 data points of it, in ASCii format with 1 byte per point, to
your oscilloscope’s internal reference memory location REF2.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-99

Command Groups
NOTE. The
WFMIn
pre:BYT_Nr
and
WFMInpre:BI T_Nr
settings are directly
related; setting one causes the other to be set accordingly. For example,
WFMInpre:B YT_Nr 2
causes
WFMInpre_B IT_Nr
tobesetto16(2*8bits/byte).
Similarly, setting
WFMInpre:BIT _Nr
to 16 causes
WFMInpre:B YT_Nr
to be
set to 2.
Table 2-45:
Example Command Sequence for Transferring Waveform Data from Computer to Oscilloscope
Item Descriptio
n
:DATa:DES
Tination REF2
Selects RE
F 2 as the internal reference memory location that the incoming
waveform will be transferred to.
:DATa:STARt 1 This, along with DATa:STOP, specifies the starting and ending points of the
waveform record that will be transferred to REF2.
:DATa:STOP
10000
:WFMInpre:DOMain TIMe Speci fies that the data to be transferred is a time domain w aveform, and
therefo
re should be treated as integers (as opposed to a frequency domain
waveform, which uses floating point).
:WFMIn
pre:BYT_Nr 1
Sets the number of bytes per data point in the waveform data to be sent
to RE F2 to 1.
:WFMInpre:BIT_Nr 8
Sets the number of bits per binary data point to 8.
:WFMInpre:ENCdg ASCII Specifies that the incoming waveform uses the A SCII format.
:WFMInpre:NR_Pt 10000
Sets the number of data points that are being sent to REF2 to 10000.
:WFMInpre:PT_Fmt Y
Specifies that the incoming waveform is a normal one, where one ASCII
or b
inary data point is transmitted for each point in the waveform record
(as opposed to envelope).
:WFMInpre:XUNit "S" Sets the horizontal units of the x-axis of the data points to seconds.
:W
FMInpre:XINcr 4.0000E-9
Sets the horizontal interval between the incoming waveform points, using the
units specified above.
:WFMInpre:XZERo -20.0000E-6
Sets the position value of the first data point in the incoming waveform record.
:WFMInpre:YUNit "V"
Specifies that Volts are the v ertical units of the data points being sent.
:WFMInpre:YMUlt 4.0000E-3
Specifies the vertical scale multiplying factor used to convert the incoming
data points from digitizing levels into the units specified above.
:WFMInpre:YOFf 0.0E+0 Specifies that the vertical position in digitizing levels of the incoming reference
waveform is 0.
:WFMInpre:YZEro 0.0E+0
Specifies that the vertical offset of the incoming waveform is 0.
:HEADer 1 Turning on HEADer and VERBose will allow the WFMInpre? parameters
to be viewed in context.
:VERBose 1
:WFMInpre? Do this query to verify your settings.
:CURVe <10,000 AS CIi data points, each separated
by a comma>
Sends the data points to REF2.
2-100 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual