MDO3000 Programmer Manual.pdf - 第1086页

Appendix D: W aveform T ransfer (WFMOutpre and CUR V e Query) Examples WFMOutpre? Query results Explanation BYT_NR 1 This value speci fi es the number of bytes per data point in the waveform data. T o change this value au…

100%1 / 1158
Appendix D: Waveform Transfer (WFMOutpre and CURVe
Query) Examples
Here are several examples of command sequences using the WFMOut pre? and
CURVe? queries to transfer data from the oscilloscope to a PC, with different data
sources, including Analog, Digital, Digital Collection, and RF frequencydomain
waveforms. Each command sequence example is followed by an explanation of
the return
ed
WFMOutpre? results. The WFMOutpre? values act as settings that
apply to the
CURVe query data being transferred.
NOTE. In order to guarantee that the waveform data returned from
CURVE?
queries of multiple waveforms are correlated to the same acquisition, you
should use single sequence acquisition mode to acquire the waveform data
from a single acquisition. Single sequence acquisition mode is enabled using
ACQuire
:STOPAfter
SEQuence
.
Example 1: Analog Waveform (Channels 1–4)
Goal: Transfer 10,000 points of analog channel waveform data from the
oscilloscope to a PC.
Command Comment
:DATa:SOUrce CH1
:DATa:START 1
:DATa:STOP 10000
:WFMOutpre:ENCdg BI NARY
:W
FMOutpre:BYT_Nr 1
:HEADer 1
:WFMOutpre?
Returns the following values. Each v alue represents the current settings that
a
CURVe? query will use to format the data that will be transferred from the
oscilloscope to a PC or other devic e (see next table for explanations):
:WFMOUTPRE:BYT_NR 1;BIT_NR 8;ENCDG BINARY;BN_FMT
RI;BYT_OR MSB;WFID "Ch1, DC coupling, 100 .0mV/div,
4.000us/div, 10000 points, Sample mode";NR_PT
10000;PT_FMT Y;PT_ ORDER LINEA R;XUNIT "s"; XINCR
4.0000E-9;XZERO -2 0.0000E-6;PT_OFF 0;YUNI T "V";YMULT
4.0000E-3;YOFF 0.0 E+0;YZERO 0 .0E+0
:CURVE?
Returns 10,000 data points:
:CURVe #510000<10,000 binary bytes of waveform data.>
NOTE. You can also use the
WAVFrm?
query, which concatenates the
WFMOutpre?
and
CURVe?
queries.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual D-1
Appendix D: Waveform Transfer (WFMOutpre and CURVe Query) Examples
WFMOutpre? Query results
Explanation
BYT_NR 1
This value species the number of bytes per data point in the waveform data. To change
this value automatically, use the WFMOutpre:BYT_Nr command. Note that changing this
value automat
ically changes the
BIT_NR value accordingly. (Thisvaluecanalsobeset
using the DATa:WIDth command.)
BIT_NR 8
This value species the number of bits per data point in the waveform data. To change this
value, use the WFMOutpre:BIT_Nr command. Note that changing this value automatically
changes the
BYT_NR value accordingly.
ENCDG BINARY
This value s
pecies the encoding of the waveform data. To change this value (the other
possibility is ASCii), use the WFMOutpre:ENCdg command. (This value can also be set using
the DATa:ENCdg command, which provides the ability to set the
WFMOutpre:ENCdg,
WFMOutpre
:BN_Fmt,
: and WFMOutpre:BYT_Or values using a s ingle c ommand.)
BN_FMT RI
This valu
especies the binary format, which in this case is RI (signed integer). To change
this value (the other possibility is RP or positive integer), use the WFMOutpre:BN_Fmt
command. Note: this eld is not applicable for ASCii encoding.
BYT_OR MSB
This value spec ies the byte order for the BINARY encoding, which in this case is M SB
(most si
gnicant byte rst). To change this value to LSB, use the WFMOutpre:BYT_Or
command. Note: this eld is not applicable for ASCii encoding.
WFID "Ch1, DC
coupling, 100.0mV/div,
4.000us/div, 10000
points, Sample mode"
This quoted string represents information about the source waveform that would be returned
by a.
WFMOutpre:WFId? query.
NR_PT 10000
This value indicates the number of data points in the waveform record to be transferred
using the CURVE? query. (If you would like to determine only this value, use the
WFMOutpre:NR_Pt? query.) N ote: this value i s typically equal to the full record length,
but you also have the option to transfer only a portion of the record length by using the
DATa :STARt and DATa:STOP commands.
PT_FMT Y
This value i ndicates the format of the data points in the waveform record. In this case,
the value represents YT format. This is query only the returned values can be Y for YT
format or ENV for envelope format (min/max pairs). (If you would like to determine only this
value, use the WFMOutpre:PT_Fmt? query.)
PT_ORDER LINEAR
This value is always LINear.
XUNIT “s”
This value indicates the units of the x-axis of the waveform record. This is determined by the
horizontal settings for the waveform source. Typically, this value is “s”, representing seconds.
When using the math waveform as a source, the value can be “s” or “Hz”. This is query only.
(If you would like to determine only this value, use the WFMO utpre:XUNit? query.)
XINCR 4.0000E-9
This value indicates the time, in seconds, or frequency, in hertz, between data points in the
waveform record. This is query only. (If you would like to determine only this value, use
the WFMOutpre:XINcr? query.)
XZER0 -20.0000E-6
This value indicates the time, in seconds, or frequency, in hertz, of the rst data point in the
waveform record. This time or frequency is relative to the time of the trigger, which is always
0. So, this XZEro time or frequency can be negative. This is query only. (If you would like to
determine only this value, use the WFMOutpre:XZEro? query.)
PT_OFF 0
This is a query provided only for compatibility w ith performance oscilloscopes. The
returned value is always 0. (If you would like to determine only this value, use the
WFMOutpre:PT_Off? query.)
D-2 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual
Appendix D: Waveform Transfer (WFMOutpre and CURVe Query) Examples
WFMOutpre? Query results
Explanation
YUNIT “V”
This value indicates the vertical units of data points in the waveform record. This can be
any of several string values, depending upon the vertical units of the source waveform
in this case, v
olts. This is query only. (If y ou would like to determine only this value, use
the WFMOutpre:YUNit? query.)
YMULT 4.0000
E-3
This value indicates the multiplying factor to convert the data point values from digitizing
levels to the units s pecied by the
WFMOUTpre:YUNit command. This is query only. (If
youwouldli
ke to determine only this value, use the WFMOutpre:YMUlt? query.)
YOFF 0.0E+0
This value i
ndicates the vertical position of the source waveform in digitizing levels. There
are 25 digitizing l evels per vertical division. This is query only. (If you would like to determine
only this v alue, use the WFMOutpre:YOFf? query.)
YZERO 0.0E+0
This value indicates the vertical offset of the source waveform in units specied by the
WFMOUTpr
e:YUNit
command. This is query only. (If you would like to determine only this
value, use the WFMOutpre:YZEro? query.)
Example
2: Digital Waveform (Channels DO-D15)
Goal: Transfer 25 points of digital channel waveform data from the oscilloscope
to a PC.
Command Comment
:DATa:SOUrce D5
:DATa:START 1
:DATa:STOP 25
:WFMOutpre:ENCdg AS Cii
:WFMOutpre:BYT_Nr 1
:HE
ADer 1
:VERBose 1
:WFMOutpre?
Returns the following values. Each v alue represents the current settings that
a
C
URVe?
query will use to format the data that will be transferred from the
oscilloscope to a PC or other devic e (see next table for explanations):
:WFMOUTPRE:BYT_NR 1;BIT_NR 8;ENCDG ASCII;BN_FMT
R
I;BYT_OR MSB;WFID "D5, u nknown coup ling,
100.0us/div, 10000 points, Digital mode";NR_PT 25;PT_FMT
Y;PT_ORDER LINEAR;XUNIT "s";XINCR 100.0000E-9;XZERO
-
500.0000E-6;PT_OFF 0 ;YUNIT "Sta te";YMULT 1 .0000;YOFF
0.0E+0;YZERO 0.0E+0
:CURVe?
Returns the following values. Each value represents a data point:
:CURVe 0,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0
NOTE. You can also use the
WAVFrm?
query, which concatenates the
WFMOutpre?
and
CURVe?
queries.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual D-3