MDO3000 Programmer Manual.pdf - 第131页
Command Groups Scaling W aveform Data Once you transf er waveform data from an oscilloscope to a computer , you can convert the data points (which are digitizing levels) into engineering un its such as V olts or Amps for…

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

Command Groups
Scaling Waveform Data
Once you transf
er waveform data from an oscilloscope to a computer, you can
convert the data points (which are digitizing levels) into engineering units such as
Volts or Amps for analysis using information from the waveform preamble.
The following is an example for converting transferred data into the appropriate
engineering units. The transfer data is from an analog waveform in YT (single
point) format. (See WFMInpre:PT_Fmt for the definition of the point
formats.)
The data points returned from the
CURVE? query for analog channel data are in
digitizing levels. The YMULT value is in vertical units (e.g. volts) per digitizing
level.
Formula for computing horizontal (time) point value:
X
i
= XZEro + XINcr * (i - 1)
Formula for computing vertical (amplitude) point value:
Y
i
= YZEro + (YMUlt * DataPoint
i
)
where:
i is the index of a curve data point (1–based: first data point is point number 1)
X
i
is the ith horizontal value in XUNits
Y
i
is the ith vertical value in YUNits
DataPoint
i
is the waveform data point value, in digitizing levels.
Commands used:
:DATa:SOUrce CH1
:DATa:START 1
:DATa:STOP 1000
:WFMOutpre:NR_pt? 1000
:WFMOutpre:XUNit? “s”
:WFMOutpre:XZEro? -500.000E-3
:WFMOutpre:XINcr? 1.0000E-3
:WFMOutpre:YUNit? “V”
:WFMOutpre:YZEro? 0.0E+0
:WFMOutpre:YMUlt? 4.0000E-3
:WFMOutpre:BYT_nr? 1
Horizontal (time) values:
X
i
=XZEro+XINcr*(i-1)
=-500ms+1ms*(i–1)
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-101

Command Groups
X
1
= -500ms + 1ms
*(1-1)
= -500ms
X
2
= -500ms + 1ms * (2 - 1)
= -499ms
.. .
X
1000
= -500ms + 1ms * (1000 - 1) = 499ms
Vertical (amplitude) values:
Y
i
=YZEro+(YMUlt*DataPoint
i
)
= 0.0V + (0.004 * DataPoint
i
)
YZERO is in vertical units; in this example, 0.0 Volts.
YMULT is in vertical units per digitizing level (DL), in this example,
0.004 Volts per digitizing level.
From
CURVe query:
DataPoint
1
=-10
DataPoint
2
=-11
DataPoint
1000
=23
Y
1
= 0.0V + (0.004V/DL * -10DL) = –0.040V
Y
2
= 0.0V + (0.004V/DL * -11DL) = –0.044V
Y
1000
= 0.0V + (0.004V/DL * 23DL) = 0.092V
Further Explanation of the
Digital Collection
When the waveform source is set to DIGital using the DATa:SOUrce command, a
WFMOutpre? and CURVe? query (or a WAVFRM? query) will return the Digital
Collection data. The format and content of this data will depend upon the width
that has been specified using the
DATa:WIDth command, which can be either
4 or 8 bytes per point.
NOTE. Applies to MSO/MDO4000/B models only as well as MDO3000 and
MDO4000C models with option MDO3MSO or MDO4MSO installed.
4 Byte Data. When the data width is set to 4 bytes (using either DATa:WIDth or
WFMOutpre:BYT_Nr, the Digital Collection represents
the states of digital channe
ls D0 – D15,
the digital representations of analog Channels 1 – 4, and
the trigger state.
2-102 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual