RIGOL is a registered trademark of RIGOL TECHNOLOGIES, INC.
Publication Number
PGA23101-1110
Software Version
00.03.05.SP3
Software upgrad e might change o r add pro duct f eatu res . Pl ease ac qu ire th e l atest v ers ion of th e manu al
from RIGOL website or contact RIGOL to upgrade the software.
Notices
RIGOL products are covered by P.R.C. and foreign patents, issued and pending.
RIGOL r eserves the right to m odify or chan ge parts of or all the specifications and pricing policies at
the company’s sole decision.
Information in this publication replaces all previously released materials.
Information in this publication is subject to change without notice.
RIGOL shall not be liable for either incidental or cons equential losses in connection with the
furnishing, use, or performance of this manual, as well as any information contained.
Any part of this document is forbidden to be copied, photocopied, or rearranged without prior written
approval of RIGOL.
Product Certification
RIGOL guarantees this product conforms to the national and industrial standards in China as well as the
ISO9001:2008 standard and the ISO14001:2004 standard. Other international standard conformance
certifications are in progress.
Contact Us
If you have any pro blem or requirement when using our products or this manual, please contact RIGOL.
E-mail: [email protected]
Website: www.rigol.com
DS2000E Programming Guide I
Page 4
RIGOL
Document Overview
This manual provides guidance on how to use the SCPI commands in programming to realize remote
control of RIGOL DS2000E series digital oscilloscope through the remote interface. DS2000E can
communicate with a PC through the USB, LAN, or GPIB (wit h the USB-GPIB interface converter provided
by RIGOL) interface.
Main Topics in this Manual:
SCPI Overview
Command System
Programming Demos
Content Conventions in this Manual :
The DS2000E series includes the following models. Unless otherwise noted, this manual takes DS2202E as
an example to illustrate the functions and usage of the command system of the DS2000E series.
Model Analog Bandwidth Number of Channels
DS2102E 100 MHz 2
DS2202E 200 MHz 2
II DS2000E Programming Guide
Page 5
Contents RIGOL
III
Contents
Guaranty and Declaration ......................................................................................................... I
Document Overview ................................................................................................................. II
Visual C++ 6.0 Programming Demo ......................................................................................... 3-15
DS2000E Programming Guide
Page 12
Page 13
1 SCPI Overview RIGOL
1 SCPI Overview
SCPI (Standard Comm ands for Programmable Instruments) is a standardized instrument programming
language that is built upon the standard IEEE 488.1 and IEEE 488.2 and conforms to various standards
(such as the float ing point operation rule in IEEE 754 standard, ISO 646 7-bit coded character for
information interchange (equivalent to ASCII programming)). The SCPI commands provide a hierarchical
tree structure and consist of multiple subsystems. Each command subsystem consists of a root keyword
and one or more sub-keywords.
The topics of this chapter:
Syntax
Symbol Description
Parameter Type
Command Abbreviation
Syntax
The command string usually starts with ":"; the keywords are separated by ":" and are followed by the
parameter settings available; "?" is added at the end of the command string to indicate query or execute
the corresponding function and then make query (for example, *TST?); the command keywords and the
first parameter are separated by a space.
For example,
:CALCulate:ADVanced:EXPRession <expression>
:CALCulate:ADVanced:EXPRession?
CALCulate is the root keyword of the command. ADVanced and EXPRession are the second-level and
third-level keywords respectively. The command string starts with ":" which is also used to separate the
multiple-level keywords. <expression> represents the parameters available for setting. "?" represents
query. The command keywords :CALCulate:ADVanced:EXPRession and parameter <expression> are
separated by a space.
"," is generally used for separating multiple parameters contained in the same command, for example,
:SYSTem:DATE <yea r>,<month >, <da y >
DS2000E Programming Guide 1-1
Page 14
RIGOL1 SCPI Overview
Symbol Description
The following symbols will not be sent with the commands.
1.Braces {}
The parameters enclo sed in the b races are optio nal and are u sually separ ated by th e v ertical bar "|".
When you use the command, one of the parameters must be selected.
2.Vertical Bar |
The vertical bar is used to separate multiple parameters and one of the parameter s must be selected
when you use the command.
3.Square Brackets []
The content in the square brackets can be omitted.
4.Triangle Brackets <>
The parameter enclosed in the triangle brackets must be replaced by an effective value.
Parameter Type
1. Bool
The parameter could be ON, OFF, 1 or 0. For example,
:MEASure:ADISplay <bool >
:MEASure:ADISplay?
Wherein, <bool> can be set to {{1|ON}|{0|OFF}}.
The query returns 1 or 0.
2.Discrete
The parameter could be any of the values listed. For example,
:ACQuire:TYPE <type>
:ACQuire:TYPE?
Wherein, <type> can be set to NORMal|AVERages|PEAK|HRESolution.
The query returns the abbreviations (NORM, AVER, PEAK or HRES).
3.Integer
Unless otherwise noted, the parameter can be any integer within the effective value range. Note that
do not set the parameter to a decimal, otherwise errors will occur.
For example,
:DISPlay:GBRightne ss <br i ghtne ss >
:DISPlay:GBRightness?
Wherein, <brightness> can be set to any integer between 0 and 100.
The query returns a n integer between 0 and 100.
1-2 DS2000E Programming Guide
Page 15
1 SCPI Overview RIGOL
1-3
4.Real
The parameter can be any real number within the effective value range and this command accepts
decimal and scientific notation parameter input. For example,
:FUNCtion:WREPlay:INTerval <interval>
:FUNCtion:WREPlay:INTerval?
Wherein, <interval> can be set to any real number between 0.0000001 (or 1e-07, namely 100ns) to
10 (or 1e+01, namely 10s).
The query returns a real number in scientific notation.
5.ASCII String
The parameter should be the combinations of ASCII characters. For example,
:CALCulate:ADVanced:EXPRession <expression>
:CALCulate:ADVanced:EXPRession?
Wherein, <expression> can be set to CH1+CH2
The query returns a n ASCII string.
Command Abbreviation
All the commands are case-insensitive and you can use any of them. If abbreviation is used, all the capital
English letters and numbers in the command must be written completely. For example,
:CALCulate:ADVanced:VARiable1?
can be abbreviated to
:CALC:ADV:VAR1?
DS2000E Programming Guide
Page 16
Page 17
2 Command System RIGOL
2 Command System
This chapter introduces the command subsystems of DS2000E command set.
1. Unless otherwise noted, the descriptions and parameter ranges in this manual are based on
DS2202E.
2. For parameter set ting c ommands (such as time, frequenc y and amplitud e), the oscilloscope can only
accept numbers and set the parameters using the default unit s; it cannot recognize the units sent
with the parameters. For the default unit of each parameter, please refer to the description in each
command in the following introductions.
DS2000E Programming Guide 2-1
Page 18
RIGOL 2 Command System
:AUToscale
Syntax
:AUToscale
Description
Enable the waveform auto setting function. The oscilloscope adjusts the vertical scale, horizontal time
base and trigger mode according to the input signal automatically to realize optimum waveform display.
The function of this command is the same with that of AUTO on the front panel.
Explanation
This command is invalid when the AUTO function is disabled. For the details, please refer
to
:SYSTem:AUToscale.
When the current status of the pass/fail function is "Enable Test", this command is not available. For
the details, please refer to
:MASK:ENABle.
:CLEar
Syntax
:CLEar
Description
Clear all the waveforms on the screen. New waveforms will still be displayed if the oscilloscope is in RUN
state. The function of this command is the same with that of CLEAR on the front panel.
:RUN
:STOP
Syntax
:RUN
:STOP
Description
The :RUN c ommand starts the oscilloscope and the :STOP command stops the oscilloscope. The functions
of these commands are the same with those of RUN/STOP on the front panel.
Explanation
These commands are invalid when waveform recording or waveform playback is turned on.
2-2 DS2000E Programming Guide
Page 19
2 Command System RIGOL
2-3
:SINGle
Syntax
:SINGle
Description
Set the oscilloscope to single trigger mode.
Explanation
In single trigger mode, the oscilloscope triggers once the trigger conditions are met and then stops.
In single trigger mode, using the
You can use the
state respectively.
:RUN and :STOP command to set the oscilloscope to Auto trigger mode and STOP
:TFORce command can generate a trigger signal forcefully.
:TFORce
Syntax
:TFORce
Description
Generate a trigger signal forcefully. The function of this command is the same with that of FORCE in the
trigger control area on the front panel.
:TLHAlf
Syntax
:TLHAlf
Description
Set the trigger level to the vertical midpoint of the trigger signal amplitude.
DS2000E Programming Guide
Page 20
RIGOL 2 Command System
IEEE 488.2 Common Commands
The IEEE 488 .2 standard defines some common commands used for querying the basic i nformation of the
instrument or executing basic operations. These commands usually start with "*" and the keyword of the
command is usually 3-character long.
The query returns an integer between 0 and 255 which equals the sum of the binary weights (expressed
in decimal) of all the bits that have already been set in the register.
For example, the query returns 144 if bit 4 (16 in decimal) and bit 7 (128 in decimal) are enabled.
Return Format
The query returns an integer between 0 and 255 which equals the sum of the binary weights (expressed
in decimal) of all the bits that have already been set in the register. For example, the query retu rns 144 if
bit 4 (16 in decimal) and bit 7 (128 in decimal) are enabled.
*IDN?
Syntax
*IDN?
Description
Query the current device information.
Return Format
The query returns R IGOL TECHNOLO GI ES ,<model>,<serial number>,<software version>.
Wherein,
<model> is the model number of the instrument. <serial numb er> is th e serial number of the instrument.
<software version> is the softw are version of the instrument.
2-6 DS2000E Programming Guide
Page 23
2 Command System RIGOL
2-7
*OPC
Syntax
*OPC
*OPC?
Description
Set the Operation Complete bit (bit 0) in the standard event status register to 1 after the current
operation is finished.
Query whether the current operation is finished.
Return Format
The query returns 1 if the current operation is finished ; otherwise, returns 0.
*RST
Syntax
*RST
Description
Restore the instrument to the factory setting.
DS2000E Programming Guide
Page 24
RIGOL 2 Command System
*SRE
Syntax
*SRE <mask>
*SRE?
Description
Set or query the enable register for the state byte register set.
Parameter
Name Type Range Default
<mask> Integer 0 to 255 0
Explanation<mask> is the sum of the binary weights (expressed in decimal) of all the bits between bit 0 and bit
7 that have already been set. If the bit has already been set, the corresponding binary bit is 1;
otherwise, it is 0.
Definit ions of the bits of SRE register:
BitWeightsNameEnable
7 128 OPER Operation Status Reg
6 64 -- Not used
5 32 ESB Event Status Bit
4 16 MAV Message Available
3 8 -- Not used
2 4 MSG Message
1 2 USR User
0 1 TRG Trigger
Return Format
The query returns an integer between 0 and 255 which equals the sum of the binary weights (expressed
in decimal) of all the bits that have already been set in the register. For example, the query returns 144 if
bit 4 (16 in decimal) and bit 7 (128 in decimal) are enabled.
Example
*SRE 16 /*Bit 4 is enabled*/
*SRE? /*The query returns 16*/
2-8 DS2000E Programming Guide
Page 25
2 Command System RIGOL
2-9
*STB?
Syntax
*STB?
Description
Query the condition register for the state byte register set.
Explanation
Definit ions of the bits of SRE register:
BitWeightsNameEnable
7 128 OPER Operation Status Reg
6 64 -- Not used
5 32 ESB Event Status Bit
4 16 MAV Message Available
3 8 -- Not used
2 4 MSG Message
1 2 USR User
0 1 TRG Trigger
Return Format
The query returns an integer between 0 and 255 which equals the sum of the binary weights (expressed
in decimal) of all the bits that have already been set in the register. For example, the query retu rns 144 if
bit 4 (16 in decima l) and bit 7 (128 in decimal) are enabled.
Example
*STB? /*The query returns 24 (bit 3 and bit 4 are enabled)*/
DS2000E Programming Guide
Page 26
RIGOL 2 Command System
*TST?
Syntax
*TST?
Description
Perform a self-test and query the result .
Explanation
The self-test result is denoted by a 32-bit binary number. If the corresponding binary bit is 0, the self-test
item passes the test; while 1 indicates a failure. The return value is the decimal integer corresponding to
the binary number.
The self-test item represented by each bit is as shown below. The bit that is not used is always 0.
bit0: system voltage
bit1: analog voltage
bit2: storage system
bit3: digital core
bit4: digital IO
bit9: fan 1
bit10: fan 2
bit12: inlet temperature
bit13: outlet temperature
bit16: real-time clock
Return Format
The query returns a decimal integer.
Example
*TST? /*The query returns 0 (namely the 32 bits of the binary number are all 0*/
Description
Set or query the number of averages in average acquisition mode.
Parameter
Name Type Range Default
<count> Discrete 2n (n is an integer from 1 to 13) 2
Explanation
You can use the
oscilloscope averages the waveforms from multiple samples to reduce the random noise on the input
signal and improve the vertical resolution. Greater number of averages can lower the noise and increase
the vertical resolution; while at the same time, it will slower the response of the displayed waveform to
the waveform changes.
Return Format
The query returns the number of averages in average acquisition mode in integer.
:ACQuire:TYPE command to select the average acquisition mode. In this mode, the
DS2000E Programming Guide
Page 28
RIGOL 2 Command System
:ACQuire:MDEPth
Syntax
:ACQuire:MDEPth <mdep>
:ACQuire:MDEPth?
Description
Set or query the memory depth of the oscilloscope; namely the number of waveform points that can be
stored in a single trigger sample. The default unit is pts (points).
Parameter
Name Type Range Default
<mdep> Discrete Refer to Explanation AUTO
The query returns the memory depth of the oscilloscope in integer.
:ACQuire:SRATe?
Syntax
:ACQuire:SRATe?
Description
Query the current sample rate. The default unit is Sa/s.
Return Format
The query returns the current sample rate in scientific notation. For example, 1.00000e+09; name ly
1.000GSa/s.
2-12 DS2000E Programming Guide
Page 29
2 Command System RIGOL
2-13
:ACQuire:TYPE
Syntax
:ACQuire:TYPE <type>
:ACQuire:TYPE?
Description
Set or query the acquisition mode of the sample.
Parameter
Name Type Range Default
<type> Discrete {NORMal|AVERages|PEAK|HRESolution} NORMal
ExplanationNORMal: the oscilloscope samples the signal at equal time interval. For most of waveforms, this
mode can ensure the optimum display effect.
AVERages: the oscilloscope averages the waveforms from multiple samples to reduce the random
noise on the input signal and increase the vertical resolution. In this mode, you can use
the
:ACQuire:AVERages command to set the number of averages.
PEAK: the oscilloscope samples the maximum and minimum values of the signal within the sample
interval to acquire the envelop of the signal and na r r ow pulses that might be lost. But in this mode,
the display noise is relatively larger.
HRESolution: the oscilloscope averages the neighbouring points of the sampled waveform. This
mode is usually used when the sample rate of the digital converter is greater than the storage rate of
the sample storage.
Return Format
The query returns NORM, AVER, PEAK, or HRES.
DS2000E Programming Guide
Page 30
RIGOL 2 Command System
:ACQuire:AALias
Syntax
:ACQuire:AALias <bool>
:ACQuire:AALias?
Description
Enable or disable the antialiasing function of the oscill o scope; or query the current state of the
antialiasing function of the oscilloscope.
This command is only available when t he displayof the specified bus is enabled (
Return Format
The query returns 1 or 0.
:BUS<n>:DISPlay).
:BUS<n>:EEXPort
Syntax
:BUS<n>:EEXPort
Description
Export the event table of the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Explanation
The data list can be exported to an external USB storage device in CSV f ormat if an USB storage device is
currently connecte d.
DS2000E Programming Guide
Page 34
RIGOL 2 Command System
:BUS<n>:DATA?
Syntax
:BUS<n>:DATA?
Description
Read the decoding event table data.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Return Format
The query returns the decoding event table data in the following format.
#9000000141RS232
Time,TX,TX ERR,
-6.1352322E-03,*,,
-4.0554402E-03,R,,
-1.9756482E-03,I,,
1.0414385E-04,G,,
2.1839839E-03,O,,
4.2637759E-03,L,,
Wherein, #9000000141 is the TMC data block header following which is the data in the event table. The
figure behind #9 denotes the number of bytes of th e effective data. RS232 deno tes the decoding mode (it
can also be Parallel, I2C, SPI or CAN). The data are se parated by commas and will be displayed in
different lines automatically according to the lines in the decoding table. The data value is related to the
specified format (
Note: You can save the data (except the TMC data block header and the decoding type; for example,
#9000000141RS232) as a *.csv file and view the data in table form.
Explanation
When OFF is selected, no clock channel is set and the oscilloscope samples data once the channel data
jumps. At this point, the edge set by the
Return Format
The query returns CHAN1, CHAN2, or OFF.
This command sets the bus data width and the setting sequence of the bits is LSB. For example, when the
parameter is set to CHAN2,CHAN1, the bus data width is set to 2, bit 0 is CHAN2 and bit 1 is CHAN1.
Return Format
The query returns the channel source of each bit in the current data channel. The number of the channel
sources is determined by the current data width and multiple channels are separated by commas.
Example
:BUS1:PARallel:BSET CHAN nel1,CHANnel2
/*Set the data width to 2 and the channel sources of the bits are CH1 and
Description
Set or query the vertical offset of parallel decoding on the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Normal
<val> Integer
Statistic
Half screen
[1]
Note
the
Note
command).
Note
commands).
: The screen display is normal and the statistic function is not enabled (refer to
:MEASure:STATistic:DISPlay command).
[2]
: The screen display is normal and the statistic function is enabled (refer to the :MEASure:STATistic:DISPlay
[3]
: The screen is divided into two windows (refer to the :TIMebase:DELay:ENABle and :CALCulate:FFT:SPLit
Explanation
Before using this command, enable the bus display (refer to the
When the data line is located in the middle of the screen, <val> is 0; when it is located above the
middle of the screen, <val> is positive; when it is located below the middle of the screen, <val> is
negative.
Return Format
The query returns t he ve rt i ca l offset of parallel decoding on the specified bus in integer.
The RS232 standard uses negative logic; namely high level is 0 and low level is 1. Therefore, when <pol>
is set to NEGative, the polarity is set to negative logic (namely "Normal" polarity); when <pol> is set to
POSitive, the polarity is set to positive polarity (namely "Invert" polarity).
Return Format
The query returns POS or NEG.
2-24 DS2000E Programming Guide
Page 41
2 Command System RIGOL
2-25
:BUS<n>:RS232:ENDian
Syntax
:BUS<n>:RS232 :EN Di an < endian>
:BUS<n>:RS232:ENDian?
Description
Set or query the endian of data transmission of RS232 decoding on the specified bus.
<n> Discrete {1|2} -<rthre> Real (-5 x VerticalScale - OFFSet) to (+5 x VerticalScale - OFFSet) 0
Note: For the VerticalScale, refer to the :CHANnel<n>:SCALe command. For the OFFSet, refer to
the
:CHANnel<n>:OFFSet command.
Explanation
This command is only available when the RX channel source is CH1 or CH2.
Return Format
The query returns the RX channel threshold of R232 decoding on the specified bus in scientific notation.
the RX channel threshold of R232 decoding on the specified bus.
DS2000E Programming Guide
Page 46
RIGOL 2 Command System
[1]
:BUS<n>:RS232:OFFSet
Syntax
:BUS<n>:RS232 :OF FSe t <va l>
:BUS<n>:RS232:OFFSet?
Description
Set or query the vertical offset of RS232 decoding on the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Normal
<val> Integer
Statistic
Half screen
[1]
Note
the
Note
command).
Note
commands).
: The screen display is normal and the statistic function is not enabled (refer to
:MEASure:STATistic:DISPlay command).
[2]
: The screen display is normal and the statistic function is enabled (refer to the :MEASure:STATistic:DISPlay
[3]
: The screen is divided into two windows (refer to the :TIMebase:DELay:ENABle and :CALCulate:FFT:SPLit
Explanation
Before using this command, enable the bus display (refer to the
When the data line is located in the m iddle of the screen, <val> is 0; when it is located above the
middle of the screen, <val> is positive; when it is locate d below the m iddle o f t he screen, <val> is
negative.
Return Format
The query returns the vertical offset of RS232 decoding on the specified bus in integer.
Description
Set or query the data channel threshold of I2C decoding on the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} -<thre> Real (-5 x VerticalScale - OFFSet) to (+5 x VerticalScale - OFFSet) 0
Note: For the VerticalScale, refer to the :CHANnel<n>:SCALe command. For the OFFSet, refer to
the
:CHANnel<n>:OFFSet command.
Return Format
The query returns the data channel thres hold of I2C decoding on the specified bus in scientific notation.
2-32 DS2000E Programming Guide
Page 49
2 Command System RIGOL
2-33
[1]
:BUS<n>:IIC:OFFSet
Syntax
:BUS<n>:IIC:OFF Set <val>
:BUS<n>:IIC:OFFSet?
Description
Set or query the vertical offset of I2C decoding on the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Normal
<val> Integer
Statistic
Half screen
[1]
Note
the
Note
command).
Note
commands).
: The screen display is normal and the statistic function is not enabled (refer to
:MEASure:STATistic:DISPlay command).
[2]
: The screen display is normal and the statistic function is enabled (refer to the :MEASure:STATistic:DISPlay
[3]
: The screen is divided into two windows (refer to the :TIMebase:DELay:ENABle and :CALCulate:FFT:SPLit
Explanation
Before using this command, enable the bus display (refer to the
When the data line is located in the middle of the screen, <val> is 0; when it is l ocated above the
middle of the screen, <val> is positive; when it is located be low the middle of the screen, <val> is
negative.
Return Format
The query returns the vertical offset of I2C decoding on the specified bus in integer.
Description
Set or query the vertical offset of SPI decoding on the specified bus.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Normal
<val> Integer
Statistic
Half screen
[1]
Note
the
Note
command).
Note
commands).
: The screen display is normal and the statistic function is not enabled (refer to
:MEASure:STATistic:DISPlay command).
[2]
: The screen display is normal and the statistic function is enabled (refer to the :MEASure:STATistic:DISPlay
[3]
: The screen is divided into two windows (refer to the :TIMebase:DELay:ENABle and :CALCulate:FFT:SPLit
Explanation
Before using this command, enable the bus display (refer to the
When the data line is locat ed in the middle of the screen, <val> is 0; when it is located above the
middle of the screen, <val> is positi ve; when it is loc ate d below the m iddle o f the screen, <val> is
negative.
: -166 to 148
[2]
: -163 to 143
[3]
: -103 to 52
0
:BUS<n>:DISPlay command).
2-38 DS2000E Programming Guide
Page 55
2 Command System RIGOL
2-39
Return Format
The query returns the vertical offset of SPI decoding on the specified bus in integer.
:CALCulate:ADD :SA <so urc e >
:CALCulate:ADD:SA?
:CALCulate:ADD:SB <source>
:CALCulate:ADD:SB?
Description
Set or query the channel source of source A in the addition operation.
Set or query the channel source of source B in the addition operation.
Description
Enable or disable the inverted display of the addition operation result; or query the current status of the
inverted display of the addition operation result.
Description
Set or query the vertical offset of the addition operation result. The unit is related to the amplitude unit of
the signal source channel .
Parameter
Name Type Range Default
<offs> Real (-40 x VScale) to (40 x VScale) 0
Note: For the VScale (the vertical scale of MATH), refer to the :CALCulate:ADD:VSCale command.
Return Format
The query returns the vertical offset of the addition ope r ation result in scientific notation.
Description
Set or query the channel source of source A in the subtraction operation.
Set or query the channel source of source B in the subtraction operation.
Description
Enable or disable the inverted display of the subtraction operation result; or query the current status of
the inverted display of the subtraction operation result.
Description
Set or query the vertical scale of th e subtraction operation result. T he unit is related to the amplitude unit
of the signal source channel.
Parameter
Name Type Range Default
The default range is from 1pV to 200V.
<scale> Real
Note: For the channel vertical scale, refer to the :CHANnel<n>:SCALe command.
Return Format
The query returns the vertical scale of the subtraction operation result in scientific notation.
The actual range is related to the vertical scale o f the signal
source channel.
Description
Set or query the vertical offset of the subtraction operation result. The unit is related to the amplitude unit
of the signal source channel.
Parameter
Name Type Range Default
<offs> Real (-40 x VScale) to (40 x VScale) 0
Note: For the VScale (the vertical scale of MATH), refer to the :CALCulate:SUB:VSCale command.
Return Format
The query returns the vertical offset of the subtraction operation result in scientific notation.
Description
Set or query the channel source of source A in the multiplication operation.
Set or query the channel source of source B in the multiplication operation.
Description
Enable or disable the inverted display of the multiplication operation result; or q uery the current status of
the inverted display of the multiplication operation result.
Description
Set or query the channel source of source A in the division operation.
Set or query the channel source of source B in the division operation.
Description
Enable or disable the inverted display of the division operation result; or query the current sta tus of the
inverted display of the division operation result.
The window function can effectively reduce the spectrum leakage effect.
Different window function is suitable for measuring different waveform; therefore, please select the
desired window function according to the waveform to be measured and its characteristics.
Return Format
The query returns RECT, HANN, HAMM, or BLAC.
Description
Set or query the vertical scale of the FFT operation result. The unit is related to the current vertical scale
type of FFT operation and the amplitude unit of the signal source channel.
Parameter
Name Type Range Default
Related to the current vertical scale type of FFT operation:
<vscale> Real
Note: For the vertical scale type of FFT operation, refer to the :CALCulate:FFT:VSMode command. For the channel
vertical scale, refer to the
<vscale> will be changed only after the MATH channel is re-activated.
Return Format
The query returns the vertical scale of the FFT operation result in scientific notation.
dB: 1 to 100
Vrms: the default range is from 0.01 to 200. The actual range is
20dBV/div
related to the vertical scale of the signal source channel.
:CHANnel<n>:SCALe command. Once you change the channel vertical scale, the range of
DS2000E Programming Guide
Page 76
RIGOL 2 Command System
:CALCulate:FFT:VOFFset
Syntax
:CALCulate:FF T:V O FFse t < off s>
:CALCulate:FFT:VOFFset?
Description
Set or query the vertical offset of the FFT operation result. The unit is related to the current vertical scale
type of FFT operation and the amplitude unit of the signal source channel.
Parameter
Name Type Range Default
<offs> Real (-40 x VScale) to (40 x VScale) 60dBV
Note: For the VScale (the vertical scale of MATH), refer to the :CALCulate:FFT:VSCale command.
Return Format
The query returns the vertical offset of the FFT operation result in scientifc notation.
Description
Set or query the horizontal coefficient of FFT operation. This command indirectly sets the horizontal scale
of FFT operation.
Parameter
Name Type Range Default
<hscale> Discrete {1|2|3|4} 2
Note: You can use the:CALCulate:FFT:HSPan command to set the horizontal scale of FFT operation directly.
Explanation
The FFT horizontal coefficient represents the relationship between the FFT horizontal scale (Hspan)
and the current FFT sample rate of the screen (Sa).
1: Hspan=Sa/20
2: Hspan=Sa/40
3: Hspan=Sa/100
4: Hspan=Sa/200
The current FFT sample rate of the screen=the number of pixels per grid horizontally/the horizontal
timebase. The number of pixels per grid horizontally is related to the on/off status of the
aunti-aliasing function; it is 50 when the anti-aliasing function is disa bled and 100 when the
anti-aliasing function is enabled. For the horizontal timebase, refer to the
command.
Description
Set or query the h orizontal offset of the FFT operation result. The unit is Hz.
Parameter
Name Type Range Default
<offs> Real Refer to Explanation 0
Explanation
The range of <offs> is related to the on/off status of the anti-aliasing function, the current FFT
sample rate of the screen (Sa) and the current FFT horizontal scale (Hspan).
When the anti-aliasing function is disabled: max{-0.5 x Sa, -14 x Hspan} to 0.5 x Sa
When the anti-aliasing function is enabled: max{-0.4 x Sa, -14 x Hspan} to 0.4 x Sa
Note: max{A, B} means using the larger one of A and B.
The current FFT sample rate of the screen=the number of pixels per grid horizontally/the horizontal
timebase. The number of pixels per grid horizontally is related to the on/off status of the FFT
anti-aliasing function; it is 50 when the ainti-aliasing function is disabled and 100 when the
anti-aliasing function is enabled. For the horizontal timebase, refer to the
command.
The FFT horizontal scale is related to the current FFT sample rate of the screen and the FFT
horizontal coefficient. Please refer to the
:CALCulate:FFT:HSPan command.
Return Format
The query returns the horizontal of fs et of the FFT operation result in scientific notation.
:TIMebase[:MAIN]:SCALe
2-62 DS2000E Programming Guide
Page 79
2 Command System RIGOL
2-63
:CALCulate:FFT:HSPan
Syntax
:CALCulate:FF T:H SPa n <span>
:CALCulate:FFT:HSPan?
Description
Set or query the horizontal scale of the FFT operation result. T he unit is Hz/div.
Parameter
Name Type Range Default
<span> Discrete Refer to Explanation 1.25MHz/div
Explanation
The FFT horizontal scale is related to the current FFT sample rate of the sc reen (Sa). It can be Sa/20,
Sa/40, Sa/100, and Sa/200.
The current FFT sample rate of the sc reen = the number of pixels per grid horizontally/the horizontal
timebase. The number of pixels per grid horizontally is related to the on/off status of the FFT
anti-aliasing function; it is 50 when the ainti-aliasing function is disabled and 100 when the
anti-aliasing function is enabled. For the horizontal timebase, refer to the
command.
You can set the horizontal scale of FFT operation indirectly by setting the FFT horizontal coefficient
(:CALCulate:FFT:HSCale
).
Return Format
The query returns the horizontal scale of the FFT operation result in scientific notation.
Description
Enable or disable the inverted display of the logic operation result; or query the current status of the
inverted display of the logic operation result.
Description
Enable or disable the inverted display of the advanced operation result; or query the current status of the
inverted display of the advanced operation result.
Description
Set or query the variable1 in the advanced operation expression.
Set or query the variable2 in the advanced operation expressi on.
Parameter
Name Type Range Default
<numeric_value> Real Refer to Explanation 0
Explanation
The format of <numeric_value> is AeB. The range of A (mantissa) is from -9.9999 to 9.9999 (the
minimum step is 0.0001; namely the number can contain at most 4 decimal places). B (exponent, its
base is 10) is an integer from -9 to 9. For example, 1.2037e5 de notes setting the viariable to
1.2037×10
that in AeB format.
This command sets the value of variable1 or variab le2 which might be used in
the
:CALCulate:ADVanced:EXPRession command.
Return Format
The query returns the value of variable1 or variable2 in the advanced operation expression in scientific
notation.
5
. <numeric_value> can also be expressed in decimal format; its range corresponds to
DS2000E Programming Guide
Page 88
RIGOL 2 Command System
:CALCulate:ADVanced:VSCale
Syntax
:CALCulate:ADVanced:VSCa le <numeric_value>
:CALCulate:ADVanced:VSCale?
Description
Set or query the vertical scale of the advanced operation result. The unit is related to the advanced
operation expression.
Parameter
Name Type Range Default
The default range is from 0.02V to 500V.
<numeric_value> Real
The actual range is related to the advanced
2V
operation expression.
Note: For the advanced operation expression, refer to the :CALCulate:ADVanced:EXPRessioncommand. The
expression might include CH1 or CH2; at this point, the actual ra nge of <numeric_value> ia also related to the
channel vertical scale. For the channel vertical scale, refer to the
:CHANnel<n>:SCALe command.
Return Format
The query returns the vertical scale of the advanced operation result in scientific notation.
Description
Query the date of the last calibration.
Return Format
The query returns the date in <year>,<month>,<day> format. Wherein, <day> and <month> are
double-digit figures, and <year> is a four-digit figure. For example, 2013,10,27.
:CALibrate:STARt
Syntax
:CALibrate:STARt
Description
The oscilloscope starts to execute self-calibration.
ExplanationThe self-calibration can make the oscilloscope quickly reach its optimum working state to obtain the
most accurate measurement values.
The functions of most of th e keys are disabled during the self-calibration.
DS2000E Programming Guide
Page 90
RIGOL 2 Command System
:CALibrate:TIME?
Syntax
:CALibrate:TIME?
Description
Query the time of the last calibration.
Return Format
The query returns the time in <hours>,<minutes>,<seconds> format. Wherein, <hours>, <minutes>,
and <seconds> are all double-digit figures. For example, 15,19,25.
:CALibrate:QUIT
Syntax
:CALibrate:QUIT
Description
Exit the self-calibration at any time.
Description
Set or query the coupling mode of the specified analog channel.
Parameter
Name Type Range Default
<n> Discrete {1|2} -<coupling> Discrete {AC|DC|GND} DC
Explanation
AC: the DC components of the signal under test are blocked.
DC: the DC and AC com ponents of the signal under test can both pass the channel.
GND: the DC and A C components of the signal under tes t are both blocked.
Return Format
The query returns AC, DC, or GND.
:CHANnel<n>:DISPlay
Syntax
:CHANnel<n>:DISPlay <bool>
:CHANnel<n>:DISPlay?
Description
Enable or disable the specified analog channel; or q uery the current status of the specified analog
channel.
Description
Enable or disable the inverted display of the speci fied analog channel; or query the current status of the
inverted display of the specified analog channel.
Description
Set or query the vertical offset of the specifie d analog channel. The default unit is V.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
When the input impedance is 50Ω and the
probe ratio is 1X:
500μV/div to 50mV/div: -2V to 2V
51mV/div to 200mV/div: -10V to 10V
205mV/div to 1V/div: -12V to 12V
<offset> Real
When the input imped ance is 1MΩ and the
probe ratio is 1X:
500μV/div to 50mV/div: -2V to 2V
51mV/div to 200mV/div: -10V to 10V
205mV/div to 2V/div: -50V to 50V
2.05V/div to 10V/div: -100V to 100V
Note: The range of the vertical offset is related to the vertical scale, probe ratio, and input impedance currently set.
For the vertical scale, refer to the
the
:CHANnel<n>:PROBe command. For the input impedance, refer to the :CHANnel<n>:IMPedance command.
:CHANnel<n>:SCALe command. For the probe ratio, refer t o
Return Format
The query returns the vertical offset of the specified analog channel i n scientific notation.
CHANnel1: 2V
CHANnel2: -2V
2-78 DS2000E Programming Guide
Page 95
2 Command System RIGOL
2-79
:CHANnel<n>:SCALe
Syntax
:CHANnel<n>:SCALe <scale>
:CHANnel<n>:SCALe?
Description
Set or query the vertical scale of the specified analog channel. The default unit is V/div.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
When the input impeda nce is 50Ω
and the probe ratio is 1X:
<scale> Real
Note: The range of the vertical scale is related to the probe ratio and input impedance currently set. For the setting
of the probe ratio, refer to the
the
:CHANnel<n>:IMPedance command.
Return Format
The query returns the vertical scale of the specified analog channel in scientific notation.
500μV/div to 1V/div
When the input impedance is 1MΩ
and the probe ratio is 1X:
500μV/div to 10V/div
:CHANnel<n>:PROBe command. For the input impedance, refer to
1V/div
DS2000E Programming Guide
Page 96
RIGOL 2 Command System
:CHANnel<n>:PROBe
Syntax
:CHANnel<n>:PROBe <atten>
:CHANnel<n>:PROBe?
Description
Set or query the probe attenuation ratio of the specified analog channel.
Parameter
Name Type Range Default
<n> Discrete {1|2} -<atten> Discrete
Explanation
After setting the probe ratio, multiply the sampled signal by the specified multiple, and then d isplay
the result (the actual amplitude of the signal will not be affected).
Setting the probe ratio affects the range of the vertical scale.
Return Format
The query returns the attenuation ratio currently set.
:CHANnel<n >: UNI Ts <un it s >
:CHANnel<n>:UNITs?
Description
Set or query the amplitude display unit of the specified analog channel.
Parameter
Name Type Range Default
<n> Discrete {1|2} -<units> Discrete {VOLTage|WATT|AMPere|UNKNown} VOLTage
Return Format
The query returns VOLT, WATT, AMP, or UNKN.
2-80 DS2000E Programming Guide
Page 97
2 Command System RIGOL
2-81
:CHANnel<n>:VERNier
Syntax
:CHANnel<n>:VERNier <bool>
:CHANnel<n>:VERNier?
Description
Enable or disable the fine adjustment function of the vertical scale of the specified analog channel; or
query the current status of the fine adjustment function of the vertical scale o f the specified analog
channel.
By default, the fine adjus tment function is disabled. At this point, you can only set t he vertical scale in
1-2-5 step; namely 500uV/div, 1 mV/div, 2mV/div, 5mV/div, 10mV/div…10V/div. When the fine adjustment
function is enabled, you can further adjust the vertical scale within a relatively smaller range to improve
vertical resolution. If the amplitud e of the input waveform is a little bit greater than the full scale under
the current scale, and the amplitude would be a little bit lower if the next sca le is used, fine adjustment
can be used to improve the amplitude of waveform display to view signal details.
Return Format
The query returns 1 or 0.
DS2000E Programming Guide
Page 98
RIGOL 2 Command System
:CHANnel<n>:TCAL
Syntax
:CHANnel<n>:TCAL <time>
:CHANnel<n>:TCAL?
Description
Set or query the delay calib r ation time of the specified analog channel. The default unit is s.
Parameter
Name Type Range Default
<n> Discrete {1|2} -<time> Real -200ns to 200ns 0s
Note: When the horizontal timebase is greater than or equal to 10us, the delay calibration time cannot be adjusted.
Explanation
When you use an oscilloscope for actual measurement, the transmission delay of the probe cable may
bring relatively greater error (zero offset). Z ero offset is defined as the offset of the crossing point of the
waveform and trigger level line relative to the trigger position, as shown in the figure below.
Return Format
The query returns the delay calibration time of the specified analog channel in scientific notation.
2-82 DS2000E Programming Guide
Page 99
2 Command System RIGOL
2-83
:CURSor Commands
:CURSor:MODE
:CURSor:MANual
:CURSor:TRACk
:CURSor:MODE
Syntax
:CURSor:MODE <mode>
:CURSor:MODE?
Description
Set or query the cursor measurement mode.
Parameter
Name Type Range Default
<mode> Discrete {OFF|MANual|TRACk|AUTO|XY} OFF
Explanation
OFF: disable the cursor measurement.
MANual: enable the manual measurement with cursor.
TRACk: enable the track measurement with cursor.
AUTO: enable the auto measurement with cursor.
XY: enable the X-Y curs or measurement. This mode is only valid when the horizontal time base mode
is X-Y (please refer to the
Return Format
The query returns OFF, MAN, TRAC, AUTO, or XY.