MDO3000 Programmer Manual.pdf - 第35页

Command Syntax If the header is off: FULL;1 1. Set commands and queries may be concatenated in the same messa ge. For example, ACQuire:MODe SAMple;NUM AVg ?;STATE? is a valid message that sets the acqu isition mode to sa…

100%1 / 1158
Command Syntax
Abbreviating
You can abbrevi
ate many oscilloscope commands. Each command in this
documentation shows the minimum acceptable abbreviations in capitals. For
example, you can enter the command
ACQuire:NUMAvg simply as ACQ:NUMA
or acq:numa.
Abbreviation rules may change over time as new oscilloscope models are
introduced. Thus, for the most robust code, use the full spelling.
If you use the HEADer command to have command headers included as part
of query responses, you can further control whether the returned headers are
abbreviated or are full-length with the
VERBose command.
Concatenating
You can concatenate any combination of set commands and queries using a
semicolon (;). The oscilloscope executes concatenated commands in the order
received.
When concatenating commands and queries, you must follow these rules:
1. Separate completely different headers by a semicolon and by the beginning
colon on all commands except the rst one. For example, the commands
TRIGger:MODe NORMal and ACQuire:N UMAVg 8, can be concatenated
into the following single command:
TRIGger:MODe NORMal;:A CQuire:NUMAVg 8
2. If concatenated commands have headers that differ by only the last mnemonic,
you can abbreviate the second command and eliminate the beginning colon.
For example, you can concatenate the commands
ACQuire:MODe ENVelope
and ACQuir e:NUMAVg 8 into a single command:
ACQuire:MODe ENVelope; NUMAVg 8
The longer version works equally well:
ACQuire:MODe ENVelope; :ACQuire:NUMAVg 8
3. Never precede a star (*) command with a colon:
ACQuire:STATE 1;*OPC
Any commands that follow will be processed as if the star command was
not there so the commands,
ACQuire:MODe ENVel
ope;*OPC;NUMAVg 8
will set the acquisition mode to envelope and set the number of acquisitions
for averaging to 8.
4. When you concatenate queries, the responses to all the queries are
concatenated into a single response message. For example, if the display
graticule is set to Full and the display style is set to dotsonly, the concatenated
query
DISplay:GRAticule?;STYle:DOTsonly? will return the following.
If the header is on:
DISPLAY:GRATICULE FULL;:DISPLAY:STYLE:DOTSONLY 1
2-4 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual
Command Syntax
If the header is
off:
FULL;1
1. Set commands and queries may be concatenated in the same message. For
example,
ACQuire:MODe SAMple;NUM AVg?;STATE?
is a valid message that sets the acquisition mode to sample. The message then
queries the number of acquisitions for averaging and the acquisition state.
Concatenated commands and queries are executed in the order received.
Here are some invalid concatenations:
DISPlay:STYle:DOTsonly OFF;ACQuire:NUMAVg 8 (no colon before
ACQuire)
DISPlay:GRAticule FULL;:STYle:DOTSONLY OFF (extra colon before
STYle.
DISPlay:GRAticule FULL;:*TRG (colon before a star (*) command)
MATH:HORizontal:SCAle 1.0e-1;HORizontal:POSition 5.0el
(levels of the mnemonics are different; either remove the second use of
HORizontal: or place :MATH in front of HORizontal:POSition)
Terminating
This documentation uses <EOM> (End of Message) to represent a message
terminator.
Table 2-4: End of Message Terminator
Sym
bol
Mea
ning
<E
OM>
Message terminator
The end-of-message terminator must be the END message (EOI asserted
concurrently with the last data byte). The last data byte may be an ASCII line
feed (LF) character.
This oscilloscope does not support ASCII LF only message termination. The
oscilloscope always terminates outgoing messages with LF and EOI.
Constructed Mnemonics
Some header mnemonics specify one of a range of mnemonics. For example, a
channel mnemonic can be CH1, CH2, CH3, or CH4. You use these mnemonics
in the command just as you do any other mnemonic. For example, there is a
CH1:POSition command, and there is also a CH2:POSi tion command. In the
command descriptions, this list of choices is abbreviated as CH<x>.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-5
Command Syntax
Cursor Position
Mnemonics
When cursors ar
e displayed, commands may specify which cursor of the pair to
use.
Table 2-5: Channel Mnemonics
Symbol Meaning
CH<x> A channel specier; <x> is 1 through 4.
Table 2-6: Cursor Mnemonics
Symbol Meaning
CURSOR<x>
A cursor selector; <x> is either 1 or 2.
POSITION<x>
A cursor selector; <x> is either 1 or 2.
HPOS<x>
A cursor selector; <x> is either 1 or 2.
Math Spe
cier Mnemonics
Commands can specify the mathematical waveform to use as a mnemonic in
the header.
Table 2-7: Math S pecier Mnemonics
Symbol Meaning
Math<x>
A math waveform specier; <x> is 1.
Measurement Spec ier
Mnemonics
Commands can specify which measurement to set or query as a mnemonic in the
header. Up to eight automated measurements may be displayed.
Table 2-8: Measurement Specier Mnemonics
Symbol Meaning
MEAS<x> A measurement specier; <x> is 1 through 8.
C
hannel Mnemonics
Commands specify the channel to use as a mnemonic in the header.
Reference Waveform
Mnemonics
Commands can specify the reference waveform to use as a mnemonic in the
header.
Table 2-9: Reference Waveform Mnemonics
Symbol Meaning
REF<x>
A reference waveform specier; <x> is 1, 2, 3, or 4 for 4-channel
oscilloscopes and 1 or 2 for 2-channel oscilloscopes.
2-6 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual