MDO3000 Programmer Manual.pdf - 第126页

Command Groups <binary data> i s the binary data which should be exactly N-Digits bytes in length. NOTE. I fy o uw o u l dl i k et os a v eo rr e c a l law a v e f o r mt oo rf r o ma fi le, use the SA V e:W A VEfor…

100%1 / 1158
Command Groups
Table 2-43: Video Picture Commands (cont.)
Command Description
VIDPic:LOCation:OFFSet Sets (or queries) the video picture line-to-line offset. This is the amount of
additional delay time to add between lines of the video picture.
VIDPic:LOCation:STARt:LINE Sets (or queries) the video picture starting l ine number.
VIDPic:LOCation:STARt:PIXel Sets (or queries) the video picture starting pixel in each line
VIDPic:LOCation:WIDth Sets (or queries) the video picture width, in columns.
VIDPic:LOCation:X Sets (or queries) the video picture X origin location, in columns.
VIDPic:LOCation:Y Sets (or queries) the video picture Y origin location, in rows.
VIDPic:SOUrce Sets (or queries) the channel to use for the video picture source waveform.
VIDPic:STANdard Sets (or queries) which video picture standard to use (either NTSC or PAL).
Wa veform Transfer Command Group
(See Table 2-48.)
The
CURVe and other commands and queries in the Waveform Transfer Command
Group are used to transfer waveform data points to and from the oscilloscope.
Thewaveformdatapointsareacollectionofvaluesthatrepresenttheamplitude
of the waveform samples. One data value usually represents one data point inthe
wa
veform record. Only one waveform can be transferred at a time.
Each waveform you transfer has an associated waveform preamble, which
c
ontains information such as data format, horizontal scale, vertical scale, and the
other settings in effect when the waveform was created. When you transfer a
waveform, you need to specify at least some of the general and preamble settings
(using the
DATa, WF MInpre or WFMOutpre commands) before you specify the
raw data point information (using the
CURVe command or query.)
Waveform data can be transferred to or from the oscilloscope using the Ethernet
or USBTMC interfaces in binary or ASCII format. Binary data transfer is
considerably more efficient than ASCII data transfer. Binary data is transferred to
and from the oscilloscope using the IEEE488.2 arbitrary block format (7.7.6 of
the IEEE488.2 spec) which we refer to in this document as “binary block format”.
A binary block is represented as:
#N<N-Digits><binary data>
Where:
The “#” is the arbitrary block token.
N is a single hexadecimal digit specifying how many decimal digits
immediately follow.
<N-Digits> is a decimal number N digits long, that specifies the number of
binary data bytes to follow.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-95
Command Groups
<binary data> i
s the binary data which should be exactly N-Digits bytes in
length.
NOTE. Ifyouwouldliketosaveorrecallawaveformtoorfromale, use the
SAVe:WAVEform and RECAll:WAVEform commands.
Transferring a Waveform
from an Oscilloscope to a
Computer
Use the DATa commands and WFMOutpre commands to specify the attributes of
the waveform being transferred from the oscilloscope. You must, at a minimum,
specify the waveform source (using the
DATa:SOUrce command) and data format
(using the
DATa:ENCdg and DATa:WIDth commands).
Then, use the
WFMOutpre? query, which provides the context needed to interpret
the waveform data points. Finally, use the
CURVE? query to transfer the waveform
data points. (You can also use the
WAVFrm? query, which concatenates the
WFMOutpre? and CURVe? queries. )
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
.
NOTE. The
WFMOutpre:BYT _Nr
and
WFMOutpre:BIT _Nr
settings are
directly related; setting one causes the other to be set accordingly. For
example,
WFMOutpre:BY T_Nr 2
causes
WFMOutpre_B IT_Nr
to be set to
16 (2 * 8 bits/byte). Similarly, setting
WFMOutpre: BIT_Nr
to 16 causes
WFMOutpre: BYT_Nr
to be set to 2.
Following is an example command sequence that illustrates how to transfer
waveform data from the oscilloscope to the computer.
In this case, let’s say you’d like to transfer 10,000 points from channel 1, in ASCii
format with 1 byte per point, to your computer program.
Table 2-44: Example Command Sequence for Transferring Waveform Data from Oscilloscope to Computer
Item Description
:DATa:SOUrce CH1 Sets the source waveform to be transferred to Channel 1.
:DATa:STARt 1 This, along with DATa:STOP, species the portion of the w aveform record that will
be transferred .
:DATa:STOP 10000
:DATa:ENCdg ASCIi Sets the data format to ASCII. (This command replaces WFMOutpre:ENCdg,
WFMOutpre:BN_Fmt
and WFMOutp re:BYT_Or with a single command.)
:DATa:WIDth 1
Sets 1 byte per point (same as
WFMOutpre:BYT_Nr).
2-96 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual
Command Groups
Table 2 -44: Example Command Sequence for Transferring Waveform Data from Oscilloscope to Computer (cont.)
Item Description
:HEADer 1 Turning on HEADer and VERBose will allow you to view the WFMOutpre?
parameters in context.
:VERBose 1
:WFMOutpre? The WFMO utpre? query provides the information needed to interpret the waveform
data point information that will be returned from the
CURVe query.
:HEADer 0
You may want to turn the header off before doing the
CURVe query, because w ith
the header on, a
CURVe query will return the CURVe command header followed by
a space and the ASCII waveform data.
:CURVe? Transfers the data points.
NOTE. Command sequence examples as well as sev eral comprehensive examples
of what the
WFMOutpre?
query might return using different data sources are
includ
ed as an appendix. (See page D-1, Waveform Transfer (WFMOutpre and
CURVe Query) Examples.)
Examp
le 1: Analog Waveform (channel 1 - 4)
Example 2: Digital Waveform (channel DO-D15)
Example 3: The Digital Collection with 4 Bytes Per Point with MagniVu Off
Example 4: The Digital Collection with 8 Bytes Per Point with MagniVu Off
Example 5: The Digital Collection with 4 Bytes Per Point with MagniVu On
Example 6: The Digital Collection with 8 Bytes Per Point with MagniVu On
Ex
ample 7: RF Frequency Domain Waveform
NOTE. Whenyoudoa
WFMOutpre?
query in an interactive session during
p
rogram development, it’s a good idea to rst turn on the header and verbose
features (using the
HEADer
and
VERBose
commands) in order to see the returned
values in context.
Waveform Sources. Valid waveform sources that can be transferred from the
oscilloscope (using the
DATa:SOUrce command) include:
CH1–CH4- Analog channels. When
DATa:SOUrce is set to one of these
sources, the data points represent digitizing levels. There are 25 digitizing levels
per vertical division for 1-byte data, and 6400 digitizing levels per vertical
division for 2-byte data. These data points can be transferred in signed or
unsigned integer formats.
D0 D15 - The digital input channels (MSO/MDO4000/B models only as
well as MDO3000 and MDO4000C series models with options MDO3MSO or
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-97