Rigol DS1202Z-E Programming Guide

Programming Guide
DS1000Z-E Series
Digital Oscilloscope
Aug. 2019
RIGOL (SUZHOU) TECHNOLOGIES INC.

Guaranty and Declaration

Copyright
© 2019 RIGOL (SUZHOU) TECHNOLOGIES INC. All Rights Reserved.
Trademark Information
RIGOL is a registered trademark of RIGOL (SUZHOU) TECHNOLOGIES INC.
Publication Number
PGA27100-1110
Software Version
00.06.01 Software upgrade might change or add product features. Please acquire the latest version of the manual 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 reserves the right to modify or change parts of or all the specifications and pricing policies at
the co mpany ’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 consequential 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 that this product conforms to the national and industrial standards in China as well as the ISO9001:2015 standard a nd the ISO14001:2015 standard. Other international standard conformance certifications are in progress.
Contact Us
If you have any problem or requirement when using our products or this manual, please contact RIGOL. E-mail: service@rigol.com Website: www.rigol.com
DS1000Z-E Programming Guide I
RIGOL
Tip
For the newest version of this manual, please download it from RIGOL official website (www.rigol.com).
Model
Analog Bandwidth
Number of Analog Channels
DS1202Z-E
200 MHz
2

Document Overview

This manual provides guidance on how to use the SC PI commands in programming to realize remote control of RIGOL DS1000Z-E series digital oscilloscope through the remote interface. DS1000Z-E can communicate with a PC through the USB or the LAN bus.
Main Topics in this Manual:
Chapter 1 Programming Overview
This chapter introduces how to build the remote communication between DS1000Z-E series digital oscilloscope and the PC. It also introduce s the remote control methods as well as the syntax, symbols, parameters and abbreviation rules of the SCPI commands.
Chapter 2 Command System
This chapter introduces the syntax, function, parameter and us ing instruction of each command.
Chapter 3 Programming Demos
This chapter lists some programming demos to illustrate how to use comm ands to realize the common functions of the oscilloscope in the development environments of Excel, Matlab, LabVIEW, Visual Basic 6.0 and Visual C++ 6.0.
Format Conventions in this Manual:
1. Key
The function key on the front panel is denoted by the format of "Key Name (Bold) + Text Box" in the manual. For example, Utility denotes the "Utility" key on the front panel.
2. Menu
The menu item is denoted by the format of "Menu Word (Bold) + Character Shading" in the manual. For example, System denotes the "System" item under Utility.
3. Operation Step
The next step of the operation is denoted by an arrow "" in the manual. For example, Utility System denotes that f irst press Utility on the front panel and then press System.
Content Conventions in this Manual:
DS1000Z-E series includes the following models. Unless otherwise noted, this manual takes DS1202Z-E as an example to illustrate the command system of DS1000Z-E series.
II DS1000Z-E Programming Guide
Contents RIGOL
Contents
Guaranty and Declaration ......................................................................................................... I
Document Overview ................................................................................................................. II
Chapter 1 Programming Overview...................................................................................... 1-1
To Build Remote Communication ............................................................................................... 1-2
Remote Control Methods ........................................................................................................... 1-4
SCPI Command Overview .......................................................................................................... 1-5
Syntax ............................................................................................................................... 1-5
Symbol Description ............................................................................................................ 1-5
Parameter Type .................................................................................................................. 1-5
Command Abbreviation ...................................................................................................... 1-6
Chapter 2 Command System ............................................................................................... 2-1
:AUToscale ............................................................................................................................... 2-2
:CLEar...................................................................................................................................... 2-2
:RUN ........................................................................................................................................ 2-2
:STOP ...................................................................................................................................... 2-2
:SINGle .................................................................................................................................... 2-3
:TFORce ................................................................................................................................... 2-3
:ACQuire Commands ................................................................................................................. 2-4
:ACQuire:AVERages ............................................................................................................ 2-4
:ACQuire:MDEPth ............................................................................................................... 2-5
:ACQuire:TYPE ................................................................................................................... 2-5
:ACQuire:SRATe? ................................................................................................................ 2-6
:CALibrate Commands ............................................................................................................... 2-7
:CALibrate:QUIT ................................................................................................................ 2-7
:CALibrate:STARt ............................................................................................................... 2-7
:CHANnel<n> Commands ......................................................................................................... 2-8
:CHANnel<n>:BWLimit ....................................................................................................... 2-8
:CHANnel<n>:COUPling ..................................................................................................... 2-9
:CHANnel<n>:DISPlay ....................................................................................................... 2-9
:CHANnel<n>:INVert ....................................................................................................... 2-10
:CHANnel<n>:OFFSet ...................................................................................................... 2-10
:CHANnel<n>:RANGe ...................................................................................................... 2-11
:CHANnel<n>:TCAL ......................................................................................................... 2-12
:CHANnel<n>:SCALe ....................................................................................................... 2-13
:CHANnel<n>:PROBe ....................................................................................................... 2-13
:CHANnel<n>:UNITs ........................................................................................................ 2-14
:CHANnel<n>:VERNier ..................................................................................................... 2-14
:CURSor Commands ............................................................................................................... 2-15
:CURSor:MODE ................................................................................................................ 2-15
:CURSor:MANual .............................................................................................................. 2-16
:CURSor:TRACk ............................................................................................................... 2-21
:CURSor:AUTO ................................................................................................................. 2-25
:CURSor:XY ..................................................................................................................... 2-29
:DECoder Commands .............................................................................................................. 2-32
:DECoder<n>:MODE ........................................................................................................ 2-32
:DECoder<n>:DISPlay ..................................................................................................... 2-33
:DECoder<n>:FORMat ..................................................................................................... 2-33
:DECoder<n>:POSition .................................................................................................... 2-33
:DECoder<n>:THREshold:CHANnel1 ................................................................................. 2-34
:DECoder<n>:THREshold:CHANnel2 ................................................................................. 2-34
:DECoder<n>:THREshold:AUTO ....................................................................................... 2-34
:DECoder<n>:CONFig:LABel ............................................................................................. 2-35
:DECoder<n>:CONFig:LINE .............................................................................................. 2-35
:DECoder<n>:CONFig:FORMat ......................................................................................... 2-35
DS1000Z-E Programming Guide III
RIGOL Contents
:DECoder<n>:CONFig:ENDian .......................................................................................... 2-36
:DECoder<n>:CONFig:WIDth ............................................................................................ 2-36
:DECoder<n>:CONFig:SRATe? .......................................................................................... 2-37
:DECoder<n>:UART ......................................................................................................... 2-38
:DECoder<n>:IIC ............................................................................................................. 2-42
:DECoder<n>:SPI ............................................................................................................ 2-44
:DECoder<n>:PARallel ...................................................................................................... 2-49
:DISPlay Commands ................................................................................................................ 2-54
:DISPlay:CLEar ................................................................................................................. 2-54
:DISPlay:DATA? ................................................................................................................ 2-55
:DISPlay:TYPE .................................................................................................................. 2-56
:DISPlay:GRADing:TIME ................................................................................................... 2-57
:DISPlay:WBRightness ...................................................................................................... 2-57
:DISPlay:GRID ................................................................................................................. 2-58
:DISPlay:GBRightness ....................................................................................................... 2-58
:ETABle Commands ................................................................................................................. 2-59
:ETABle<n>:DISP ............................................................................................................. 2-59
:ETABle<n>:FORMat ........................................................................................................ 2-59
:ETABle<n>:VIEW ............................................................................................................ 2-60
:ETABle<n>:COLumn ....................................................................................................... 2-60
:ETABle<n>:ROW ............................................................................................................ 2-61
:ETABle<n>:SORT ............................................................................................................ 2-61
:ETABle<n>:DATA? .......................................................................................................... 2-62
:FUNCtion Commands ............................................................................................................. 2-63
:FUNCtion:WRECord:FEND ................................................................................................ 2-63
:FUNCtion:WRECord:FMAX? .............................................................................................. 2-64
:FUNCtion:WRECord:FINTerval .......................................................................................... 2-64
:FUNCtion:WRECord:PROMpt ............................................................................................ 2-64
:FUNCtion:WRECord:OPERate ........................................................................................... 2-65
:FUNCtion:WRECord:ENABle ............................................................................................. 2-65
:FUNCtion:WREPlay:FSTart ................................................................................................ 2-66
:FUNCtion:WREPlay:FEND ................................................................................................. 2-67
:FUNCtion:WREPlay:FMAX? ............................................................................................... 2-67
:FUNCtion:WREPlay:FINTerval ........................................................................................... 2-68
:FUNCtion:WREPlay:MODE ................................................................................................ 2-68
:FUNCtion:WREPlay:DIRection .......................................................................................... 2-69
:FUNCtion:WREPlay:OPERate ............................................................................................ 2-69
:FUNCtion:WREPlay:FCURrent ........................................................................................... 2-70
IEEE488.2 Common Commands ............................................................................................... 2-71
*CLS ................................................................................................................................ 2-71
*ESE ................................................................................................................................ 2-71
*ESR? .............................................................................................................................. 2-72
*IDN? .............................................................................................................................. 2-72
*OPC ............................................................................................................................... 2-72
*RST ............................................................................................................................... 2-72
*SRE ............................................................................................................................... 2-73
*STB? .............................................................................................................................. 2-73
*TST? .............................................................................................................................. 2-73
*WAI ............................................................................................................................... 2-73
:LAN Commands ..................................................................................................................... 2-74
:LAN:DHCP ...................................................................................................................... 2-74
:LAN:AUToip ..................................................................................................................... 2-74
:LAN:GATeway .................................................................................................................. 2-75
:LAN:DNS ........................................................................................................................ 2-75
:LAN:MAC? ....................................................................................................................... 2-76
:LAN:MANual .................................................................................................................... 2-76
:LAN:INITiate ................................................................................................................... 2-76
:LAN:IPADdress ................................................................................................................ 2-77
IV DS1000Z-E Programming Guide
Contents RIGOL
:LAN:SMASk .................................................................................................................... 2-77
:LAN:STATus? .................................................................................................................. 2-77
:LAN:VISA? ...................................................................................................................... 2-78
:LAN:APPLy ...................................................................................................................... 2-78
:MATH Commands .................................................................................................................. 2-79
:MATH:DISPlay ................................................................................................................ 2-80
:MATH:OPERator .............................................................................................................. 2-80
:MATH:SOURce1 .............................................................................................................. 2-81
:MATH:SOURce2 .............................................................................................................. 2-81
:MATH:LSOUrce1 ............................................................................................................. 2-82
:MATH:LSOUrce2 ............................................................................................................. 2-82
:MATH:SCALe .................................................................................................................. 2-82
:MATH:OFFSet ................................................................................................................. 2-83
:MATH:INVert .................................................................................................................. 2-83
:MATH:RESet ................................................................................................................... 2-84
:MATH:FFT:SOURce.......................................................................................................... 2-84
:MATH:FFT:WINDow ........................................................................................................ 2-84
:MATH:FFT:SPLit .............................................................................................................. 2-85
:MATH:FFT:UNIT .............................................................................................................. 2-85
:MATH:FFT:HSCale ........................................................................................................... 2-86
:MATH:FFT:HCENter ......................................................................................................... 2-86
:MATH:FFT:MODE ............................................................................................................ 2-87
:MATH:FILTer:TYPE .......................................................................................................... 2-87
:MATH:FILTer:W1 ............................................................................................................. 2-88
:MATH:FILTer:W2 ............................................................................................................. 2-88
:MATH:OPTion:STARt ....................................................................................................... 2-89
:MATH:OPTion:END.......................................................................................................... 2-89
:MATH:OPTion:INVert ...................................................................................................... 2-90
:MATH:OPTion:SENSitivity ................................................................................................ 2-90
:MATH:OPTion:DIStance .................................................................................................. 2-91
:MATH:OPTion:ASCale ...................................................................................................... 2-91
:MATH:OPTion:THReshold1 .............................................................................................. 2-91
:MATH:OPTion:THReshold2 .............................................................................................. 2-92
:MATH:OPTion:FX:SOURce1 ............................................................................................. 2-92
:MATH:OPTion:FX:SOURce2 ............................................................................................. 2-93
:MATH:OPTion:FX:OPERator ............................................................................................. 2-93
:MASK Commands .................................................................................................................. 2-94
:MASK:ENABle ................................................................................................................. 2-94
:MASK:SOURce ................................................................................................................ 2-94
:MASK:OPERate ............................................................................................................... 2-95
:MASK:MDISplay .............................................................................................................. 2-95
:MASK:SOOutput ............................................................................................................. 2-96
:MASK:OUTPut................................................................................................................. 2-96
:MASK:X .......................................................................................................................... 2-97
:MASK:Y .......................................................................................................................... 2-97
:MASK:CREate ................................................................................................................. 2-97
:MASK:PASSed? ............................................................................................................... 2-97
:MASK:FAILed? ................................................................................................................ 2-98
:MASK:TOTal? .................................................................................................................. 2-98
:MASK:RESet ................................................................................................................... 2-98
:MEASure Commands .............................................................................................................. 2-99
:MEASure:SOURce ......................................................................................................... 2-103
:MEASure:COUNter:SOURce ........................................................................................... 2-103
:MEASure:COUNter:VALue? ............................................................................................ 2-103
:MEASure:CLEar ............................................................................................................. 2-104
:MEASure:RECover ......................................................................................................... 2-104
:MEASure:ADISplay ........................................................................................................ 2-104
:MEASure:AMSource....................................................................................................... 2-105
DS1000Z-E Programming Guide V
RIGOL Contents
:MEASure:SETup:MAX ..................................................................................................... 2-105
:MEASure:SETup:MID ..................................................................................................... 2-106
:MEASure:SETup:MIN ..................................................................................................... 2-106
:MEASure:SETup:PSA ...................................................................................................... 2-107
:MEASure:SETup:PSB ...................................................................................................... 2-107
:MEASure:SETup:DSA ..................................................................................................... 2-107
:MEASure:SETup:DSB ..................................................................................................... 2-108
:MEASure:STATistic:DISPlay ............................................................................................ 2-108
:MEASure:STATistic:MODE .............................................................................................. 2-108
:MEASure:STATistic:RESet ............................................................................................... 2-109
:MEASure:STATistic:ITEM ................................................................................................ 2-109
:MEASure:ITEM .............................................................................................................. 2-110
:REFerence Commands .......................................................................................................... 2-111
:REFerence:DISPlay ........................................................................................................ 2-111
:REFerence<n>:ENABle .................................................................................................. 2-111
:REFerence<n>:SOURce ................................................................................................. 2-112
:REFerence<n>:VSCale .................................................................................................. 2-112
:REFerence<n>:VOFFset ................................................................................................ 2-113
:REFerence<n>:RESet .................................................................................................... 2-113
:REFerence<n>:CURRent ............................................................................................... 2-113
:REFerence<n>:SAVe ..................................................................................................... 2-114
:REFerence<n>:COLor ................................................................................................... 2-114
:STORage Commands ............................................................................................................ 2-115
:STORage:IMAGe:TYPE ................................................................................................... 2-115
:STORage:IMAGe:INVERT ............................................................................................... 2-115
:STORage:IMAGe:COLor ................................................................................................. 2-116
:SYSTem Commands ............................................................................................................. 2-117
:SYSTem:AUToscale ........................................................................................................ 2-117
:SYSTem:BEEPer ............................................................................................................ 2-118
:SYSTem:ERRor[:NEXT]? ................................................................................................. 2-118
:SYSTem:GAM? .............................................................................................................. 2-118
:SYSTem:LANGuage ........................................................................................................ 2-118
:SYSTem:LOCKed ........................................................................................................... 2-119
:SYSTem:PON ................................................................................................................ 2-119
:SYSTem:OPTion:INSTall ................................................................................................. 2-119
:SYSTem:OPTion:UNINSTall ............................................................................................ 2-120
:SYSTem:RAM? ............................................................................................................... 2-120
:SYSTem:SETup .............................................................................................................. 2-120
:TIMebase Commands ........................................................................................................... 2-121
:TIMebase:DELay:ENABle ............................................................................................... 2-121
:TIMebase:DELay:OFFSet ............................................................................................... 2-121
:TIMebase:DELay:SCALe ................................................................................................. 2-122
:TIMebase[:MAIN]:OFFSet .............................................................................................. 2-123
:TIMebase[:MAIN]:SCALe ............................................................................................... 2-124
:TIMebase:MODE ........................................................................................................... 2-124
:TRIGger Commands ............................................................................................................. 2-125
:TRIGger:MODE ............................................................................................................. 2-125
:TRIGger:COUPling ......................................................................................................... 2-126
:TRIGger:STATus? .......................................................................................................... 2-126
:TRIGger:SWEep ............................................................................................................ 2-126
:TRIGger:HOLDoff .......................................................................................................... 2-127
:TRIGger:NREJect .......................................................................................................... 2-127
:TRIGger:POSition? ........................................................................................................ 2-127
:TRIGger:EDGe .............................................................................................................. 2-128
:TRIGger:PULSe ............................................................................................................. 2-130
:TRIGger:SLOPe ............................................................................................................. 2-133
:TRIGger:VIDeo ............................................................................................................. 2-137
:TRIGger:PATTern ........................................................................................................... 2-140
VI DS1000Z-E Programming Guide
Contents RIGOL
:TRIGger:DURATion ....................................................................................................... 2-142
:TRIGger:TIMeout .......................................................................................................... 2-145
:TRIGger:RUNT ............................................................................................................. 2-147
:TRIGger:WINDows ....................................................................................................... 2-151
:TRIGger:DELay ............................................................................................................. 2-154
:TRIGger:SHOLd ............................................................................................................ 2-158
:TRIGger:NEDGe ............................................................................................................ 2-161
:TRIGger:RS232............................................................................................................. 2-163
:TRIGger:IIC ................................................................................................................. 2-167
:TRIGger:SPI ................................................................................................................. 2-171
:WAVeform Commands ......................................................................................................... 2-176
:WAVeform:SOURce ....................................................................................................... 2-177
:WAVeform:MODE .......................................................................................................... 2-177
:WAVeform:FORMat ....................................................................................................... 2-178
:WAVeform:DATA?.......................................................................................................... 2-178
:WAVeform:XINCrement? ............................................................................................... 2-181
:WAVeform:XORigin? ...................................................................................................... 2-182
:WAVeform:XREFerence? ................................................................................................ 2-182
:WAVeform:YINCrement? ............................................................................................... 2-182
:WAVeform:YORigin? ...................................................................................................... 2-183
:WAVeform:YREFerence? ................................................................................................ 2-183
:WAVeform:STARt .......................................................................................................... 2-183
:WAVeform:STOP ........................................................................................................... 2-184
:WAVeform:PREamble? ................................................................................................... 2-184
Chapter 3 Programming Demos .......................................................................................... 3-1
Programming Preparations ........................................................................................................ 3-2
Excel Programming Demo ......................................................................................................... 3-3
Matlab Programming Demo ....................................................................................................... 3-7
LabVIEW Programming Demo.................................................................................................... 3-9
Visual Basic Programming Demo .............................................................................................. 3-13
Visual C++ Programming Demo .............................................................................................. 3-15
DS1000Z-E Programming Guide VII
Chapter 1 Programming Overview RIGOL

Chapter 1 Programming Overview

This chapter introduces how to build the remote communication between DS1000Z-E series digital oscilloscope and the PC. It also introduces the remote control methods as well as the syntax, symbols, parameters and abbreviation rules of the SCPI commands.
Main topics of this chapter:
To Build Remote Communication Remote Control Methods SCPI Command Overview
DS1000Z-E Programming Guide 1-1
RIGOL Chapter 1 Programming Overview
1
2

To Build Remote Communication

This oscilloscope can communicate with a PC through the USB or the LAN bus. This section introduces how to control the oscilloscope remotely through the USB interface using Ultra Sigma in details.
Operation Steps:
1. Install the Ultra Sigma common PC software
Download the Ultra Sigma common PC software from RIGOL official website (www.rigol.com) and install it according to the instructions.
2. Connect the instrument and PC and configure the interface parameters of the instrument
DS1000Z-E can communicate with a PC through the USB or the LAN bus. This manual takes the USB interface as an example.
(1) Connect the devices
Connect the USB Device interface at the r eal pan el of the osc illoscope an d the U SB Host in terf ace of the PC using a USB ca bl e .
(2) Install the USB driver
This oscilloscope is a USB-TMC device. After you connect the oscilloscope to the PC and turn both on for the first time (the oscilloscope is automatically configured to the USB interface; at the same time, make sure that Utility IO Setting USB Device is set to "Computer"), the Found New Hardware Wizard as shown in the figure below is displayed on the PC. Please install the "USB Test and Measurement D evice (IVI)" driver following the directions in the wizard. The steps are as follows.
1-2 DS1000Z-E Programming Guide
Chapter 1 Programming Overview RIGOL
3 4 5
6
DS1000Z-E Programming Guide 1-3
RIGOL Chapter 1 Programming Overview
7
(3) Search for device resource
Start up the Ultra Sigma and the software will automatically search for the instrument resources currently connected to the PC. You can also click
(4) View the device resources
The resources found will appear under the "RIGOL Online Resource" directory and the model number and USB interface information of the instrument will also be displayed. For example, DS1202Z-E (USB0::0x1AB1::0x04CE::DS1ZD170800001::INSTR).
(5) Control the instrument remotely
Right click the resour ce n ame "DS1202Z-E (USB0::0x1AB1::0x04CE::DS1ZD170800001::INSTR)" and select "SCPI Panel Control" to turn on the remote command control panel through which you can send commands and read data.
to search for the resources.

Remote Control Methods

1. User-defined Programming
Users can use SCPI (Standard Commands for Programmable Instruments) commands to program and control the oscilloscope. For details, refer to the introductions in "Chapter 3 Programming Demos".
2. Send SCPI Commands via PC Software
You can control the oscilloscope remotely by sending SCPI commands via PC software. Ultra Sigma provided by RIGOL is recommended
.
1-4 DS1000Z-E Programming Guide
Chapter 1 Programming Overview RIGOL

SCPI Command 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 intercha nge (equivalent to ASCII programming)). The SCPI commands provide a hierarchical tree structure and consist of multiple subsystems. Each com mand subsystem consists of a root keyword and one or more sub-keywords.

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; the command keywords and the first parameter are separated by space.
For example, :ACQuire:TYPE <type> :ACQuire:TYPE? ACQuire is the root keyword of the command. TYPE is the second-level keyword. The command string starts with ":" which is also used t o separate the multiple-level keywords. <type> represents the parameters available for setting. "?" represents query. The command keywords :ACQuire:TYPE and parameter <type> are separated by a space.
"," is generally used for separating multiple parameters contained in the same command, for example, [:TRACe[<n>]]:DATA:VALue volatile,<points>,<data>

Symbol Description

The following symbols will not be sent with the commands.
1. Braces {} The parameters enclosed in the braces are optional and are usually separated by the vertical bar "|". When using 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 parameters must be selected when using 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.
DS1000Z-E Programming Guide 1-5
RIGOL Chapter 1 Programming Overview
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 (NR1 format) 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 an integer between 0 and 100.
4. Real
The parameter can be any real number within the effective value range and this command accepts
decimal (NR2 format) and scientific notation (NR3 format) parameter input. For example, :TRIGger:TIMeout:TIMe <NR3> :TRIGger:TIMeout:TIMe? Wherein, <NR3> can be set to any real number between 1.6e-08 (namely 16ns) to 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, :SYSTem:OPTion:INSTall <license> Wherein, <license> can be set to PDUY9N9QTS9PQSWPLAETRD3UJHYA.

Command Abb r eviation

All the commands are case-insensitive and you can use any of them. If abbreviation is used, all the capital letters in the command must be written completely. For example, :MEASure:ADISplay? can be abbreviated to :MEAS:ADIS?.
1-6 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL

Chapter 2 Command System

This chapter introduces the syntax, function, parameter, and using instruction of each DS1000Z-E command.
Main topics of this chapter:
:AUToscale :CLEar:RUN:STOP:SINGle:TFORce:ACQuire Commands:CALibrate Commands :CHANnel<n> Commands :CURSor Commands :DECoder Commands:DISPlay Commands :ETABle Commands :FUNCtion Commands IEEE488.2 Common Commands:LAN Commands :MATH Commands :MASK Commands :MEASure Commands :REFerence Commands :STORage Commands :SYSTem Commands :TIMebase Commands :TRIGger Commands :WAVeform Commands
Note:
1. Unless otherwise noted, this manual takes DS1202Z-E as an example to introduce the commands.
2. For parameter setting commands (for example, the time, frequency, and amplitude), the oscilloscope can only accept numbers and set the parameters using the default units; it cannot recognize the units sent with the parameters. For the def ault unit of each par ameter, please refer to the descri ption in each command in the following introductions.
DS1000Z-E Programming Guide 2-1
RIGOL Chapter 2 Command System
Syntax

:AUToscale

on the front panel.
recorded waveform, this command is invalid.
Syntax

:CLEar

panel.
Command

:STOP

front panel.
waveform, these commands are invalid.
:AUToscale
Description Enable the waveform auto setting function. The oscilloscope will automatically adjust the
vertical scale, horizontal timebase, and trigger mode according to the input signal to realize optimum waveform display . This command is equivalent to pressing the AUTO key
Explanation Theoretically, wav eform auto setting function requires that the frequency of sine is no
lower than 41Hz; the duty cycle should be greater than 1% and the amplitude must be at least 20mVpp for square (the probe ratio is 1X).
When the pass/fail function is enabled (see the
this command, the oscilloscope will disable the pass/fail function firstly and then execute the waveform auto setting function.
When the waveform record function is enabled or during the playback of the
:MASK:ENABle command), if you sent
:CLEar
Description Clear all the waveforms on the screen. If the oscilloscope is in the RUN state, waveform
will still be displayed. This command is equivalent to pressing the CLEAR key on the front
Related
:DISPlay:CLEar
:RUN :STOP

Syntax :RUN

Description The :RUN command starts the oscilloscope and the :STOP command stops the
oscilloscope. These commands are equivalent to pressing the RUN/STOP key on the
Explanation When the waveform record function is ena bled or during the playback of the recorded
2-2 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Syntax

:SINGle

the :TRIGger:SWEep SINGle command.
recorded waveform, this command is invalid.
:STOP
Syntax

:TFORce

the FORCE key in the trigger control area on the front panel.
:SINGle
Description Set the oscilloscope to the single trigger mode. This command is equivalent to any of the
following two operations: pressing the SINGLE key on the front panel and sending
Explanation In the single trigger mode, the oscilloscope triggers once when the trigger conditions
are met and then stops.
When the waveform record function is enabled or during the playback of the
Related
Commands
:TFORce :RUN
:TFORce
Description Generate a trigger signal forcefully. This command is only applicable to the normal and
single trigger modes (see the
:TRIGger:SWEep command) and is equivalent to pressing
DS1000Z-E Programming Guide 2-3
RIGOL Chapter 2 Command System
:ACQuire:AVERages?
Description
Set or query the number of averages under the average acquisition mode.
Name
Type
Range
Default
waveform to the waveform changes.
Format
:ACQuire:AVERages? /*The query returns 128*/

:ACQuire Commands

The :ACQuire commands are used to set and query the memory depth, acquisition mode and the number of averages as well as query the current sample rate of the oscilloscope.
Command List
:ACQuire:AVERages:ACQuire:MDEPth:ACQuire:TYPE :ACQuire:SRATe?
[1]
Note
not included and you can refer to the complete introductions of the commands in the text according to the keywords.
: In the "Command List" in this manual, the parameters in the setting commands and the query commands are

:ACQuire:AVERages

Syntax :ACQuire:AVERages <c ount>
[1]
:
Parameter
<count> Integer 2n (n is an integer from 1 to 10) 2
Explanation You can se nd the :ACQuire:TYPE command to set the acquisition mode.
In the average acquisition mode, greater number of averages can lower the noise
and increase the vertical resolution, but will also slow the response of the displayed
Return
Example
The query returns an integer between 2 and 1024.
:ACQuire:AVERages 12 8 /*Set the number of averages to 128*/
2-4 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:ACQuire:MDEPth?
points that can be stored in a single trigger sample). The default unit is pts (points).
Name
Type
Range
Default
according to the current sample rate.
Format
Command
:ACQuire:TYPE?
Description
Set or query the acquisition mode of the oscilloscope.
Name
Type
Range
Default
HRESolution (High Resolution): this mode uses a kind of ultra-sample technique to

:ACQuire:MDEPth

Syntax :ACQuire:MDEPth <mdep>
Description Set or query the memory depth of the oscilloscope (namely the number of waveform
Parameter
Explanation
<mdep>
When a single channel is enabled, the range of <mdep> is {AUTO|12000|
Discrete Refer to Explanation
120000|1200000|12000000|24000000}. When dual channels are enabled, the range of <mdep> is {AUTO|6000|60000| 600000|6000000|12000000}.
The following equation des cribes the relationship among memory depth, sample
rate, and waveform length: Memory Depth = Sample Rate x Waveform Length Wherein, the Waveform Length is the product of the horizontal timebase (set by
:TIMebase[:MAIN]:SCALe command) times the number of grids in the horizontal
the direction on the screen (12 for DS1000Z-E). When AUTO is selected, the oscilloscope will select the memory depth automatically
Return
The query returns the actual number of points (integer) or AUTO.
Example :ACQuire:MDEPth 12000 /*Set the memory depth to 12000pts*/
:ACQuire:MDEPth? /*The query returns 12000*/
Related
:ACQuire:SRATe?

:ACQuire:TYPE

AUTO
Syntax :ACQuire:TYPE <type>
Parameter
Explanation
<type>
NORMal
Discrete
: in this mode, the oscilloscope samples the signal at equa l time interval to
{NORMal|AVERages|PEAK|HRESolution}
NORMal
rebuild the waveform. For most of the waveforms, the best display effect can be obtained using this mode.
AVERages: in
this mode, the oscilloscope averages the waveforms from multiple
samples to reduce the random noise of the input signal and improve the vertical resolution. The number of aver ages c an be set b y the
:ACQuire:AVERages command.
Greater number of av erages can lower the noise and increase the vertical resolution, but will also slow the response of the displayed waveform to the waveform changes.
PEAK (Peak Detect): in this mode, the oscilloscope acquires the maximum and
minimum values of the signal within the sample interval to get the envelope of the signal or the narrow pulse of the signal that might be lost. In this mode, signal confusion can be prevented but the noise displayed would be larger.
DS1000Z-E Programming Guide 2-5
RIGOL Chapter 2 Command System
average the neighboring points of the sample waveform to reduce the random noise
storage rate of the acquisition memory.
Format
:ACQuire:TYPE? /*The query returns AVER*/
Syntax

:ACQuire:SRATe?

Description
Query the current sample rate. The default unit is Sa/s.
(12 for DS1000Z-E).
Format
Example
:ACQuire:SRATe? /*The query returns 2.000000e+09*/
on the input signal and generate much smoother waveforms on the screen. This is generally used when the sample rate of the digital converter is higher than the
Return
Example
The query returns NORM, AVER, PEAK, or HRES.
:ACQuire:TYPE AVERages /*Select the average acquisition mode*/
:ACQuire:SRATe?
Explanation Sample rate is the sample frequency of th e oscilloscope, namely the wav eform points
sampled per second.
The foll owing equation describes the relationship among memory depth, sample
rate, and waveform length: Memory Depth = Sample Rate x Waveform Length
:ACQuire:MDEPth command, and
Return
Wherein, the Memory Depth can be set us ing the the Waveform Length is the product of the horizontal timebase (set by
:TIMebase[:MAIN]:SCALe command) times the number of the horizontal scales
the
The query returns the sample rate in scientific nota tion.
2-6 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Syntax

:CALibrate:QUIT

Description
Exit the self-calibration at any time.
Command
Syntax

:CALibrate:STARt

send the :CALibrate:QUIT command to quit the self-calibration.

:CALibrate Commands

Command List:
:CALibrate:QUIT:CALibrate:STARt
:CALibrate:QUIT
Related
:CALibrate:STARt
:CALibrate:STARt
Description The oscilloscope starts to execute self-calibration.
Explanation The self-calibration operation can make the oscillos c ope quickly rea c h its optimum
working state to obtain the most accurate measurement values.
During the self-calibration, all the channels of the oscilloscope must be disconnected
from the inputs.
The functions of most of the keys are disabled during the self-calibration. You can
DS1000Z-E Programming Guide 2-7
RIGOL Chapter 2 Command System
:CHANnel<n>:BWLimit?
Description
Set or query the bandwidth limit p arameter of the specified channel .
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
Discrete
OFF
frequency components .
Format
:CHANnel1:BWLimit? /*The query returns 20M*/

:CHANnel<n> Commands

The :CHANnel<n> commands are used to set or query the vertical system parameters of the analog channels, such as the bandwidth limit, coupling, vertical scale, and vertical offset.
Command List:
:CHANnel<n>:BWLimit:CHANnel<n>:COUPling :CHANnel<n>:DISPlay :CHANnel<n>:INVert:CHANnel<n>:OFFSet :CHANnel<n>:RANGe :CHANnel<n>:TCAL :CHANnel<n>:SCALe:CHANnel<n>:PROBe:CHANnel<n>:UNITs :CHANnel<n>:VERNier

:CHANnel<n>:BWLimit

Syntax :CHANnel<n>:BWLimit <type>
Parameter
<type>
{20M|OFF}
Explanation OFF: disable the bandwidth limit and the high frequency components of the signal
under test can pass the channel. 20M: enable the bandwidth limit and the high frequency components of the signal under test that exceed 20 MHz are attenuated.
Enabling the bandwidth li mit can reduce the noise, but can also attenuate the high
Return
Example
The query returns 20M or OFF.
:CHANnel1:BWLimit 20M /*Enable the 20MHz bandwidth limit*/
2-8 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CHANnel<n>:COUPling?
Description
Set or query the coupling mode of the specified channel.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<coupling>
Discrete
{AC|DC|GND}
DC
GND: the DC and AC components of the signal under test are both blocked.
Format
:CHANnel1:COUPling? /*The query returns AC*/
:CHANnel<n>:DISPlay?
Description
Enable or disable the specified channel or query the status of the specified channel.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
CH2: 0|OFF
Format
:CHANnel1:DISPlay? /*The query returns 1*/

:CHANnel<n>:COUPling

Syntax :CHANnel<n>:COUPling <coupling>
Parameter
Explanation AC: the DC components of the signal under test are blocked.
DC: t he DC and AC components of the signal under test can both pass the channel.
Return
Example
The query returns AC, DC, or GND.
:CHANnel1:COUPling AC /*Select the AC coupling mode*/

:CHANnel<n>:DISPlay

Syntax :CHANnel<n>:DISPlay <bool>
Parameter
<bool> Bool {{1|ON}|{0|OFF}}
Return
Example
The query returns 1 or 0.
:CHANnel1:DISPlay ON /*Enable CH1*/
CH1: 1|ON
DS1000Z-E Programming Guide 2-9
RIGOL Chapter 2 Command System
:CHANnel<n>:INVert?
waveform invert of the specified channel.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
invert is turned on, the waveform voltage values are inverted.
Format
:CHANnel1:INVert? /*The query returns 1*/
:CHANnel<n>:OFFSet?
Description
Set or query the vertical offset of the specified channel. The default unit is V.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
vertical scale<5V/div: -20V to +20V
Format
:CHANnel1:OFFSet? /*The query returns 1.000000e-02*/

:CHANnel<n>:INVert

Syntax :CHANnel<n>:INVer t <bool>
Description Enable or disable the waveform invert of the specified channe l or query the status of the
Parameter
<n> Discrete {1|2} --
Explanation When waveform invert is turned off, the waveform display is normal; when waveform
Return
Example
The query returns 1 or 0.
:CHANnel1:INVert ON /*Enable the waveform invert of CH1*/

:CHANnel<n>:OFFSet

Syntax :CHANnel<n>:OFFSet <offset>
Parameter
<offset> Real
Related to the current vertical scale and probe ratio When the probe ratio is 1X, vertical scale500mV/div: -100V to +100V vertical scale<500mV/div: -2V to +2V When the probe ratio is 10X, vertical scale≥5V/div: -1000V to +1000V
0V (the probe ratio is 10X)
Return
Example
The query returns the vertical offset in scientific notation.
:CHANnel1:OFFSet 0.01 /*Set the vertical offset of CH1 to 10mV*/
2-10 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CHANnel<n>:RANGe?
Description
Set or query the vertical range of the specified channel. The default unit is V.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
When the probe ratio is 10X: 80mV to 800V
= Vertical Range/8). The vertical scale can be set by the :CHANnel<n>:SCALe command.
Format
:CHANnel1:RANGe? /*The query returns 8.000000e+00*/

:CHANnel<n>:RANGe

Syntax :CHANnel<n>:RANGe <range>
Parameter
<range> Real
Related to the probe ratio When the probe ratio is 1X: 8mV to 80V
8V (the probe ratio is 10X)
Explanation This command indirectly modifies the vertical scale of the specified channel (Vertical Scale
Return
Example
The query returns the vertical range in scientific notation.
:CHANnel1:RANGe 8 /*Set the vertical range of CH1 to 8V*/
DS1000Z-E Programming Guide 2-11
RIGOL Chapter 2 Command System
:CHANnel<n>:TCAL?
of the corresponding channel. The default unit is s.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
Horizontal Timebase
Step of the Delay Calibration Time
5ns
100ps
10ns
200ps
20ns
400ps
50ns
1ns
100ns
2ns
200ns
4ns
500ns
10ns
1μs to 10μs
20ns
calibration time cannot be adjusted.
Format
:CHANnel1:TCAL? /*The query returns 2.000000e-08*/

:CHANnel<n>:TCAL

Syntax :CHANnel<n>:TCAL <val>
Description S et or query the dela y calibration time of the spec ified channel to calibrate the zero of fset
Parameter
<val> Real -100ns to 100ns 0.00s
Explanation <val> can only be set to the specific values in the specified step. If the pa rame ter you
sent is not one of the specific values, the parameter will be set to the nearest spe cific values automatically. The step varies with the horizontal timebase (set by
:TIMebase[:MAIN]:SCALe command), as shown in the table below.
the
Return
Example
Note: When the horizontal timebase is equal to or greater than 10μs, the delay
The query returns t he delay calibration time in scientific notation.
:CHANnel1:TCAL 0.00000002 /*Set the delay calibration time to 20ns*/
2-12 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CHANnel<n>:SCALe?
Description
Set or query the vertical scale of the specified channel. The default unit is V.
Name
Type
Range
Default
100V
of the waveform to view the signal details.
Format
:CHANnel1:SCALe? /*The query retur ns 1.000000e+00*/
:CHANnel<n>:PROBe?
Description
Set or query the probe ratio of the specified channel.
Name
Type
Range
Default
100|200|500|1000}
Setting the probe ratio will affect the range of the vertical scale.
Format
:CHANnel1:PROBe? /*The query returns 1.000000e+01*/
Command

:CHANnel<n>:SCALe

Syntax :CHANnel<n>:SCALe <scale>
Parameter
<n> Discrete {1|2} --
Related to the current probe ratio
<scale> Real
When the probe ratio is 1X: 1mV to 10V When the probe ratio is 10X (default): 10mV to
Explanation The range of the vertical scale is related to the current probe ratio (set by
:CHANnel<n>:PROBe command).
the
1V (the probe ratio is 10X)
You can use the
adjustment of the vertical scale. By default, the fine adjustment is off. At this point, you can only set the vertical scale in 1-2-5 step, namely 10mV, 20mV, 50mV, 100mV, …, 100V (the probe ratio is 10X). When the fine adjustment is on, you ca n further adjust the vertical scale within a relatively smaller range to improve the vertical resolution. If the amplitude 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 scale is used, fine adjustment can be used to improve the display amplitude
Return
Example
The query returns the vertical scale in scientific notation.
:CHANnel1:SCALe 1 /*Set the vertic al scale of CH1 to 1V*/

:CHANnel<n>:PROBe

Syntax :CHANnel<n>:PROBe <atten>
Parameter
<n> Discrete {1|2} --
:CHANnel<n>:VERNier command to enable or disable the fine
<atten> Discrete
{0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|
Explanation Setting the probe ratio refers to multiply the signal sampled with the specified ratio
and then display the result (the actual amplitude of the signal will not be affected).
Return
Example
Related
DS1000Z-E Programming Guide 2-13
The query returns the probe ratio in scientific notation.
:CHANnel1:PROBe 10 /*Set the probe ratio of CH1 to 10X*/
:CHANnel<n>:SCALe
10
RIGOL Chapter 2 Command System
:CHANnel<n>:UNITs?
Description
Set or query the amplitude display unit of the specified channel.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
Format
:CHANnel1:UNITs? /*The query returns VOLT*/
:CHANnel<n>:VERNier?
query the fine adjustment status of the vertical scale of the specified channel.
Name
Type
Range
Default
amplitude of the waveform to view the signal details.
Format
:CHANnel1:VERNier? /*The query returns 1*/
Command

:CHANnel<n>:UNITs

Syntax :CHA N ne l< n >: UNI Ts <un it s >
Parameter
<units> Discrete {VOLTage|WATT|AMPere|UNKNown} VOLTage
Return
Example
The query returns VOLT, WATT, AMP, or UNKN.
:CHANnel1:UNITs VOLTage /*Set the amplitude display unit of CH1 to V*/

:CHANnel<n>:VERNier

Syntax :CHANnel<n>:VERNier <bool>
Description Enable or disable the fine adjustment of the vertical scale of the specified channel, or
Parameter
<n> Discrete {1|2} -­<bool> Bool {{1|ON}|{0|OFF}} 0|OFF
Explanation By default, the fine adjustment is off. At this point, you can only set the vertical scale in
1-2-5 step, namely 10mV, 20mV, 50mV, 100mV…100V (the probe ratio is 10X). When the fine adjustment is on, you can further adjust the vertical scale within a relatively smaller range to improve the vertical resolution. If the amplitude 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 scale is used, fine adjustment can be used to improve the display
Return
Example
The query returns 1 or 0.
:CHANnel1:VERNier ON /*Enable the fine adjustment function of the vertical scale of
CH1*/
Related
:CHANnel<n>:SCALe
2-14 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CURSor:MODE?
Description
Set or query the cursor measurement mode.
Name
Type
Range
Default
<mode>
Discrete
{OFF|MANual|TRACk|AUTO|XY}
OFF
horizontal timebase mode is XY.
Format
:CURSor:MODE? /*The query returns MAN*/

:CURSor Commands

The :CURSor commands are used to measure the X-axis value (such as time) and Y-axis value (such as voltage) of the waveform displayed on the screen.
Command List:
:CURSor:MODE:CURSor:MANual:CURSor:TRACk:CURSor:AUTO:CURSor:XY

:CURSor:MODE

Syntax :CURSor:MODE <mode>
Parameter
Explanation OFF: disable the cursor measurement function.
MANual: enable the manual cursor measurement mode.TRACk: enable the track cursor measurement mode. AUTO: enable the auto cursor measurement mode.XY: enable the XY cursor measurement mode. This mode is valid only when the
Return
Example
Related
Commands
The query returns OFF, MAN, TRAC, AUTO, or XY.
:CURSor:MODE MANual /*Enable the manual cursor measurement mode*/
:CURSor:MANual :CURSor:TRACk :CURSor:XY :TIMebase:MODE
DS1000Z-E Programming Guide 2-15
RIGOL Chapter 2 Command System
:CURSor:MANual:TYPE?
Description
Set or query the cursor type in manual cursor measurement mode.
Name
Type
Range
Default
<type>
Discrete
{X|Y}
X
(:CURSor:MANual:SOURce), the cursor type cannot be set to Y.
Format
:CURSor:MANual:TYPE? /*The query returns Y*/

:CURSor:MANual

Command List:
:CURSor:MANual:TYPE:CURSor:MANual:SOURce:CURSor:MANual:TUNit:CURSor:MANual:VUNit:CURSor:MANual:AX:CURSor:MANual:BX :CURSor:MANual:AY :CURSor:MANual:BY:CURSor:MANual:AXValue?:CURSor:MANual:AYValue? :CURSor:MANual:BXValue? :CURSor:MANual:BYValue?:CURSor:MANual:XDELta?:CURSor:MANual:IXDELta? :CURSor:MANual:YDELta?
:CURSor:MANual:TYPE
Syntax :CUR S or:M A Nua l:TYPE <type>
Parameter
Explanation X: select the X type cursors. The X type cursors are a vertical solid line (cursor A) and
a vertical dotted line (cursor B) and are usually used to measure the time parameters.
Y: select the Y type cursors. The Y type cursors are a horizontal solid line (cursor A)
and a horizontal dotted line (cursor B) and are usually used to measure the voltage parameters.
When the channel source of manual cursor measurement is set to LA
Return
The query returns X or Y.
Example
:CURSor:MANual:TYPE Y /*select the Y type cursors*/
2-16 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CURSor:MANual:SOURce?
Description
Set or query the channel source of the manual cursor measurement mode.
Name
Type
Range
Default
<source>
Discrete
CHANnel1
Explanation
Only the channel that is enabled currently can be selected.
Format
:CURSor:MANual:SOURce? /*The query returns CHAN2*/
:CURSor:MANual:TUNit?
Description
Set or query the h orizontal unit in the manual cursor measurement mode.
Name
Type
Range
Default
<unit>
Discrete
{S|HZ|DEGRee|PERCent}
S
PERCent: AX, BX, and BX-AX are expressed in percentage.
Format
:CURSor:MANual:TUNit? /*The query r eturns DEGR*/
:CURSor:MANual:VUNit?
Description
Set or query the vertical unit in the manual curs or measurement mode.
Name
Type
Range
Default
<unit>
Discrete
{PERCent|SOURce}
SOURce
automatically set to the unit of the current source.
Format
:CURSor:MANual:VUNit? /*The query returns PERC*/
:CURSor:MANual:SOURce
Syntax :C URS or :MA Nua l :SOURce <source >
Parameter
{CHANnel1|CHANnel2|MATH}
Return
Example
The query returns CHAN1, CHAN2, or MATH.
:CURSor:MANual:SOURce CHANnel2 /*Set the channel source to CH2*/
:CURSor:MANual:TUNit
Syntax :CURSor:MANua l:TUNit <unit>
Parameter
Explanation S: AX, BX, and BX-AX in the measurement results are in "s" and 1/|dX| is in "Hz".
HZ: AX, BX, and BX-AX in the measurement results are in "Hz" and 1/|dX| is in "s". DEGRee: AX, BX, and BX-AX are in "degree".
Return
The query returns S, HZ, DEGR, or PERC.
Example
:CURSor:MANual:TUNit DEGRee /*Set the horizontal unit to "degree"*/
:CURSor:MANual:VUNit
Syntax :CURSor:MANua l:VUNit <unit>
Parameter
Explanation PERCent: AY, BY, and BY-AY in the measurement res ults are expressed in percentage.
SOURce: the units of AY, BY, and BY-AY in the measurement results will be
Return
Example
The query returns PERC or SOUR.
:CURSor:MANual:VUNit PERCent /*Set the system to express AY, BY, and BY-AY in the
measurement results in percentage*/
DS1000Z-E Programming Guide 2-17
RIGOL Chapter 2 Command System
:CURSor:MANual:AX?
Description
Set or query the horizontal position of cursor A in the manual cursor measurement mode.
Name
Type
Range
Default
<x>
Integer
5 to 594
100
pixel range is from 0 to 400.
Format
:CURSor:MANual:AX? /*The query returns 200*/
:CURSor:MANual:BX?
Description
Set or query the horizontal position of cursor B in the manual cursor measurement mode.
Name
Type
Range
Default
<x>
Integer
5 to 594
500
pixel range is from 0 to 400.
Format
:CURSor:MANual:BX? /*The query returns 200*/
:CURSor:MANual:AY?
Description
Set or query the vertical position of cursor A in the manual curs or measurement mode.
Name
Type
Range
Default
<y>
Integer
5 to 394
100
Explanation
The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
Related
:CHANnel<n>:UNITs
Command
:CURSor:MANual:AX
Syntax :CURS o r:MANual:AX <x>
Parameter
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wher ein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
The query returns an integer between 5 and 594.
:CURSor:MANual:AX 200 /*Set the horizontal position of cursor A to 200*/
:CURSor:MANual:BX
Syntax :CURSor:MANual:BX <x>
Parameter
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
The query returns an integer between 5 and 594.
:CURSor:MANual:BX 200 /*Set the horizontal position of cursor B to 200*/
:CURSor:MANual:AY
Syntax :CURSor:MANual:AY <y>
Parameter
2-18 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein,
pixel range is from 0 to 400.
Format
:CURSor:MANual:AY? /*The query returns 200*/
:CURSor:MANual:BY?
Description
Set or query the vertical position of cursor B in the manual cursor measurement mode.
Name
Type
Range
Default
pixel range is from 0 to 400.
Format
:CURSor:MANual:BY? /*The query returns 200*/
Syntax
:CURSor:MANual:AXValue?
on the horizontal unit currently selected.
Format
Example
:CURSor:MANual:AXValue? /*The query returns -4.000000e-06*/
:CURSor:MANual:TUNit
Syntax
:CURSor:MANual:AYValue?
on the vertical unit currently selected.
Format
cursor A in scientific notation.
Example
:CURSor:MANual:AYValue? /*The query returns 2.000000e+00*/
:CURSor:MANual:VUNit
(0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
The query returns an integer between 5 and 394.
:CURSor:MANual:AY 200 /*Set the vertical position of cursor A to 200*/
:CURSor:MANual:BY
Syntax :CURSor:MANual:BY <y>
Parameter
<y> Integer 5 to 394 300
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
The query returns an integer between 5 and 394.
:CURSor:MANual:BY 200 /*Set the vertical positio n of cursor B to 200*/
:CURSor:MANual:AXValue?
Description Query the X value of cursor A in the manual cursor measurement mode. The unit depends
Return
Related
The query returns the X value of cursor A in scientific notation.
:CURSor:MANual:AX
Commands
:CURSor:MANual:AYValue?
Description Query the Y value of cursor A in the manual cursor measurement mode. T he unit depends
Return
Related
Commands
When the signal source is CHANnel1|CHANnel2|MATH, the query returns t he Y va lue of
:CURSor:MANual:AY
DS1000Z-E Programming Guide 2-19
RIGOL Chapter 2 Command System
Syntax
:CURSor:MANual:BXValue?
on the horizontal unit currently selected.
Format
Example
:CURSor:MANual:BXValue? /*The query returns 4.000000e-06*/
:CURSor:MANual:TUNit
Syntax
:CURSor:MANual:BYValue?
on the vertical unit currently selected.
Format
cursor B in scientific notation.
Example
:CURSor:MANual:BYValue? /*The query returns -2.000000e+00*/
:CURSor:MANual:VUNit
Syntax
:CURSor:MANual:XDELta?
cursor measurement mode. The unit depends o n the horizontal u nit currently selected.
Format
Example
:CURSor:MANual:XDELta? /*The query returns 8.000000e-06*/
:CURSor:MANual:TUNit
Syntax
:CURSor:MANual:IXDELta?
the horizontal unit currently selected.
Format
Example
:CURSor:MANual:IXDELta? /*The query returns 1.250000e+05*/
:CURSor:MANual:TUNit
:CURSor:MANual:BXValue?
Description Query the X value of cursor B in the manual cursor measurement mode. The u nit depend s
Return
Related
Commands
The query returns the X value of cursor B in scientific notation.
:CURSor:MANual:BX
:CURSor:MANual:BYValue?
Description Query the Y value of cursor B in the manual cursor measurement mode. Th e unit depends
Return
Related
Commands
When the signal source is CHANnel1|CHANnel2|MATH, the query returns the Y value of
:CURSor:MANual:BY
:CURSor:MANual:XDELta?
Description Query the difference between the X v alues of cursor A and cursor B (BX-AX) in the manual
Return
Related
Commands
The query returns the difference in scientific notation.
:CURSor:MANual:AX :CURSor:MANual:BX
:CURSor:MANual:IXDELta?
Description Query the reciprocal of the absolute v alue of the diff erence between the X v alues of cursor
A and cursor B (1/|dX|) in the manual cursor measurement mode. The unit depends on
Return
Related
Commands
The query returns 1/|dX| in scientific notation.
:CURSor:MANual:AX :CURSor:MANual:BX
2-20 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Syntax
:CURSor:MANual:YDELta?
cursor measurement mode. The unit depends o n the vertical unit currently selected.
Format
scientif ic notation.
Example
:CURSor:MANual:YDELta? /*The quer y returns -4.000000e+00*/
:CURSor:TRACk:SOURce1?
Description
Set or query the channel source of cursor A in the track cursor measurement mode.
Name
Type
Range
Default
Explanation
Only the channels enabled can be selected as the channel source.
Format
:CURSor:TRACk:SOURce1? /*The query returns CHAN2*/
:CURSor:MANual:YDELta?
Description Query the difference between the Y valu es of cursor A and cursor B (BY-AY) in the manual
Return
Related
Commands
When the signal source is CHANnel1|CHANnel2|MATH, the query returns the difference in
:CURSor:MANual:AY :CURSor:MANual:BY :CURSor:MANual:VUNit

:CURSor:TRACk

Command List:
:CURSor:TRACk:SOURce1:CURSor:TRACk:SOURce2 :CURSor:TRACk:AX:CURSor:TRACk:BX :CURSor:TRACk:AY?:CURSor:TRACk:BY?:CURSor:TRACk:AXValue?:CURSor:TRACk:AYValue? :CURSor:TRACk:BXValue? :CURSor:TRACk:BYValue?:CURSor:TRACk:XDELta?:CURSor:TRACk:YDELta? :CURSor:TRACk:IXDELTA?
:CURSor:TRACk:SOURce1
Syntax :CURSor:TRACk: SOURce1 <source>
Parameter
<source> Discrete {OFF|CHANnel1|CHANnel2|MATH} CHANnel1
Return
The query returns OFF, CHAN1, CHAN2, or MATH.
Example
:CURSor:TRACk: SO UR ce 1 CH ANne l 2 /*Set the channel source to CH2*/
DS1000Z-E Programming Guide 2-21
RIGOL Chapter 2 Command System
:CURSor:TRACk:SOURce2?
Description
Set or query the channel source of cursor B in the track cursor measurement mode.
Name
Type
Range
Default
Explanation
Only the channels enabled can be selected as the channel source.
Format
:CURSor:TRACk:SOURce2? /*The query returns CHAN2*/
:CURSor:TRACk:AX?
Description
Set or query the horizontal position of cursor A in the track cursor measurement mode.
Name
Type
Range
Default
<x>
Integer
5 to 594
100
pixel range is from 0 to 400.
Format
:CURSor:TRACk:AX? /*The query returns 200*/
:CURSor:TRACk:BX?
Description
Set or query the horizontal position of cursor B in the track cursor measurement mode.
Name
Type
Range
Default
pixel range is from 0 to 400.
Format
:CURSor:TRACk:BX? /*The query returns 200*/
:CURSor:TRACk:SOURce2
Syntax :CURSor:TRACk:SOURce2 <source>
Parameter
<source> Discrete {OFF|CHANnel1|CHANnel2|MATH} CHANnel1
Return
Example
The query returns OFF, CHAN1, CHAN2, or MATH.
:CURSor:TRACk:SOURce2 CHANnel2 /*Set the channel source to CH2*/
:CURSor:TRACk:AX
Syntax :CURSor:TRACk:AX <x>
Parameter
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
The query returns an integer between 5 and 594.
:CURSor:TRACk:AX 200 /*Set the horizontal position of cursor A to 200*/
:CURSor:TRACk:BX
Syntax :CURSor:TRACk:BX <x>
Parameter
<x> Integer 5 to 594 500
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate of
the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical
Return
Example
2-22 DS1000Z-E Programming Guide
The query returns an integer between 5 and 594.
:CURSor:TRACk:BX 200 /*Set the horizontal position of cursor B to 200*/
Chapter 2 Command System RIGOL
Syntax
:CURSor:TRACk:AY?
Description
Query the vertical position of cursor A in the track cursor measurement mode.
Format
Example
:CURSor:TRACk:AY? /*The query retur ns 284*/
Syntax
:CURSor:TRACk:BY?
Description
Query the vertical position of cursor B in the track cursor measurement mode.
returns 4294967295.
Format
Example
:CURSor:TRACk:BY? /*The query returns 200*/
Syntax
:CURSor:TRACk:AXValue?
Description
Query the X value of cursor A in the track cursor measurement mode. The default unit is s.
Format
Example
:CURSor:TRACk:AXValue? /*The query returns -4.000000e-06*/
Command
Syntax
:CURSor:TRACk:AYValue?
as the channel unit currently selected.
Format
:CURSor:TRACk:AY?
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate
of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
When cursor A exceeds the vertical range of the screen display, the query always
returns 4294967295.
Return
The query returns an integer.
:CURSor:TRACk:BY?
Explanation The horizontal and vertical positions of the cursor are defined by the pixel coordinate
of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the lef t top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
When cursor B exceeds the vertical range of the screen display, the query always
Return
The query returns an integer.
:CURSor:TRACk:AXValue?
Return
Related
The query returns t he X value of cursor A in s cie ntific notation.
:CURSor:TRACk:AX
:CURSor:TRACk:AYValue?
Description Query the Y value of cursor A in the track cursor measurement mode. The unit is the same
Return
DS1000Z-E Programming Guide 2-23
The query returns the Y value of cursor A in scientific notation.
RIGOL Chapter 2 Command System
Example
:CURSor:TRACk:AYValue? /*The query returns -4.000000e-01*/
:CURSor:TRACk:AY?
Syntax
:CURSor:TRACk:BXValue?
Description
Query the X value of cursor B in the track cursor measurement mode. The default unit is s.
Format
Example
:CURSor:TRACk:BXValue? /*The query returns 4.000000e-06*/
Command
Syntax
:CURSor:TRACk:BYValue?
as the channel unit currently selected.
Format
Example
:CURSor:TRACk:BYValue? /*The query returns 4.000000e-01*/
:CURSor:TRACk:BY?
Syntax
:CURSor:TRACk:XDELta?
cursor measurement mode. The default unit is s.
Format
Example
:CURSor:TRACk:XDELta? /*The query returns 8.000000e-06*/
:CURSor:TRACk:BX
Syntax
:CURSor:TRACk:YDELta?
cursor measurement mode. The unit is the same as the channel unit currently selected.
Format
Example
:CURSor:TRACk:YDELta? /*The query returns 8.000000e-01*/
Related
Commands
:CHANnel<n>:UNITs
:CURSor:TRACk:BXValue?
Return
Related
The query returns t he X value of cursor B in scientific notation.
:CURSor:TRACk:BX
:CURSor:TRACk:BYValue?
Description Query the Y value of cursor B in the track cursor measurement mode. The unit is the same
Return
The query returns the Y value of cursor B in scient ific notation.
Related
Commands
:CHANnel<n>:UNITs
:CURSor:TRACk:XDELta?
Description Query the difference between the X values of cursor A and cursor B (BX-AX) in the track
Return
Related
Commands
The query returns the difference in scientific notation.
:CURSor:TRACk:AX
:CURSor:TRACk:YDELta?
Description Quer y the difference between the Y values of cursor A and cursor B (BY-AY) in the track
Return
2-24 DS1000Z-E Programming Guide
The query returns the difference in scientific notation.
Chapter 2 Command System RIGOL
:CURSor:TRACk:BY?
Syntax
:CURSor:TRACk:IXDELTA?
A and cursor B (1/|dX|) in the track cursor measurement mode. The default unit is Hz.
Format
Example
:CURSor:TRACk:IXDELTA? /*The query returns 1.250000e+05*/
:CURSor:TRACk:BX
Related
:CURSor:TRACk:AY?
Commands
:CURSor:TRACk:IXDELTA?
Description Query the reciprocal o f the absolute v alue of the differ ence between the X v alues of cursor
Return
Related
The query returns 1/|dX| in scientific notation.
:CURSor:TRACk:AX
Commands

:CURSor:AUTO

Command List:
:CURSor:AUTO:ITEM:CURSor:AUTO:AX? :CURSor:AUTO:BX? :CURSor:AUTO:AY?:CURSor:AUTO:BY?:CURSor:AUTO:AXValue?:CURSor:AUTO:AYValue? :CURSor:AUTO:BXValue? :CURSor:AUTO:BYValue?
:CURSor:AUTO:ITEM
Syntax :C URS or :AU TO:ITEM <ite m >
:CURSor:AUTO:ITEM?
Description
Parameter
The auto cursor function can measure 37 waveform parameters. Using this command, you can select the parameters to be measured by the auto cursor from the five parameters enabled last or query the par ameters c urren tly measu red by the auto cursor.
Name Type Range Default
<item>
Discrete
{OFF|ITEM1|ITEM2|ITEM3|ITEM4|ITEM5}
OFF
DS1000Z-E Programming Guide 2-25
RIGOL Chapter 2 Command System
Vrms, Variance.
Syntax
:CURSor:AUTO:AX?
Description
Query the horizontal position of cursor A in auto cursor measurement.
measurement items. At this point, the query returns 4294967295.
Format
Syntax
:CURSor:AUTO:BX?
Description
Query the horizontal position of cursor B in auto cursor measurement.
measurement items. At this point, the query returns 4294967295.
Format
Explanation This command is only valid when the auto cursor mode is selected. You can select
the auto cursor measurement mode using the
The 37 waveform parameters are listed below (see the detailed introduction
in
:MEASure Commands). The parameters can be enabled by the :MEASure:ITEM
command. Period, Frequency, Rise Time, Fall Time, +Width, -Width, +Duty, -Duty, +Pulses,
-Pulses, +Edges, -Edges, tVmax, tVmin, +Rate, +Rate, Delay
12, Phase 12, Phase 12, Vmax, Vmin, Vpp, Vtop, Vbase, Vamp, Vupper, Vmid, Vlower, Vavg, Vrms, Overshoot, Preshoot, Area, Period Area, Period
:CURSor:MODE command.
12, Delay
Return
Format
Example :CURSor:AUTO:ITEM ITEM3 /*Use auto cursor to measure ITEM3*/
The query returns OFF, ITEM1, ITEM2, ITEM3, ITEM4, or ITEM5.
:CURSor:AUTO:ITEM? /*The query returns ITEM3*/
:CURSor:AUTO:AX?
Explanation The horizontal and vertical positions of the c ursor a r e defined by t he pixel
coordinate of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
In auto cursor measurement, cursor A of X type is not required for some of the
Return
The query returns a n integer between 5 and 594.
:CURSor:AUTO:BX?
Explanation The horizontal and vertical positions of the c ursor a r e defined by t he pixel
coordinate of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
In auto cursor measurement, cursor B of X type is not required for some of the
Return
2-26 DS1000Z-E Programming Guide
The query returns a n integer between 5 and 594.
Chapter 2 Command System RIGOL
Syntax
:CURSor:AUTO:AY?
Description
Query the vertical position of cursor A in auto cursor measurement.
Format
Syntax
:CURSor:AUTO:BY?
Description
Query the vertical position of cursor B in auto curs or me a sure me nt.
measurement items. At this point, the query returns 4294967295.
Format
Syntax
:CURSor:AUTO:AXValue?
horizontal unit curr ently selected .
measurement items. At this point, the query returns 9.9E37.
Format
Example
:CURSor:AUTO:AXValue? /*The query returns -4.000000e-06*/
Syntax
:CURSor:AUTO:AYValue?
vertical unit currently selected.
measurement items. At this point, the query returns 9.9E37.
Format
:CURSor:AUTO:AY?
Explanation The horizontal and vertical positions of the c ursor a r e defined by t he pixel
coordinate of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
In auto cursor measurement, cursor A of Y type is not required for some of the
measurement items. At this point, the query returns 4294967295.
Return
The query returns a n integer between 5 and 394.
:CURSor:AUTO:BY?
Explanation The horizontal and vertical positions of the c ursor a r e defined by t he pixel
coordinate of the screen. The pixel coordinate of the screen ranges from (0,0) to (600,400). Wherein, (0,0) is located at the left top corner of the screen and (600,400) is located at the right bottom corner of the screen. The horizontal pixel range is from 0 to 600 and the vertical pixel range is from 0 to 400.
In auto cursor measurement, cursor B of Y type is not required for some of the
Return
The query returns a n integer between 5 and 394.
:CURSor:AUTO:AXValue?
Description Quer y the X value of cursor A in auto cursor measurement. The unit depends on the
Explanation In auto cursor measurement, cursor A of X type is not required for some of the
Return
The query returns the X value of cursor A in scientific notation.
:CURSor:AUTO:AYValue?
Description Quer y the Y value of cursor A in auto cursor measurement. The unit depends on t he
Explanation In auto cursor measurement, cursor A of Y type is not required for some of the
Return
DS1000Z-E Programming Guide 2-27
The query returns the Y value of cursor A in scientific notation.
RIGOL Chapter 2 Command System
Example
:CURSor:AUTO:AYValue? /*The query returns -4.000000e-01*/
Syntax
:CURSor:AUTO:BXValue?
horizontal unit currently selected.
measurement items. At this point, the query returns 9.9E37.
Format
Example
:CURSor:AUTO:BXValue? /*The query returns -4.000000e-06*/
Syntax
:CURSor:AUTO:BYValue?
vertical unit currently selected.
measurement items. At this point, the query returns 9.9E37.
Format
Example
:CURSor:AUTO:BYValue? /*The query returns 4.000000e-01*/
:CURSor:AUTO:BXValue?
Description Quer y the X value of cursor B in auto cursor measurement. The unit depends on the
Explanation In auto cursor measurement, cursor B of X type is not required for some of the
Return
The query returns the X value of cursor B in scientific notation.
:CURSor:AUTO:BYValue?
Description Quer y the Y value of cursor B in auto cursor measurement. The unit depends on the
Explanation In auto cursor measurement, cursor B of Y type is not required for some of the
Return
The query returns the Y value of cursor B in scient ific notation.
2-28 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:CURSor:XY:AX?
Description
Set or query the horizontal position of cursor A in the XY cursor measurement mode.
Name
Type
Range
Default
to 400.
Format
:CURSor:XY:AX? /*The query returns 200*/
:CURSor:XY:BX?
Name
Type
Range
Default
to 400.
Format

:CURSor:XY

The :CURSor:XY commands can only be used when the horizontal timebase mode is XY. Command List:
:CURSor:XY:AX :CURSor:XY:BX :CURSor:XY:AY :CURSor:XY:BY:CURSor:XY:AXValue? :CURSor:XY:AYValue? :CURSor:XY:BXValue? :CURSor:XY:BYValue?
:CURSor:XY:AX
Syntax :CURSor:XY:AX <x>
Parameter
<x> Integer 5 to 394 100
Explanation In the XY timebase mode, the horizontal and vertical positions of the cursor are defined
by the pixel coordinate of the XY display area. The pixel coordinate of the screen ranges from (0,0) to (400,400). Wherein, (0,0) is located at the right top corner and (400,400) is located at the left bottom corner. The horizontal and vertical pixel ranges are both from 0
Return
Example
The query returns an integer between 5 and 394.
:CURSor:XY:AX 20 0 /*Set the horizontal position of cursor A to 200*/
:CURSor:XY:BX
Syntax :CURSor:XY:BX <x>
Description Set or query the horizontal position of cursor B in the XY cursor measurement mode.
Parameter
<x> Integer 5 to 394 300
Explanation In the XY timebase mode, the horizontal and vertical positions of the cursor are defined
by the pixel coordinate of the XY display area. The pixel coordinate of the screen ranges from (0,0) to (400,400). Wherein, (0,0) is located at the right top corner and (400,400) is located at the left bot tom c or ner. The horizontal and ver tic al pi x el r an ges ar e bo th fr om 0
Return
DS1000Z-E Programming Guide 2-29
The query returns an integer between 5 and 394.
RIGOL Chapter 2 Command System
:CURSor:XY:AY?
Description
Set or query the vetical position of cursor A in the XY cursor measurement mode.
Name
Type
Range
Default
<x>
Integer
5 to 394
100
left bottom corner. The horizontal and vertical pixel ranges are both from 0 to 400.
Format
:CURSor:XY:AY? /*The query returns 200*/
:CURSor:XY:BY?
Description
Set or query the vertical position of cursor B in the XY cursor measurement mode.
to 400.
Format
:CURSor:XY:BY? /*The query returns 200*/
Syntax
:CURSor:XY:AXValue?
the amplitude unit of the corresponding channel.
Format
Example
:CURSor:XY:AXValue? /*The query returns 2.000000e+00*/
Command
Example :CURSor:XY:BX 200 /*Set the horizontal position of cur sor B to 200*/
:CURSor:XY:BX? /*The query returns 200*/
:CURSor:XY:AY
Syntax :CURSor:XY:AY <y>
Parameter
Explanation In the XY timebase mode, the horizontal and vertical positions are defined by the pixel
coordinate of the XY display area. The pixel coordinate of the screen ranges from (0,0 ) to (400,400). Wherein, (0,0) is located at the right top corner and (400,400) is located at the
Return
Example
The query returns an integer between 5 and 394.
:CURSor:XY:AY 200 /*Set the vertical position of cursor A to 200*/
:CURSor:XY:BY
Syntax :CURSor:XY:BY <y>
Parameter
Explanation In the XY timebase mode, the horizontal and vertical positions are defined by the pixel
Return
Example
Name Type Range Default
<x> Integer 5 to 394 300
coordinate of the XY display area. The pixel coordinate of the XY display area ranges from (0,0) to (400,4 00). Wherein, (0,0) is located at the right top corner and (400,400) is located at the left bottom corner. The horizontal and vertical pixel ranges ar e both f ro m 0
The query returns an integer between 5 and 394.
:CURSor:XY:BY 200 /*Set the vertical position of cursor B to 200*/
:CURSor:XY:AXValue?
Description Quer y the X value of cursor A in the XY cursor measurement mode. The unit depends on
Return
Related
2-30 DS1000Z-E Programming Guide
The query returns the X value of cursor A in scientific notation.
:CHANnel<n>:UNITs
Chapter 2 Command System RIGOL
Syntax
:CURSor:XY:AYValue?
the amplitude unit of the corresponding channel.
Format
Example
:CURSor:XY:AYValue? /*The query returns 2.000000e+00*/
Command
Syntax
:CURSor:XY:BXValue?
the amplitude unit of the corresponding channel.
Format
Example
:CURSor:XY:BXValue? /*The query returns -2.000000e+00*/
Command
Syntax
:CURSor:XY:BYValue?
the amplitude unit of the corresponding channel.
Format
Example
:CURSor:XY:BYValue? /*The query returns -2.000000e+00*/
Command
:CURSor:XY:AYValue?
Description Quer y the Y value of cursor A in the XY cursor measurement mode. The unit depends on
Return
Related
The query returns the Y value of cursor A in scientific notation.
:CHANnel<n>:UNITs
:CURSor:XY:BXValue?
Description Quer y the X value of cursor B in the XY cursor measurement mode. The unit depends on
Return
Related
The query returns the X value of cursor B in scientific notation.
:CHANnel<n>:UNITs
:CURSor:XY:BYValue?
Description Quer y the Y value of cursor B in the XY cursor measurement mode. The unit depends on
Return
Related
The query returns the Y value of cursor B in scient ific notation.
:CHANnel<n>:UNITs
DS1000Z-E Programming Guide 2-31
RIGOL Chapter 2 Command System
:DECoder<n>:MODE?
Name
Type
Range
Default
Format
:DECoder1:MODE? /*The query returns SPI*/

:DECoder Commands

The :DECoder commands are used to execute decoding settings and operations.
Command List:
:DECoder<n>:MODE:DECoder<n>:DISPlay:DECoder<n>:FORMat:DECoder<n>:POSition:DECoder<n>:THREshold:CHANnel1:DECoder<n>:THREshold:CHANnel2 :DECoder<n>:THREshold:AUTO:DECoder<n>:CONFig:LABel:DECoder<n>:CONFig:LINE:DECoder<n>:CONFig:FORMat:DECoder<n>:CONFig:ENDian:DECoder<n>:CONFig:WIDth:DECoder<n>:CONFig:SRATe? :DECoder<n>:UART:DECoder<n>:IIC:DECoder<n>:SPI :DECoder<n>:PARallel

:DECoder<n>:MODE

Syntax :DECoder<n>:MODE <mode>
Description Set or query the decoder type.
Parameter
<n> Discrete {1|2} -­<mode> Discrete {PARallel|UART|SPI|IIC} PARallel
Explanation PARallel, UART, SPI, and IIC correspond to parallel decoding, RS232 decoding, SPI
decoding, and I2C decoding respectively.
Return
Example
The query returns PAR, UART, SPI, or IIC.
:DECoder1:MODE SPI /*Set the decoder type to SPI*/
2-32 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder<n>:DISPlay?
Description
Turn on or off the decoder or query the status of the decoder.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
Format
:DECoder1:DISPlay? /*The query returns 1*/
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
format is the same as binary.
Format
:DECoder1:FORMat? /*The query returns HEX*/
:DECoder<n>:POSition?
Name
Type
Range
Default
Decoder 2: 300
Return
The query returns an integer between 50 and 350.

:DECoder<n>:DISPlay

Syntax :DE Cod er <n >: DISPl ay <bool>
Parameter
<n> Discrete {1|2} --
Return
Example
The query returns 1 or 0.
:DECoder1:DISPlay ON /*Turn on Decoder 1*/

:DECoder<n>:FORMat

Syntax :DECoder<n>:FORMat <fmt>
:DECoder<n>:FORMat?
Description Set or quer y the bus display format.
Parameter
<fmt> Discrete {HEX|ASCii|DEC|BIN|LINE} ASCii
Explanation HEX: hexade c imal; DEC: decimal; BIN: binary
In LINE format, the actual values of the bus are displayed in binary form and the
order is consistent with the bus transmission order. This format is only valid for serial buses which include LSB and MSB endian. If MSB endian is selected, LINE
Return
The query returns HEX, ASC, DEC, BIN, or LINE.
Example
:DECoder1:FORMat HEX /*Set the bus display format to hexadecimal*/

:DECoder<n>:POSition

Syntax :DECod er<n>:POSit ion <pos>
Description Set or query the vertical position of the bus on the screen.
Parameter
<n> Discrete {1|2} --
<pos> Integer 50 to 350
Explanation The screen is divided into 400 parts vertically which are marked as 0 to 400 from top to
bottom respectively. The range of <pos> is from 50 to 350.
DS1000Z-E Programming Guide 2-33
Decoder 1: 350
RIGOL Chapter 2 Command System
Format
:DECoder1:POSition? /*The query returns 300*/
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
function.
Format
:DECoder1:THREshold:CHANnel1? /*The query returns 1.500000e+00*/
:DECoder<n>:THREshold:AUTO?
the auto threshold function of the analog channels.
Name
Type
Range
Default
manually.
Format
Example
:DECoder1:THREshold:AUTO OFF /*Turn off the auto threshold function*/
Example :DECoder1:POSition 300 /*Set the vertical position of the bus to 300*/
:DECoder<n>:THREshold:CHANnel1 :DECoder<n>:THREshold:CHANnel2
Syntax :DECoder<n>:THREshold:CHANnel1 <thre>
:DECoder<n>:THREshold:CHANnel1? :DECoder<n>:THREshold :CHANnel2 <thre> :DECoder<n>:THREshold:CHANnel2?
Description Set or query the threshold level of the specified analog channel.
Parameter
<thre> Real
(-4 x VerticalScale - VerticalOffset) to (4 x VerticalScale - VerticalOffset)
--
Explanation VerticalScale is the v ertical scale of the specified analog channel. VerticalOffset is the
vertical position of the specified analog channel.
By default, the auto threshold function of the analog channels of the oscilloscope is
turned on. To set the threshold level manually, send
:DECoder<n>:THREshold:AUTO command to turn off the auto threshold
the
Return
Example
The query returns the level in scientific not ation.
:DECoder1:THREshold:CHANnel1 1.5 /*Set the threshold level of CH1 to 1.5V*/

:DECoder<n>:THREshold:AUTO

Syntax :DE C ode r<n>:THREsh ol d:AUTO <bool>
Description Turn on or off the auto threshold function of the analog channels, or query the status of
Parameter
<n> Discrete {1|2} -­<bool> Bool {{1|ON}|{0|OFF}} 1|ON
Explanation By default, the auto threshold function of the a nalog channels of the oscilloscope is
turned on. To set the threshold level manually, send this command to turn off the auto threshold function and use the comma nds in Related Commands to set the threshold
Return
2-34 DS1000Z-E Programming Guide
The query returns 1 or 0.
Chapter 2 Command System RIGOL
:DECoder1:THREshold:AUTO? /*The query returns 0*/
:DECoder<n>:CONFig:LABel?
the bus (when the bus display is turned on).
Format
:DECoder1:CONFig:LABel? /*The query returns 1*/
:DECoder<n>:CONFig:LINE?
Description
Turn on or off the bus display function, or query the status of the bus display function.
Name
Type
Range
Default
Format
:DECoder1:CONFig:LINE? /*The query returns 0*/
:DECoder<n>:CONFig:FORMat?
function.
Related
Commands
:DECoder<n>:THREshold:CHANnel1 :DECoder<n>:THREshold:CHANnel2

:DECoder<n>:CONFig:LABel

Syntax :DECoder<n>:CONFig:LABel <bool>
Description Turn on or off the label display function, or query the status of the label display function.
Parameter
Name Type Range Default
<n> Discrete {1|2} -­<bool> Bool {{1|ON}|{0|OFF}} 1|ON
Explanation When this function is turned on, the bus label will be displayed at the lower-upper side of
Return
Example
The query returns 1 or 0.
:DECoder1:CONFig:LABel ON /*Turn on the label disp lay function*/

:DECoder<n>:CONFig:LINE

Syntax :DECoder<n>:CONFig:LINE <bool>
Parameter
<n> Discrete {1|2} -­<bool> Bool {{1|ON}|{0|OFF}} 1|ON
Explanation When this function is enabled, the bus will be displayed on the screen. You can send
:DECoder<n>:POSition command to adjust the vertical display position of the b us.
the
Return
Example
The query returns 1 or 0.
:DECoder1:CONFig:LINE OFF /*Turn off the bus display function */

:DECoder<n>:CONFig:FORMat

Syntax :DECoder<n>:CONFig:FORMat <bool>
Description Turn on or off the format display function, or query the status of the format display
DS1000Z-E Programming Guide 2-35
RIGOL Chapter 2 Command System
<bool>
Bool
{{1|ON}|{0|OFF}}
1|ON
the :DECoder<n>:FORMat command to set the bus display format.
Format
:DECoder1:CONFig:FORMat? /*The query returns 0*/
:DECoder<n>:CONFig:ENDian?
the endian display function in serial bus decoding.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
the format display (when the bus display is turned on).
Format
:DECoder1:CONFig:ENDian? /*The query returns 1*/
function.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
right of the endian display (when the bus display is turned on).
Format
:DECoder1:CONFig:WIDth? /*The query returns 1*/
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Explanation When this function is turned on, the current bus display format will be displayed at the
right of the label display (when the bus display is turned on). You can send
Return
Example
The query returns 1 or 0.
:DECoder1:CONFig:FORMat OFF /*Turn off the format display functi on*/

:DECoder<n>:CONFig:ENDian

Syntax :DECoder<n>:CONFig:ENDian <bool>
Description Turn on or off the endian display function in serial bus decoding, or query the status of
Parameter
<n> Discrete {1|2} --
Explanation This command is invalid in parallel decoding.
When this function is enabled, the current bus endian will be displayed at the right of
Return
Example
The query returns 1 or 0.
:DECoder1:CONFig:ENDian ON /*Turn on the endian display function*/

:DECoder<n>:CONFig:WIDth

Syntax :DECoder<n>:CONFig:WIDth <bool>
:DECoder<n>:CONFig:WIDth?
Description
Parameter
Turn on or off the width display function, or query the status of the width display
<n> Discrete {1|2} --
Explanation When this function is enable d, the width of each frame of data will be displayed at the
Return
Example
2-36 DS1000Z-E Programming Guide
The query returns 1 or 0.
:DECoder1:CONFig:WIDth ON /*Turn on the width display function*/
Chapter 2 Command System RIGOL
time base.
Format
Example
:DECoder1:CONFig:SRATe? /*The query returns 1.000000e+08*/

:DECoder<n>:CONFig:SRATe?

Syntax :DECoder<n>:CONFig:SRATe?
Description Query the current digital sample rate.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Explanation The digital sample rate is related to the data source currently selected. By default, the
data source is "Trace"; at this point, the digital sample rate is related to the horizontal
Return
The query returns the digital sample rate in scientific notation.
DS1000Z-E Programming Guide 2-37
RIGOL Chapter 2 Command System
:DECoder<n>:UART:TX?
Name
Type
Range
Default
:DECoder1:UART:TX? /*The query returns CHAN2*/
:DECoder<n>:UART:RX?
Name
Type
Range
Default
<n>
Discrete
{1|2}
--

:DECoder<n>:UART

The :DECoder<n>:UART commands are used to set the RS232 decoding parameters.
Command List:
:DECoder<n>:UART:TX:DECoder<n>:UART:RX:DECoder<n>:UART:POLarity :DECoder<n>:UART:ENDian:DECoder<n>:UART:BAUD:DECoder<n>:UART:WIDTh:DECoder<n>:UART:STOP :DECoder<n>:UART:PARity
:DECoder<n>:UART:TX
Syntax :DE C ode r<n>:UART:TX <tx>
Description Set or query the TX channel source of RS232 decoding.
Parameter
<n> Discrete {1|2} --
<tx> Discrete {CHANnel1|CHANnel2|OFF} CHANnel1
Explanation When OFF is selected, no TX channel source will be set. The TX channel source and RX
:DECoder<n>:UART:RX) cannot be both set to OFF.
Return
channel source ( The query returns CHAN1, CHAN2, or OFF.
Format
Example
:DECoder1:UART:TX CHANnel2 /*Set the TX channel source to CH2*/
:DECoder<n>:UART:RX
Syntax :DE C ode r<n>:UART:RX <rx>
Description Set or query the RX chan nel source of RS232 decoding.
Parameter
<rx> Discrete {CHANnel1|CHANnel2|OFF} OFF
Explanation When OFF is selected, no RX channel source will be set. The RX channel source and TX
channel source (
2-38 DS1000Z-E Programming Guide
:DECoder<n>:UART:TX) cannot be both set to OFF.
Chapter 2 Command System RIGOL
:DECoder1:UART:RX? /*The query returns CHAN2*/
:DECoder<n>:UART:POLarity?
Description
Set or query the polarity of RS232 decoding.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
POSitive: positive polarity ( ), namely high level is 1 and low level is 0.
Format
:DECoder1:UART:POLarity? /*The query returns NEG*/
:DECoder<n>:UART:ENDian?
<endian>
Discrete
{LSB|MSB}
LSB
Format
:DECoder1:UART:ENDian? /*The query returns MSB */
:DECoder<n>:UART:BAUD?
Return
The query returns CHAN1, CHAN2, or OFF.
Format
Example
:DECoder1:UART:RX CHANnel2 /*Set the RX channel source to CH2*/
:DECoder<n>:UART:POLarity
Syntax :DECoder<n>:UART:POLarity <pol>
Parameter
<pol> Discrete {NEGative|POSitive} POSitive
Explanation
Return
NEGative: negative polarity (
RS232 standard uses negative polarity.
The query returns NEG or POS.
), namely high level is 0 and low level is 1. The
Example
:DECoder1:UART:POLarity NEGative /*Set the polarity of RS232 decoding to
:DECoder<n>:UART:ENDian
Syntax :DECoder<n>:UART:ENDian <endian>
Description Set or query the endian of RS232 decoding.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Return
Example
The query returns LSB or MSB.
:DECoder1:UART:ENDian MSB /*Set the endian of RS232 decoding to MSB*/
:DECoder<n>:UART:BAUD
negative*/
Syntax :DE C ode r<n>:UART:BAUD <baud>
Description Set or query the buad rate of RS232 decoding. The default uni t is bps (baud per second).
DS1000Z-E Programming Guide 2-39
RIGOL Chapter 2 Command System
Name
Type
Range
Default
<baud>
Integer
110 to 20M
9600
Format
:DECoder1:UART:BAUD? /*The query returns 57600*/
:DECoder<n>:UART:WIDTh?
Description
Set or query the wid th of each frame of data in RS232 deco ding.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<wid>
Integer
5 to 8
8
Format
:DECoder1:UART:WIDTh? /*The query returns 7*/
:DECoder<n>:UART:STOP?
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<stop>
Discrete
{1|1.5|2}
1
Format
:DECoder1:UART:STOP? /*The query returns 1.5*/
:DECoder<n>:UART:PARity?
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
Parameter
<n> Discrete {1|2} --
Return
Example
The query returns the current baud rate in i nteger.
:DECoder1:UART:BAUD 57600 /*Set the buad rate of RS232 decoding to 57600bps*/
:DECoder<n>:UART:WIDTh
Syntax :DECoder<n>:UART:WIDTh <wid>
Parameter
Return
Example
The query returns an integer between 5 and 8.
:DECoder1:UART:WIDTh 7 /*Set the data widt h i n RS232 decoding to 7*/
:DECoder<n>:UART:STOP
Syntax :DEC od er<n>:UART:STOP <stop>
Description Set or query the stop bit after each frame of data in RS232 decoding.
Parameter
Return
Example
The query returns 1, 1.5, or 2.
:DECoder1:UART:STOP 1.5 /*Set the stop bit in RS232 decoding to 1.5*/
:DECoder<n>:UART:PARity
Syntax :DECoder<n>:UART:PARity <parity>
Description Set or query the even-odd check mode of the data transmission in RS232 decoding.
Parameter
<parity> Discrete {NONE|EVEN|ODD} NONE
2-40 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder1:UART:PARity? /*The query returns ODD*/
Return
Format
Example
The query returns NONE, EVEN, or ODD.
:DECoder1:UART:PARity ODD /*Set the even-odd check mode in RS232 decoding to
odd*/
DS1000Z-E Programming Guide 2-41
RIGOL Chapter 2 Command System
:DECoder<n>:IIC:CLK?
:DECoder1:IIC:CLK? /*The query returns CHAN1*/
Name
Type
Range
Default
:DECoder1:IIC:DATA? /*The query returns CHAN1*/

:DECoder<n>:IIC

The :DECoder<n>:IIC commands are used to set the I2C decoding parameters.
Command List:
:DECoder<n>:IIC:CLK:DECoder<n>:IIC:DATA:DECoder<n>:IIC:ADDRess
:DECoder<n>:IIC:CLK
Syntax :DECo de r <n >:IIC:CLK <clk>
Description Set or query the signal source of the clock channel in I2C decoding.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
<clk> Discrete {CHANnel1|CHANnel2} CHANnel1
Return
The query returns CHAN1 or CHAN2.
Format
Example
:DECoder1:IIC:CLK CHANnel1 /*Set the signal source of the clock channe l in I2C
decoding to CH1*/
:DECoder<n>:IIC:DATA
Syntax :DECoder<n>:IIC:DATA <dat>
:DECoder<n>:IIC:DATA?
Description Set or query the signal source of the data chan nel in I2C decoding.
Parameter
<n> Discrete {1|2} --
<dat> Discrete {CHANnel1|CHANnel2} CHANnel2
Return
The query returns CHAN1 or CHAN2.
Format
Example
:DECoder1:IIC:DATA CHANnel1 /*Set the signal source of the data channel in I2C
decoding to CH1*/
2-42 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder<n>:IIC:ADDRess?
Format
:DECoder1:IIC:ADDRess? /*The query returns RW*/
:DECoder<n>:IIC:ADDRess
Syntax :DECoder<n>:IIC:ADDRess <addr>
Description Set or query the address mode of I2C decoding.
Parameter
Name Type Range Default
<n> Discrete {1|2} -­<addr> Discrete {NORMal|RW} NORMal
Explanation NORMal: the address bits (:TRIGger:IIC:AWIDth) does not include the R/W bit.
Return
Example
RW: the address bits ( The query returns NORM or RW.
:DECoder1:IIC:ADDRess RW /*Set the address of I2C decoding to include the R/W
:TRIGger:IIC:AWIDth) includes the R/W bit.
bit*/
DS1000Z-E Programming Guide 2-43
RIGOL Chapter 2 Command System
:DECoder<n>:SPI:CLK?
Name
Type
Range
Default
:DECoder1:SPI:CLK? /*The query returns CHAN1*/
:DECoder<n>:SPI:MISO?
Name
Type
Range
Default

:DECoder<n>:SPI

The :DECoder<n>:SPI commands are used to set the SPI decoding parameters.
Command List:
:DECoder<n>:SPI:CLK:DECoder<n>:SPI:MISO:DECoder<n>:SPI:MOSI:DECoder<n>:SPI:CS:DECoder<n>:SPI:SELect:DECoder<n>:SPI:MODE:DECoder<n>:SPI:TIMeout:DECoder<n>:SPI:POLarity:DECoder<n>:SPI:EDGE:DECoder<n>:SPI:ENDian:DECoder<n>:SPI:WIDTh
:DECoder<n>:SPI:CLK
Syntax :DECoder<n>:SP I:CLK <clk>
Description Set or query the signal source of the clock channel in SPI decoding.
Parameter
<n> Discrete {1|2} --
<clk> Discrete {CHANnel1|CHANnel2} CHANnel1
Return
The query returns CHAN1 or CHAN2.
Format
Example
:DECoder1:SPI:CLK CHANnel1 /*Set the signal sou rce of the clock channel in SPI
decoding to CH1*/
:DECoder<n>:SPI:MISO
Syntax :DE Cod er <n >: SPI:MISO <miso>
Description Set or query the MISO channel source in SPI decoding.
Parameter
<n> Discrete {1|2} --
<miso> Discrete {CHANnel1|CHANnel2|OFF} OFF
2-44 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder1:SPI:MISO? /*The query returns CHAN1*/
:DECoder<n>:SPI:MOSI?
:DECoder1:SPI:MOSI? /*The query returns CHAN1*/
:DECoder<n>:SPI:CS?
Name
Type
Range
Default
:DECoder1:SPI:CS? /*The query returns CHAN2*/
Explanation When OFF is selected, no MISO channel source will be set. The MISO channel source and
MOSI channel source (
:DECoder<n>:SPI:MOSI) cannot be both set to OFF.
Return
The query returns CHAN1, CHAN2, or OFF.
Format
Example
:DECoder1:SPI:MISO CHANnel1 /*Set the MISO channel source in SPI decoding to
CH1*/
:DECoder<n>:SPI:MOSI
Syntax :DECoder <n >:SPI:MO SI <mosi>
Description Set or query the MOSI channel source in SPI decoding.
Parameter
Explanation When OFF is selected, no MOSI channel source will be set. The MOSI channel source and
Name Type Range Default
<n> Discrete {1|2} --
<mosi> Discrete {CHANnel1|CHANnel2|OFF} CHANnel2
MISO channel source (
:DECoder<n>:SPI:MISO) cannot be both set to OFF.
Return
The query returns CHAN1, CHAN2, or OFF.
Format
Example
:DECoder1:SPI:MOSI CHANnel1 /*Set the MOSI channel source in SPI decoding to
CH1*/
:DECoder<n>:SPI:CS
Syntax :DECoder<n>:SP I:CS <cs>
Description Set or query the CS channel source in SPI decoding.
Parameter
<n> Discrete {1|2} --
<cs> Discrete {CHANnel1|CHANnel2} CHANnel1
Explanation This command is only valid in the CS mode (:DECoder<n>:SPI:MODE).
Return
Format
The query returns CHAN1 or CHAN2.
Example
:DECoder1:SPI:CS CHANnel2 /*Set the CS channel source in SPI decoding to CH2*/
DS1000Z-E Programming Guide 2-45
RIGOL Chapter 2 Command System
:DECoder<n>:SPI:SELect?
<n>
Discrete
{1|2}
--
<CsNcs>
Discrete
{NCS|CS}
NCS
This command is only valid in the CS mode (:DECoder<n>:SPI:MODE).
Format
:DECoder1:SPI:SELect? /*The q uery returns CS*/
:DECoder<n>:SPI:MODE?
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
timeout time.
Format
:DECoder1:SPI:MODE? /*The query returns CS*/
:DECoder<n>:SPI:TIMeout?
Description
Set or query the timeout time in the timeou t mode of SPI decoding. The default unit is s.
:DECoder<n>:SPI:SELect
Syntax :DE C ode r<n>:SPI:SE Le ct <C s Ncs>
Description Set or query the CS polarity in SPI decoding.
Parameter
Explanation
Name Type Range Default
NCS: low level is valid (
). The instrument starts transmitting data when the
CS is low.
CS: high level is valid (
). The instrument starts transmitting data when the
CS is high.
Return
Example
The query returns NCS or CS.
:DECoder1:SPI:SELect CS /*Set the CS polarity to high level is valid*/
:DECoder<n>:SPI:MODE
Syntax :DECoder<n>:SPI:MODE <CsTmo>
Description Set or query the frame synchronization mode of SPI decoding.
Parameter
<CsTmo> Discrete {CS|TIMeout} TIMeout
Explanation CS: it contains a chip select line (CS). You can perform frame synchronization
according to CS. At this point, you need to send the
:DECoder<n>:SPI:SELect commands to set the CS channel source and polarity.
and
:DECoder<n>:SPI:CS
TIMeout: you can perform frame synchronization according to the timeout time. At
Return
Example
this point, you need to send the
The query returns CS or TIM.
:DECoder1:SPI:MODE CS /*Set the frame synchronization mode of SPI decoding to
:DECoder<n>:SPI:TIMeout command to set the
CS*/
:DECoder<n>:SPI:TIMeout
Syntax :DECoder<n>:SPI:TIMeout <tmo>
2-46 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<tmo>
Real
Refer to Explanation
1.00us
This command is only valid in the timeout mode (:DECoder<n>:SPI:MODE).
Format
:DECoder1:SPI:TIMeout? /*The query returns 5.000000e-06*/
:DECoder<n>:SPI:POLarity?
POSitive: . The high level is 1.
Format
:DECoder1:SPI:POLarity? /*The query returns NEG*/
:DECoder<n>:SPI:EDGE?
Description
Set or query the clock type when the instrument samples the data line in SPI decoding.
Format
:DECoder1:SPI:EDGE? /*The query returns FALL*/
Parameter
Explanation The timeout time should be greater than the maximum pulse width of th e clock and
lower than the idle time between frames.
Return
Example
The query returns the timeout time in scientific notation.
:DECoder1:SPI:TIMeout 0.000005 /*Set the timeout time to 5us*/
:DECoder<n>:SPI:POLarity
Syntax :DECoder<n>:SPI:POLarity <pol>
Description Set or query the polarity of the SDA data line in SPI decoding.
Parameter
Explanation
Return
Example
Name Type Range Default
<n> Discrete {1|2} -­<pol> Discrete {NEGative|POSitive} POSitive
NEGative:
. The low level is 1.
The query returns NEG or POS.
:DECoder1:SPI:POLarity NEG ative /*Set the polarity of the SDA data line in SPI
decoding to negative*/
:DECoder<n>:SPI:EDGE
Syntax :DECoder<n>:SPI:EDGE <edge>
Parameter
Return
Example
DS1000Z-E Programming Guide 2-47
Name Type Range Default
<n> Discrete {1|2} -­<edge> Discrete {RISE|FALL} RISE
The query returns RISE or FALL.
:DECoder1:SPI:EDGE FALL /*Set the instrument to sample data on the falling edge
of the clock in SPI decoding*/
RIGOL Chapter 2 Command System
:DECoder<n>:SPI:ENDian?
Description
Set or query the endian of the SPI decoding data.
<n>
Discrete
{1|2}
--
Format
:DECoder1:SPI:ENDian? /*The query returns MSB*/
:DECoder<n>:SPI:WIDTh?
Description
Set or query the number of bits of each frame of data in SPI decoding.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<wid>
Integer
8 to 32
8
Format
:DECoder1:SPI:WIDTh? /*The query returns 16*/
:DECoder<n>:SPI:ENDian
Syntax :DECod er <n >: SPI:ENDian <endian>
Parameter
Name Type Range Default
<endian> Discrete {LSB|MSB} MSB
Return
Example
The query returns LSB or MSB.
:DECoder1:SPI:ENDian MSB /*Set the data endian of the SPI decoding to MSB*/
:DECoder<n>:SPI:WIDTh
Syntax :DECoder<n>:SPI:WIDTh <wid>
Parameter
Return
The query returns an integer between 8 and 32.
Example
:DECoder1:SPI:WIDTh 16 /*Set the data width in SPI decoding to 16*/
2-48 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder<n>:PARallel:CLK?
Description
Set or query the CLK channel source of parallel decoding.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
:DECoder1:PARallel:CLK? /*The query returns CHAN1*/
:DECoder<n>:PARallel:EDGE?
channel in parallel decoding.
Name
Type
Range
Default
when the channel data jumps.

:DECoder<n>:PARallel

The :DECoder<n>:PARallel commands are used to set the parallel decoding parameters.
Command List:
:DECoder<n>:PARallel:CLK:DECoder<n>:PARallel:EDGE:DECoder<n>:PARallel:WIDTh:DECoder<n>:PARallel:BITX:DECoder<n>:PARallel:SOURce:DECoder<n>:PARallel:POLarity:DECoder<n>:PARallel:NREJect:DECoder<n>:PARallel:NRTime :DECoder<n>:PARallel:CCOMpensation :DECoder<n>:PARallel:PLOT
:DECoder<n>:PARallel:CLK
Syntax :DECoder<n>:PARallel:CLK <clk>
Parameter
<clk> Discrete {CHANnel1|CHANnel2|OFF} CHANnel1
Return
The query returns CHAN1, CHAN2, or OFF.
Format
Example
:DECoder1:PARallel:CLK CHANnel1 /*Set the CLK channel source of parallel
decoding to CH1*/
:DECoder<n>:PARallel:EDGE
Syntax :DECoder<n>:PARallel:EDGE <edge>
Description Set o r query the edge type of the clock channel when the instrument samples the data
Parameter
<n> Discrete {1|2} -­<edge> Discrete {RISE|FALL|BOTH} RISE
Explanation If no clock channel is selected (:DECoder<n>:PARallel:CLK), the instrument will sample
DS1000Z-E Programming Guide 2-49
RIGOL Chapter 2 Command System
:DECoder1:PARallel:EDGE? /*The query returns BOTH*/
parallel bus.
Name
Type
Range
Default
<wid>
integer
1 to 16
8
source for each bit respectively.
Format
:DECoder1:PARallel:WIDTh? /*The query returns 16*/
:DECoder<n>:PARallel:BITX?
Name
Type
Range
Default
set the channel source of this bit.
Format
:DECoder1:PARallel:BITX? /*The query returns 2*/
:DECoder<n>:PARallel:SOURce?
Return
The query returns RISE, FALL, or BOTH.
Format
Example
:DECoder1:PARallel:EDGE BOTH /*Set the oscilloscope to sample data on any edge
of the clock channel in parallel decoding*/
:DECoder<n>:PARallel:WIDTh
Syntax :DECoder<n>:PARallel:WIDTh <wid >
:DECoder<n>:PARallel:WIDTh?
Description
Parameter
Explanation After setting the data width using this command, send the :DECoder<n>:PARallel:BITX
Return
Set or query the data width (namely the number of bits of each frame of data) of the
<n> Discrete {1|2} --
:DECoder<n>:PARallel:SOURce commands to sele ct each bit and set the channel
and
The query returns an integer between 1 and 16.
Example
:DECoder1:PARallel:WIDTh 16 /*Set the data width in parallel decoding to 16*/
:DECoder<n>:PARallel:BITX
Syntax :DECoder<n>:PARallel:BITX <bi t>
Description Set or query the data bit that requires a channel source on the parallel bus.
Parameter
<n> Discrete {1|2} -­<bit> Integer 0 to (data width - 1) 0
Explanation Set the data width using the :DECoder<n>:PARallel:WIDTh command.
Return
Example
After selecting the desired bit, send the
The query returns the current data bit in integer.
:DECoder1:PARallel:BITX 2 /*Set the current bit to 2*/
:DECoder<n>:PARallel:SOURce command to
:DECoder<n>:PARallel:SOURce
Syntax :DECoder<n>:PARallel:SOURce <src>
Description Set r o query the channel source of the data bit currently selected.
2-50 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Name
Type
Range
Default
selected
the desired data bit.
:DECoder1:PARallel:SOURce? /*The query returns CHAN2*/
:DECoder<n>:PARallel:POLarity?
Description
Set ro query the data polarity of parallel decoding.
<n>
Discrete
{1|2}
--
<pol>
Discrete
{NEGative|POSitive}
POSitive
POSitive: . The high level is 1.
Format
:DECoder1:PARallel:POLarity? /*The query returns NEG*/
:DECoder<n>:PARallel:NREJect?
noise rejection function of parallel decoding.
Parameter
<n> Discrete {1|2} --
Related to
<src> Discrete {CHANnel1|CHANnel2|}
the bit
Explanation Before sending this command, use the :DECoder<n>:PARallel:BITX command to select
Return
The query returns CHAN1 or CHAN2.
Format
Example
Related
:DECoder1:PARallel:SOURce CHANnel2 /*Set the channel source of the current bit to
:DECoder<n>:PARallel:WIDTh
Command
:DECoder<n>:PARallel:POLarity
Syntax :DECoder<n>:PARallel:POLarity <pol>
Parameter
Explanation
Name Type Range Default
NEGative:
. The low level is 1.
CH2*/
Return
Example
The query returns NEG or POS.
:DECoder1:PARallel:POLarity NEGative /*Set the data polarity of parallel decoding to
negative*/
:DECoder<n>:PARallel:NREJect
Syntax :DECoder<n>:PARallel:NREJect <bool>
Description Turn on or off the noise rejection function of parallel decoding, or query the status of the
Parameter
Explanation Noise rejection can remove the dat a without enough duration on the bus to
Name Type Range Default
<n> Discrete {1|2} -­<bool> Bool {{1|ON}|{0|OFF}} 0|OFF
eliminate the glitches of the actual circuit.
DS1000Z-E Programming Guide 2-51
RIGOL Chapter 2 Command System
Format
:DECoder1:PARallel:NREJect? /*The query returns 1*/
:DECoder<n>:PARallel:NRTime?
Name
Type
Range
Default
turn on the noise rejection function.
Format
:DECoder1:PARallel:NRTime? /*The query returns 1.000000e-02*/
:DECoder<n>:PARallel:CCOMpensation?
Name
Type
Range
Default
(:DECoder<n>:PARallel:CLK).
Format
:DECoder1:PARallel:CCOMpensation? /*The query returns 1.000000e-02*/
When the noise rejection is turned on, sending t he :DECoder<n>:PARallel:NRTime
command can set the desired rejection time.
Return
Example
The query returns 1 or 0.
:DECoder1:PARallel:NREJect ON /*Turn on the noise rejection function*/
:DECoder<n>:PARallel:NRTime
Syntax :DECoder<n>:PARallel:NRTime <time>
Description Set or quer y the noise rejection time of parallel decoding. The default unit is s.
Parameter
<n> Discrete {1|2} -­<time> Real 0.00s to 100ms 0.00s
Explanation Before sending this command, send the :DECoder<n>:PARallel:NREJect command to
Return
Example
The query returns t he noise rejection time in scientific notation.
:DECoder1:PARallel:NRTime 0.01 /*Set the noise rejection time to 10ms*/
:DECoder<n>:PARallel:CCOMpensation
Syntax :DECoder<n>:PARallel:CCOMpensation <comp>
Description Set or query the clock compensation time of parallel decoding. The default unit is s.
Parameter
<n> Discrete {1|2} -­<comp> Real -100ms to 100ms 0.00s
Explanation Setting the compensation time can make fine adjustment of the pahse deviation
between the clock line and data line.
This command is invalid when the CLK channel source is set to OFF
Return
Example
The query returns the compensation time in scientific notation.
:DECoder1:PARallel:CCOMpensation 0.01 /*Set the compensation time to 10ms*/
2-52 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DECoder<n>:PARallel:PLOT?
function of parallel decoding.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
diagram form.
Format
:DECoder<n>:PARallel:PLOT
Syntax :DECoder<n>:PARallel:PLOT <bool>
Description Turn on or off the curve function of parallel decoding, or query the status of t he curve
Parameter
Explanation When this function is turned on, the variation trend of the bus data is displayed in vector
Return
The query returns 1 or 0.
Example :DECoder1:PARallel:PLOT ON /*Turn on the curve function*/
:DECoder1:PARallel:PLOT? /*The query returns 1*/
DS1000Z-E Programming Guide 2-53
RIGOL Chapter 2 Command System
Syntax

:DISPlay:CLEar

Description
Clear all the waveforms on the screen.
the :CLEar comm and can also clear all the waveforms on the screen.
Command

:DISPlay Commands

The :DISPlay commands can be used to set the waveform display mode, persistence time, waveform intensity, screen grid type and grid brightness.
Command List:
:DISPlay:CLEar:DISPlay:DATA? :DISPlay:TYPE:DISPlay:GRADing:TIME:DISPlay:WBRightness:DISPlay:GRID:DISPlay:GBRightness
:DISPlay:CLEar
Explanation If the oscilloscope is in the RUN state, waveform will still be displayed.
This command is equivalent to pressing the CLEAR key on the front p ane l. Se ndi ng
Related
:RUN
2-54 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Syntax
:DISPlay:DATA? [<color>,<invert>,<format>]
invert display, and format of the image acquired.
Name
Type
Range
Default
<color>
Bool
{ON|OFF}
ON
<invert>
Bool
{{1|ON}|{0|OFF}}
0|OFF
<format>
Discrete
{BMP24|BMP8|PNG|JPEG|TIFF}
BMP24
image currently displayed to the buffer area of the PC.
effective data.
example)
bitmap file header.
4. The terminator '\n'(0X0A) at the end of the data should be removed.

:DISPlay:DATA?

Description Read the data stream of the image currently displayed on the screen and set the color,
Parameter
Explanation <color>: color of the image; ON denotes color and OFF denotes intensity graded
color. <invert>: the invert function; 1|ON denotes turning on the invert function and 0|OFF denotes turning off the invert function.
When [<color>,<invert>,<format>] is omitted, by default, the image color
:STORage:IMAGe:COLor) and the status of the invert function
(
:STORage:IMAGe:INVERT) currently selected are used and the image format is set
( to BMP24.
The command is sent from the PC to the instrument through the VISA interface. The
instrument responds to the command and directly returns the data stream of the
Return
Format
The format of the data stream is as follows.
Component Size (length) Example Explanation
TMC Blockheader ::= #NXXXXXX is used to describe the length of the data stream. Wherein, # is the start denoter of the data stream; N
is less than or equal to 9 and the N TMC Blockheader
[1]
+2 #9001152054
N
figures following it denote the
length of the data stream in bytes.
For example, #9001152054;
wherein, N is 9 and 001152054
denotes that the data stream
contains 1152054 bytes of
Image Data (take BMP24 as an
[1]
Note
"#" in #9001152054.
Note
: N is the width of the data length in the TMC header. For example, the number "9" behind
[2]
: The width is 800, the height is 480, the bit depth is 24 bit = 3 byte, 54 is the size of the
800x480x3+54 =1152054
[2]
BM… Specific image data.
Example 1. Make sure that the buffer is large enough to receive the data stream, otherwise the
program might be abnormal when reading the data stream.
2. The returned data stream contains the TMC data header which should be removed to make the data stream a standard image data stream.
3. When the data size is larger than 1 M and the communication speed of the interface is not fast enough, you need to set an appropriate timeout time.
DS1000Z-E Programming Guide 2-55
RIGOL Chapter 2 Command System
:DISPlay:TYPE?
Description
Set or query the display mode of the waveform on the screen.
Name
Type
Range
Default
the sample points are connected by lines. Normally, this mode can provide
and use the cursor to measure the X and Y values of the sample point.
Format
:DISPlay:TYPE? /*The query returns DOTS*/

:DISPlay:TYPE

Syntax :DISPlay:TYPE <type>
Parameter
<type> Discrete {VECTors|DOTS} VECTors
Explanation VECTors:
the most vivid waveform to view the steep edge of the waveform (such as square waveform).
DOTS: display the sample points directly. You can directly view each sample point
Return
Example
The query returns VECT or DOTS.
:DISPlay:TYPE DOTS /*Select dots display mode*/
2-56 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:DISPlay:GRADing:TIME?
Description
Set or query the persistence time. The default unit is s.
Name
Type
Range
Default
and jitter as well as capture incidental events.
Format
:DISPlay:GRADing:TIME? /*The query returns 0.1*/
:DISPlay:WBRightness?
Description
Set or query the waveform brightness.
Name
Type
Range
Default
Format
:DISPlay:WBRightness? /*The query returns 50*/

:DISPlay:GRADing:TIME

Syntax :DISPlay:GRADing:TIME <time>
Parameter
<time> Discrete {MIN|0.1|0.2|0.5|1|5|10|INFinite} MIN
Explanation MIN: set the persistence time to it s minim um to v iew the w av efo rm changing in h igh
refresh rate.
Specific Values: set the persistence time to one of the values listed above to observe
glitch that changes relatively slowly or glitch with low occurrence probability.
INFinite: in this mode, the oscilloscope displa ys the newly acquired waveform
without clearing the waveform formerly acquired. It can be used to measure noise
Return
Example
The query returns MIN, 0.1, 0.2, 0.5, 1, 5, 10, or INF.
:DISPlay:GRADing:TIME 0.1 /*Set the persistence time to 0.1s*/

:DISPlay:WBRightness

Syntax :DISPlay:WBRightness <time>
Parameter
<time> Integer 0 to 100 60
Return
Example
The query returns an integer between 0 and 100.
:DISPlay:WBRightness 50 /*Set the waveform brightness to 50%*/
DS1000Z-E Programming Guide 2-57
RIGOL Chapter 2 Command System
:DISPlay:GRID?
Description
Set or query the grid type of screen display.
Name
Type
Range
Default
<grid>
Discrete
{FULL|HALF|NONE}
FULL
NONE: turn the background grid and coordinate off.
Format
:DISPlay:GRID? /*The query returns NONE*/
:DISPlay:GBRightness?
Description
Set or query the brightness of the screen grid.
Name
Type
Range
Default
Format
:DISPlay:GBRightness? /*The query returns 60*/

:DISPlay:GRID

Syntax :DISP la y:GR ID <gr id >
Parameter
Explanation FULL: turn the backg round grid and coordinate on.
HALF: turn the background grid off and coordinate on.
Return
Example
The query returns FULL, HALF, or NONE.
:DISPlay:GR ID NO NE /*Turn the background grid and coordinate off*/

:DISPlay:GBRightness

Syntax :DISP la y:GB Ri ght ne ss <brightness>
Parameter
<brightness> Integer 0 to 100 50
Return
Example
The query returns an integer between 0 and 100.
:DISPlay:GBRightness 60 /*Set the brightness of the screen grid to 60%*/
2-58 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:ETABle<n>:DISP?
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
Format
:ETABle1:DISP? /*The query returns 1*/
Format
:ETABle1:FORMat? /*The query returns ASC*/

:ETABle Commands

The :ETABle commands are used to set the parameters related to the decoding event table.
Command List:
:ETABle<n>:DISP :ETABle<n>:FORMat :ETABle<n>:VIEW :ETABle<n>:COLumn :ETABle<n>:ROW :ETABle<n>:SORT :ETABle<n>:DATA?

:ETABle<n>:DISP

Syntax :E TABle<n>:DI SP <bool>
Description Turn on or off the decoding event table, or query the status of the decoding event table.
Parameter
Name Type Range Default
<n> Discrete {1|2} --
Explanation This command is only valid when the decoder is turned on (:DECoder<n>:DISPlay).
Return
Example
The query returns 1 or 0.
:ETABle1:DISP ON /*Turn on the decoding event tabl e*/

:ETABle<n>:FORMat

Syntax :E TABle<n>:FO R Ma t <fmt>
:ETABle<n>:FORMat?
Description Set or query the data display format of the event table.
Parameter
Name Type Range Default
<n> Discrete {1|2} -­<fmt> Discrete {HEX|ASCii|DEC} HEX
Return
Example
The query returns HEX, ASC, or DEC.
:ETABle1:FORMat ASCii /*Set the data display format of the event table to ASCII*/
DS1000Z-E Programming Guide 2-59
RIGOL Chapter 2 Command System
:ETABle<n>:VIEW?
Description
Set or query the display mode of the event table.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
<view>
Discrete
{PACKage|DETail|PAYLoad}
PACKage
Format
:ETABle1:VIEW? /*The query returns PAYL*/
:ETABle<n>:COLumn?
Name
Type
Range
Default
parameter.
Format
:ETABle1:COLumn? /*The query r eturns DATA*/

:ETABle<n>:VIEW

Syntax :ETABle<n>:VIEW <view>
Parameter
Explanation PACKage: the time and data are displayed in the event table.
DETail: the detailed data of the specifie d row is displayed in the event table. PAYLoad: all data of the specified c olumn is displayed in the event table .
Return
Example
The query returns PACK, D ET, or PAYL.
:ETABle1:VIEW PAYLoad /*Set the display mode of the event table to PAYLoad*/

:ETABle<n>:COLumn

Syntax :ETABle<n>:COLumn <col>
Description Set or query the current column of the event table.
Parameter
<n> Discrete {1|2} -­<col> Discrete {DATA|TX|RX|MISO|MOSI} --
Explanation When different decoder is selected (:DECoder<n>:MODE), the range of <col>
differs. Parallel decoding: DATA RS232 decoding: TX|RX I2C decoding: DATA SPI decoding: MISO|MOSI
If the TX or RX channel source in RS232 decod ing or the MISO or MOSI channel
source in SPI decoding is set to OFF, <col> cannot be set to the corresponding
Return
Example
Related
Commands
The query returns DATA, TX, RX, MISO, or MOSI.
:ETABle1:COLumn DATA /*Set the current column to DATA*/
:DECoder<n>:UART:TX :DECoder<n>:UART:RX :DECoder<n>:SPI:MISO :DECoder<n>:SPI:MOSI
2-60 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:ETABle<n>:ROW?
Description
Set or query the cur rent row of the event table.
<n>
Discrete
{1|2}
--
current event table
Format
query returns 0.
:ETABle1:ROW? /*The query returns 2*/
:ETABle<n>:SORT?
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
occurred.
Format
:ETABle1:SORT? /*The query returns DESC*/

:ETABle<n>:ROW

Syntax :ETABle<n>:ROW <row>
Parameter
Return
Name Type Range Default
<row> Integer
1 to the maximum number of rows of the
The query returns the current row in integer. If the current even table is empty, the
Example :ETABle1:ROW 2 /*Set the current row to 2*/

:ETABle<n>:SORT

Syntax :E TABle<n>:SORT <sort >
Description Set or query the display type of the decoding results in the event table.
Parameter
<sort> Discrete {ASCend|DESCend} ASCend
Explanation ASCend: the events are displayed in the order in which they occurred.
1
Return
Example
DESCend: the events are displayed in the order reverse to the order in which they
The query returns ASC or DESC.
:ETABle1:SORT DESCend /*Set the display type of the event table to descend*/
DS1000Z-E Programming Guide 2-61
RIGOL Chapter 2 Command System
Syntax

:ETABle<n>:DATA?

Description
Read the current event table data.
Name
Type
Range
Default
<n>
Discrete
{1|2}
--
Example
:ETABle1:DATA? /*The query returns the data as shown in the figure above*/
TMC Data Event T able
:ETABle<n>:DATA?
Parameter
Return
Format
The query returns the event table data in the format as shown in the figure below. Wherein, #9000000098 is the TMC data description header followed by the even table data and its format is #900000dddd. dddd denotes the number of bytes of the valid waveform data following the description header. For example, as shown in the figure below, #9000000098 is the TMC data description header, wherein, 98 denotes that there are 98 bytes of valid data. The content following 98 is the event table data.
Description Header
Data
2-62 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:FUNCtion:WRECord:FEND?
recorded currently
can be recorded currently.
Format
:FUNCtion:WRECord:FEND? /*The query returns 4096*/

:FUNCtion Commands

The :FUNCtion commands are used to set the waveform recording and playback parameters.
Command List:
:FUNCtion:WRECord:FEND:FUNCtion:WRECord:FMAX? :FUNCtion:WRECord:FINTerval :FUNCtion:WRECord:PROMpt:FUNCtion:WRECord:OPERate:FUNCtion:WRECord:ENABle:FUNCtion:WREPlay:FSTart:FUNCtion:WREPlay:FEND:FUNCtion:WREPlay:FMAX? :FUNCtion:WREPlay:FINTerval :FUNCtion:WREPlay:MODE:FUNCtion:WREPlay:DIRection:FUNCtion:WREPlay:OPERate :FUNCtion:WREPlay:FCURrent

:FUNCtion:WRECord:FEND

Syntax :F UNC t io n: W RE C ord :FE N D <fram e >
Description Set or query the end frame of waveform recording.
Parameter
Explanation Use the :FUNCtion:WRECord:FMAX? command to query the maximum number of fr ames
Return
Example
Name Type Range Default
<frame> Integer
1 to the maximum number of frames can be
5000
The query returns the current end frame in integer.
:FUNCtion:WRECord:FEND 4096 /*Set the end frame to 4096*/
DS1000Z-E Programming Guide 2-63
RIGOL Chapter 2 Command System
frames can be recorded.
:FUNCtion:WRECord:FINTerval?
s.
Format
:FUNCtion:WRECord:FINTerval? /*The query returns 1.000000e-03*/
:FUNCtion:WRECord:PROMpt?
sound prompt when the recording finishes.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
1|ON
turned on or not.
Format
:FUNCtion:WRECord:PROMpt? /*The query returns 1*/

:FUNCtion:WRECord:FMAX?

Syntax :FUNCtion:WRECord:FMAX?
Description Query the maximum number of frames can be recorded currently.
Explanation
As the capacity of the waveform memory is fixed, the more the number of points each frame of waveform has, the less the number of waveform frames can be recor ded. Thus, the maximum number of frames can be recorded currently is decided by the memory depth currently selected. The less the memory depth, the more the numb er of waveform
Return
The query returns the maximum n u mber of f r ames c an be record ed c ur ren tly in in teger.
Format

:FUNCtion:WRECord:FINTerval

Syntax :FUNCtion:WRECord:FINTerval <interval>
Description Set or query the time interval between frames in wav eform rec ording. The def ault unit is
Parameter
Return
Example
Name Type Range Default
<interval> Real 100ns to 10s 100ns
The query returns the time interval currently set in scientific notation.
:FUNCtion:WRECord:FINTerval 0.001 /*Set the time interval to 1ms*/

:FUNCtion:WRECord:PROMpt

Syntax :FUNCtion:WRECord:PROMpt <bool>
Description Turn on or off the sound prompt when the recording finishes, or query the status of the
Parameter
Explanation When the sound prompt is turned on, the instrument exerts a sound promt when the
:SYSTem:BEEPer) is
Return
Example
recording finishes no matter whether the system sound (refer to
The query returns 1 or 0.
:FUNCtion:WRECord:PROMpt 1 /*Turn on the sound prompt when the recording
finishes*/
2-64 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:FUNCtion:WRECord:OPERate?
Description
Start or stop the waveform recording, or query the status of the waveform recording.
<opt>
Discrete
{RUN|STOP}
--
Format
n
already finished*/
:FUNCtion:WRECord:ENABle?
recording function.
the :FUNCtion:WRECord:OPERate command to start the recording.
Format
:FUNCtion:WRECord:ENABle? /*The query returns 1*/

:FUNCtion:WRECord:OPERate

Syntax :FUNCtion:WRECord:OPERate <opt>
Parameter
Name Type Range Default
Explanation Before sending this command, send the :FUNCtion:WRECord:ENABle command to turn
on the waveform recording function. Otherwise, this command is invalid.
Return
Example
The query returns RUN or STOP.
:FUNCtion:WRECord:OPERate RUN /*Start the waveform recording*/ :FUNCtion:WRECord:OPERate? /*The query returns RUN if the recording is i
progress and returns STOP if the recording has

:FUNCtion:WRECord:ENABle

Syntax :FUNCtion:WRECord:ENABle <bool>
Description Turn on or off the waveform recording function, or query the status of the waveform
Parameter
Name Type Range Default
<bool> Bool {{1|ON}|{0|OFF}} 0|OFF
Explanation The waveform recording function can only be enabled when the horizontal timebase
mode is "YT" and the horizontal timebase is lower than 200ms.
After turning on the waveform recording function, RUN/STOP can be used to start
or stop the waveform recording. At this point, you can se nd
Return
Example
The query returns 1 or 0.
:FUNCtion:WRECord:ENABle 1 /*Turn on the waveform recording function*/
DS1000Z-E Programming Guide 2-65
RIGOL Chapter 2 Command System
or playback process.
Format
:FUNCtion:WREPlay:FSTart? /*The query returns 5*/

:FUNCtion:WREPlay:FSTart

Syntax :FUNCtion:WREPlay:FSTart <sta>
:FUNCtion:WREPlay:FSTart?
Description Set or query the start frame of waveform playback.
Parameter
Name Type Range Default
<sta> Integer 1 to the maximum number of frames recorded 1
Explanation Use the :FUNCtion:WRECord:FEND command to set the maximum number of
frames recorded.
The start frame of waveform playback cannot be greater than the end frame of
waveform playback (
:FUNCtion:WREPlay:FEND).
You can only set the start frame of waveform playback when a waveform is currently
recorded.
You cannot set the start frame of waveform playback during the waveform recording
Return
Example
The query returns a n i nteger.
:FUNCtion:WREPlay:FSTart 5 /*Set the start frame of waveform playback to 5*/
2-66 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:FUNCtion:WREPlay:FEND?
Description
Set or query the end frame of waveform playback.
Name
Type
Range
Default
recorded
of frames recorded
end frame of w av ef orm pla yback when a wa vef orm is curr ently
Yo u canno t set the end f rame o f w avef orm pl ayback during th e wav ef orm recordi ng or playback process.
Format
:FUNCtion:WREPlay:FEND? /*The query returns 4096*/
frames recorded.
recorded.
Format

:FUNCtion:WREPlay:FEND

Syntax :FUNCtion:WREP lay:FE ND <end >
Parameter
<end> Integer
1 to the maximum number of f rames
The maximum number
Explanation Use the :FUNCtion:WRECord:FEND command to set the maximum number of
frames recorded.
The end frame of waveform playback cannot be lower than the start frame of
waveform playback (
:FUNCtion:WREPlay:FSTart).
You can only set the
recorded.
Return
Example
The query returns a n i nteger.
:FUNCtion:WREPlay:FEND 4096 /*Set the end frame of waveform playback to
4096*/

:FUNCtion:WREPlay:FMAX?

Syntax :FUNCtion:WREPlay:FMAX?
Description
Query theb maximum number of fr ames can be play ed, namely the maximum num ber of
Explanation Use the :FUNCtion:WRECord:FEND command to set the maximum number of frames
Return
The query returns a n i nteger.
DS1000Z-E Programming Guide 2-67
RIGOL Chapter 2 Command System
:FUNCtion:WREPlay:FINTerval?
Set or query the time in terval between fram es in w a veform playback . Th e default unit is s.
Name
Type
Range
Default
<interval>
Real
100ns to 10s
100ns
recording or playback process.
Format
:FUNCtion:WREPlay:FINTerval? /*The query returns 1.000000e-03*/
:FUNCtion:WREPlay:MODE?
playback process.
Format
:FUNCtion:WREPlay:MODE? /*The query returns REP*/

:FUNCtion:WREPlay:FINTerval

Syntax :FUNCtion:WREPlay:FINTerval <interval>
Description
Parameter
Explanation You can only set the time interval of waveform playback when a waveform is
currently recorded.
You cannot set the time interval of waveform playback during the waveform
Return
Example
The query returns the current time interval in scientific notation.
:FUNCtion:WREPlay:FINTerval 0.001 /*Set the time interval to 1ms*/

:FUNCtion:WREPlay:MODE

Syntax :F UNC t io n: W RE P lay:M O DE <m ode >
Description Set or query the waveform playback mode.
Parameter
Explanation REPeat: cycle playback. Play from the start frame to th e end f rame an d then repeat
Name Type Range Default
<mode> Discrete {REPeat|SINGle} SINGle
until you stop it manually.
SINGle: single playback. Play from the start frame to the end frame and then stop. You can only set the waveform playback mode when a waveform is currently
recorded.
You cannot set the w aveform playback mode during the waveform recording or
Return
Example
The query returns REP or SING.
:FUNCtion:WREPlay:MODE REPeat /*Set the waveform playback mode to cycle*/
2-68 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
playback process.
Format
:FUNCtion:WREPlay:DIRection? /*The query returns FORW*/
:FUNCtion:WREPlay:OPERate?
playback.
Name
Type
Range
Default
Explanation
This command is only valid when waveform has already been recorded.
Format
finishes*/
Command

:FUNCtion:WREPlay:DIRection

Syntax :FUNCtion:WREPlay:DIRection <dir>
:FUNCtion:WREPlay:DIRection?
Description Set or query the waveform playback direction.
Parameter
Name Type Range Default
<dir> Discrete {FORWard|BACKward} FORWard
Explanation FORWard: positive direction. Play from the start frame to the end frame.
BACKward: negative direction. Play from the end frame to the start frame. You can only set the waveform playback direction w hen a waveform is currently
recorded.
You cannot set the waveform playback direction dur i ng the waveform recording or
Return
Example
The query returns FORW or BACK.
:FUNCtion:WREPlay:DIRection FORWard /*Set the waveform playback direction to
forward*/

:FUNCtion:WREPlay:OPERate

Syntax :FUNCtion:WREPlay:OPERate <opt>
Description Start, pause, or stop the waveform playback, or query the status of the waveform
Parameter
Return
Example
Related
<opt> Discrete {PLAY|PAUSe|STOP} STOP
The query returns PLAY, PAUS, or STOP.
:FUNCtion:WREPlay:OPERate PLAY /*Start the waveform playback*/ :FUNCtion:WREPlay:OPERate? /*The query returns PLAY if the playback is in progress and returns STOP if the playback
:FUNCtion:WRECord:OPERate
DS1000Z-E Programming Guide 2-69
RIGOL Chapter 2 Command System
:FUNCtion:WREPlay:FCURrent?
Description
Set or query the current frame in waveform playback.
frames recorded
of frames recorded
recording or playback process.
Format
:FUNCtion:WREPlay:FCURrent? /*The query returns 300*/

:FUNCtion:WREPlay:FCURrent

Syntax :FUN Ction:WREPlay:FCURrent <cur>
Parameter
Name Type Range Default
<cur> Integer
1 to the maximum number of
The maximum number
Explanation Use the :FUNCtion:WRECord:FEND command to set the maximum number of
frames recorded.
You can only set the current frame of waveform playback when a waveform is
currently recorded.
You cannot set the current frame of waveform playback during the waveform
Return
Example
The query returns an integer.
:FUNCtion:WREPlay:FCURrent 300 /*Set the current frame in waveform playback to
300*/
2-70 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
Syntax

*CLS

Description
Clear all the event registers and clear the error queue.
*ESE?
Description
Set or query the enable register for the standard event status register set.
Name
Type
Range
Default
<value>
Integer
Refer to Explanation
0
the binary numbers X0XXXX0X (X is 1 or 0).
Format
already been set in the register.
*ESE? /*The query returns 16*/

IEEE488.2 Common Commands

The IEEE 488.2 standard defines some common commands used for querying the basic information of the instrument or executing the basic operations. These commands usually start with "*" and the keyword of the command is usually 3-character long.
Command List:
*CLS*ESE*ESR?*IDN?*OPC*RST*SRE *STB?*TST? *WAI
*CLS

*ESE

Syntax *ESE <value>
Parameter
Explanation The bit 1 and bit 6 of the standard event status register are not used and are always
treated as 0; therefore, the range of <value> are the decimal numbers corresponding to
Return
Example *ESE 16 /*Enable the bit 4 (16 in decimal) of the sta ndard event status register*/
The query returns an integer which equals the sum of the weights of all the bits that have
DS1000Z-E Programming Guide 2-71
RIGOL Chapter 2 Command System
Syntax

*ESR?

Description
Query and clear the event register for the standard event status register.
the binary numbers X0XXXX0X (X is 1 or 0).
Format
register.
Syntax

*IDN?

Description
Query the ID string of the instrument.
<software version>: the software version of the instrument.
*OPC?
used to query whether the current operation is finished.
Format
Syntax

*RST

Description
Restore the instrument to the default state.
*ESR?
Explanation The bit 1 and bit 6 of the standard event status register are not used and are always
treated as 0. The range of the return value are the decimal numbers corresponding to
Return
The query returns an integer which eq uals the sum of the weights of all the bi ts in the
*IDN?
Return
Format
The query returns RIGOL TECHNO LOGIES,<model >,<serial number>,<software version>. Whererin, <model>: the model number of the instrument. <serial number>: the serial number of the instrument.

*OPC

Syntax *OPC
Description The *OPC command is used to set the Operation Complete bit (bit 0) in the standard
event status register to 1 after the current operation is finished. The *OPC? command is
*RST
Return
The query returns 1 if the current operation is finished; otherwise, returns 0.
2-72 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
*SRE?
Description
Set or query the enable register for the status byte register set.
Name
Type
Range
Default
<value>
Integer
0 to 255
0
numbers XXXXXX00 (X is 1 or 0).
Format
have already been set in the register.
*SRE? /*The query returns 16*/
Syntax

*STB?

Query the event register fo r the st atus by te regi ster. The value of th e status by te register is set to 0 after this command is executed.
(X is 1 or 0).
Format
register.
Syntax

*TST?

Description
Perform a self-test and then return the seilf-test results.
Format
Syntax

*WAI

Description
Wait for the operation to finish.
executed.

*SRE

Syntax *SRE <value>
Parameter
Explanation The bit 0 and bit 1 of the status byte register are not used and are always treated as 0;
therefore, the range of <value> are the decimal numbers corresponding to the binary
Return
Example *SRE 16 /*Enable the bit 4 (16 in decimal) of the status byte register*/
The query returns a n i nteger which equals the sum of the weights of all the bits that
*STB?
Description
Explanation The bit 0 and bit 1 of the status byte register are not used and are always treated as 0.
The query returns the decimal numbers corresponding to the binary numbers X0XXXX0X
Return
The query returns a n i nteger which equals the sum of t he weights of all the bits in the
*TST?
Return
The query returns a decimal integer.
*WAI
Explanation The subsequent command can only be carried out after the current command has been
DS1000Z-E Programming Guide 2-73
RIGOL Chapter 2 Command System
:LAN:DHCP?
current DHCP configurati on mode.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
1|ON
network parameters (such as the IP address) for the oscilloscope.
Format
:LAN:DHCP? /*The query returns 1.*/
:LAN:AUToip?
current Auto IP configuration mode.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
1|ON

:LAN Commands

Command List:
:LAN:DHCP:LAN:AUToip :LAN:GATeway:LAN:DNS:LAN:MAC?:LAN:MANual:LAN:INITiate:LAN:IPADdress:LAN:SMASk:LAN:STATus? :LAN:VISA?:LAN:APPLy

:LAN:DHCP

Syntax :LAN:DHCP <bool>
Description Turns on or off the DHCP configuration mode; or queries the on/off status of the
Parameter
Explanation When the three IP configuration types (DHCP, Auto IP, a nd Static IP) are all
turned on, the prio rity of the parameter configuration from high to low is "DHCP", "Auto IP", and "Static IP". The three IP configuration types cannot be all turned off at the same time.
When DHPC is valid, the DHCP server in the current network will assign the
Return
Example
The query returns 1 or 0.
:LAN:DHCP ON /*Enables DHCP configuration mode.*/

:LAN:AUToip

Syntax :LAN:AUToip <bool>
Description Turns on or off the Auto IP configuration mode; or queries the on/off status of the
Parameter
2-74 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
setting, refer to the :LAN:DNS command.
Format
:LAN:AUToip? /*The query returns 1.*/
:LAN:GATeway?
Description
Sets or queries the default gateway.
Name
Type
Range
Default
<string>
ASCII String
Refer to Explanation
——
command).
Format
:LAN:GATeway? /*The query returns the current gateway.*/
:LAN:DNS?
Description
Sets or queries the DNS address.
Name
Type
Range
Default
<string>
ASCII String
Refer to Explanation
——
command).
Format
Explanation When the three IP configuration types (DHCP , Auto IP, and Static IP) are all turned
on, the priority of the parameter configuration from high to low is "DHCP", "Auto IP", and "Static IP". The three IP configuration types cannot be all turned off at the same time.
When the auto IP mode is valid, disable DHCP manually. You can self-define the
gateway and DNS address for the oscilloscope.
:LAN:GATeway command. For the DNS
Return
Example
For the g a teway setting, refer to the
The query returns 1 or 0.
:LAN:AUToip ON /*Disables the Auto IP configuration mode.*/

:LAN:GATeway

Syntax :LAN:GATeway <st ring>
Parameter
Explanation The format of <string> is nnn,nnn,nnn,nnn. The range of the first section of
"nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.
When you use this command, the IP configuration mode should be Auto IP (refer
:LAN:AUToip command) or Static IP mode (refer to the :LAN:MANual
to the
Return
Example
The query returns the current gateway in strings.
:LAN:GATeway 19 2.1 68 .1. 1 /*Sets the default gateway to 192.168.1.1.*/

:LAN:DNS

Syntax :LAN:DNS <string>
Parameter
Explanation The format of <string> is nnn,nnn,nnn,nnn. The range of the firs t section of
"nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.
When you use this command, the IP configuration mode should be Auto IP (refer
:LAN:AUToip command) or Static IP mode (refer to the :LAN:MANual
to the
Return
The query returns the current DNS addres s in strings.
DS1000Z-E Programming Guide 2-75
RIGOL Chapter 2 Command System
Syntax

:LAN:MAC?

oscilloscope is as follows: 00-19-AF-30-00-00.
Format
:LAN:MANual?
static IP configuration mode.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
e three IP configuration types (DHCP, Auto IP , and Static IP) are all tur ned
command.
Format
:LAN:MANual? /*The query returns 1. */
Syntax

:LAN:INITiate

oscilloscope has been connected to the network properly.
Example :LAN:DNS 192.168.1.1 /*Sets the DNS address to 192.168.1.1.*/
:LAN:DNS? /*The query returns the current DNS address.*/
:LAN:MAC?
Description Queries the MAC address of the instrument. The address format displayed on the
Return
The query returns the MAC address in strings. For example, 0019af300000.

:LAN:MANual

Syntax :LAN :MA Nu al <boo l >
Description Turns on or off the static IP configuration mode; or queries the on/off status of the
Parameter
Explanation When th
on, the priority of the parameter configuration from high to low is "DHCP", "Auto
IP", and "Static IP". The three IP configuration types cannot be all turned off at the
same time.
When the static IP mode is valid, disable DHCP and Auto IP manually. You can
self-define the network parameters of the oscilloscope, such as IP address, subnet
mask, gateway, and DNS address. For the setting of the IP address, refer to
:LAN:IPADdress command. For the setting of the subnet mask, refer to
the
:LAN:SMASk command. For the setting of the gateway, refer to
the
:LAN:GATeway command. For the setting of DNS, refer to the :LAN:DNS
the
Return
Example
The query returns 1 or 0.
:LAN:MANual ON /*Enables the static IP configuration mode.*/
:LAN:INITiate
Description Initiates the network parameters. Before running the command, confirm that the
2-76 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:LAN:IPADdress?
Description
Sets or queries the IP address of the instrument.
Name
Type
Range
Default
<string>
ASCII String
Refer to Explanation
——
disabled.
Format
:LAN:IPADdress? /*The query returns the current IP address . */
:LAN:SMASk?
Description
Sets or queries the subnet mask.
Name
Type
Range
Default
<string>
ASCII String
Refer to Explanation
——
to the :LAN:MANual command). The DHCP and auto IP should be disabled.
Format
:LAN:SMASk? /*The query returns the current subnet mask.*/
Syntax

:LAN:STATus?

Description
Queries the current network configuration status.
DHCPFAILED: the DHCP configuration has failed.

:LAN:IPADdress

Syntax :LAN:IPADdress <string>
Parameter
Explanation The format of <string> is nnn,nnn,nnn,nnn. The range of the first section of
"nnn" is from 0 to 223 (except 127), and the ranges of the other three sections of "nnn" are from 0 to 255.
When you use the command, the IP configuration mode should be static IP (refer
:LAN:MANual command). Besides, the DHCP and auto IP should be
to the
Return
Example
The query returns the current IP address in strings.
:LAN:IPADdress 192.168.1.10 /*Sets the IP address to 192.168.1.10.*/

:LAN:SMASk

Syntax :LAN:SMASk <string>
Parameter
Explanation The format of <string> is nnn,nnn,nnn,nnn. The range of the section "nnn" is
from 0 to 255.
When you use the command, the IP configuration mode should be static IP (refer
Return
Example
The query returns the current subnet mask in strings.
:LAN:SMASk 255.255.255.0 /*Sets the subnet mask to 255.255.255.0*/
:LAN:STATus?
Return
Format
DS1000Z-E Programming Guide 2-77
The query returns UNLINK, INIT, IPCONFLICT, CONFIGURED, or DHCPFAILED. UNLINK: not connected. INIT: the instrument is acquiring an IP address. IPCONFLICT: there is an IP address conflict. CONFIGURED: the network configurat ion has been successfully configured.
RIGOL Chapter 2 Command System
Syntax

:LAN:VISA?

Description
Queries the VISA address of the instrument.
TCPIP::172.16.3.119::INSTR.
Syntax

:LAN:APPLy

Description
Applies the network configuration.
:LAN:VISA?
Return Format The query returns the VISA address in strings. For example,
:LAN:APPLy
2-78 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL

:MATH Commands

The :MATH commands are used to set the operations between the waveforms of multiple channels.
Note:
The operations include the follo wing types:
Algebraic Operations: A+B, A-B, AxB, A/B Spectrum Operation: FFT Logic Operations: A&&B, A||B, A^B, !A Functional Operations: Intg, Diff, Sqrt, Lg, Ln, Exp, Abs Filter: Low Pass Filter, High Pass Filter, Band Pass Filter, Band Stop Filter Compound Operations: Combination of two operations (inner and out er)
For logic operations, the waveform data to be operated is compared with the preset threshold and is
converted to 0 or 1. Thus, the result will also be 0 or 1.
For a relatively complicated operation, you can split it into inner and outer layer operations (namely
compound operation) according to your need. The inn er layer operation (fx) can only be algebraic operation and the outer layer operation can only be algebraic operation or functional operation.
When the outer lay er operation is algeriac oper ation, at least on e of sourc e A and source B of the outer layer operation should be set to FX. When the outer layer operation is functional operation, the source of the outer layer operation can only be set to FX.
Note: For the inner layer operation (fx), you can send the :MATH:OPTion:FX:SOURce1, :MATH:OPTion:FX:SOURce2, and :MATH:OPTion:FX:OPERator commands to set the sources and operator of the inner layer operation. For the outer layer operation, you can send the
:MATH:SOURce1, :MATH:SOURce2, and :MATH:OPERatorcommands to set the sources and operator of the
outer layer operation.
Command List:
:MATH:DISPlay :MATH:OPERator :MATH:SOURce1 :MATH:SOURce2 :MATH:LSOUrce1:MATH:LSOUrce2:MATH:SCALe :MATH:OFFSet :MATH:INVert :MATH:RESet :MATH:FFT:SOURce :MATH:FFT:WINDow :MATH:FFT:SPLit :MATH:FFT:UNIT:MATH:FFT:HSCale :MATH:FFT:HCENter :MATH:FFT:MODE
DS1000Z-E Programming Guide 2-79
RIGOL Chapter 2 Command System
:MATH:DISPlay?
Description
Enable or disable the math operation function or query the math operation status.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
Format
:MATH:DISPlay? /*The query r eturns 1*/
:MATH:OPERator?
Description
Set or query the operator of the math operation.
Name
Type
Range
Default
FILTer}
<opt> is {ADD|SUBTract|MULTiply|DIVision|INTG|DIFF|SQRT|LOG|LN|EXP|ABS}.
Format
LOG, LN, EXP, ABS, or FILT.
:MATH:OPERator? /*The query returns INTG*/
:MATH:FILTer:TYPE :MATH:FILTer:W1 :MATH:FILTer:W2 :MATH:OPTion:STARt:MATH:OPTion:END :MATH:OPTion:INVert :MATH:OPTion:SENSitivity :MATH:OPTion:DIStance :MATH:OPTion:ASCale :MATH:OPTion:THReshold1:MATH:OPTion:THReshold2 :MATH:OPTion:FX:SOURce1:MATH:OPTion:FX:SOURce2 :MATH:OPTion:FX:OPERator

:MATH:DISPlay

Syntax :MATH:DISPlay <bool>
Parameter
Return
Example
The query returns 1 or 0.
:MATH:DISPlay ON /*Enable the math operation function*/

:MATH:OPERator

Syntax :MATH:OPERator <opt>
Parameter
<opt> Discrete
{ADD|SUBTract|MULTiply|DIVision|AND|OR|XOR| NOT|FFT|INTG|DIFF|SQRT|LOG|LN|EXP|ABS|
ADD
Explanation When the parameter in :MATH:SOURce1 and/or :MATH:SOURce2 is FX, this command is
used to set the operator of the outer layer operation of compound operation. The range of
Return
The query returns ADD, SUBT, MULT, DIV, AND, OR, XOR, NOT, FFT, INTG, DIFF, SQRT,
Example :MATH:OPERator INTG /*Set the operator of the math operation to integration*/
2-80 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
:MATH:SOURce1?
layer operation of compound operation.
Name
Type
Range
Default
<src>
Discrete
{CHANnel1|CHANnel2|FX}
CHANnel1
inner layer operation.
Format
:MATH:SOURce1? /*The query returns CHAN2*/
:MATH:SOURce2?
operation.
Name
Type
Range
Default
Discrete
CHANnel1
inner layer operation.
Format

:MATH:SOURce1

Syntax :M ATH:SOURce1 <sr c >
Description Set or query the source or source A of algebraic operation/functional operation/th e outer
Parameter
Explanation For algebraic operations, this command is used to set source A.
Fo r functional operations, only this command is used to set the source. For compound operations, this command is used to set source A of the outer layer
operation when the outer layer operation is algeriac operation and the range of <src> is {CHANnel1|CHANnel2|FX}; this command is used to set the source of the outer layer operation when the outer layer operation is functional operation and <src> can only be set to FX.
Note: When the outer layer operation of compound operation is algebraic operation, at least one of source A and source B of the outer layer operation should be set to FX.
When "FX" is selected, you can send
:MATH:OPTion:FX:SOURce1, :MATH:OPTion:FX:SOURce2,
the
:MATH:OPTion:FX:OPERator commands to set the sources and operator of the
and
Return
Example
The query returns CHAN1, CHAN2, or FX.
:MATH:SOURce1 CHANnel2 /*Set source A of algebraic operation to CH2*/

:MATH:SOURce2

Syntax :M ATH:SOURce2 <sr c>
Description Set or query source B of algebraic operation/the outer layer operation of compound
Parameter
<src>
Explanation This command is only applicable to algebraic operations (requiring two sources) and
compound operations whose outer layer operations are algebraic operations.
When the outlayer operation of compound operation is algebraic operation, this
command is used to set source B of the outer layer operation.
Note: When the outer layer operation of compound operation is algebraic operation, at least one of source A and source B of the outer layer operation should be set to FX.
{CHANnel1|CHANnel2|FX}
When "FX" is selected, you can send
:MATH:OPTion:FX:SOURce1, :MATH:OPTion:FX:SOURce2,
the
:MATH:OPTion:FX:OPERator commands to set the sources and operator of the
and
Return
DS1000Z-E Programming Guide 2-81
The query returns CHAN1, CHAN2, or FX.
RIGOL Chapter 2 Command System
:MATH:LSOUrce1?
Description
Set or query source A of logic operation.
Explanation
The logic operations include A&&B, A||B, A^B, and !A.
Format
:MATH:LSOUrce1? /*The query returns CHAN1*/
:MATH:LSOUrce2?
Name
Type
Range
Default
and is used to set sour c e B.
:MATH:SCALe?
currently selected and the unit of the source.
Name
Type
Range
Default
<scale>
Real
The max range is from 1p to 5T (in 1-2-5 step)
1.00V
Example :MATH:SOURce2 CHANnel2 /*Set source B of algebraic operation to CH2*/
:MATH:SOURce2? /*The query returns CHAN2*/

:MATH:LSOUrce1

Syntax :MATH:LSOUrce1 <src >
Parameter
Name Type Range Default
<src> Discrete {CHANnel1|CHANnel2} CHANnel1
Return
Example
The query returns CHAN1 or CHAN2.
:MATH:LSOUrce1 CHANnel1 /*Set source A of logic operation to CH1*/

:MATH:LSOUrce2

Syntax :MATH:LSOUrce2 <src >
Description Set or query source B of logic operation.
Parameter
<src> Discrete {CHANnel1|CHANnel2} CHANnel1
Explanation The logic operations include A&&B, A||B, A^B, and !A.
This command is only applicable to logic operations that require two signal sources
Return
The query returns CHAN1 or CHAN2.
Format
Example
:MATH:LSOUrce2 CHANnel1 /*Set source B of logic operation to CH1*/ :MATH:LSOUrce2? /*The query returns CHAN1*/

:MATH:SCALe

Syntax :MATH:SCALe <scale>
Description Set or query the vertical scale of the operation result. The unit depends on the operator
Parameter
2-82 DS1000Z-E Programming Guide
Chapter 2 Command System RIGOL
is also related to the current horizontal timebase.
Format
:MATH:SCALe? /*The query returns 2.000000e+00*/
:TIMebase[:MAIN]:SCALe
:MATH:OFFSet?
Name
Type
Range
Default
Step: MathVerticalScale/50
the :MATH:SCALe command.
Format
:MATH:OFFSet? /*The query returns 8.000000e+00*/
:CHANnel<n>:UNITs
:MATH:INVert?
display mode status of the operation result.
Name
Type
Range
Default
<bool>
Bool
{{1|ON}|{0|OFF}}
0|OFF
This command has the same function as the :MATH:OPTion:INVert command.
Format
Explanation The range of the vertical scale is related to the opera tor curren tly selected and th e vertical
scale of the source channel. For the integration (intg) and differential (diff) operations, it
Return
Example
Related
Commands
The query returns the vertical scale of the operation result in scientific notation.
:MATH:SCALe 2 /*Set the vertical scale to 2V*/
:CHANnel<n>:SCALe :CHANnel<n>:UNITs :MATH:OPERator

:MATH:OFFSet

Syntax :M ATH:OFFSe t <offs>
Description Set or query the vertical offset of the operation result. The unit depends on the operator
currently selected and the unit of the source.
Parameter
Related to the vertical scale of the operation result
<offs> Real
Range: (-1000 x MathVerticalScale) to (1000 x MathVerticalScale)
0.00V
Explanation MathVerticalScale is the vertical scale of the operation result and can be set by
Return
Example
Related
The query returns the vertical offset of the operation result in scientific notation.
:MATH:OFFSet 8 /*Set the vertical offset to 8V*/
:MATH:OPERator
Commands

:MATH:INVert

Syntax :MATH:INVert <bool>
Description Enable or disable the inverted display mode of the operation result, or query the inverted
Parameter
Explanation This command is invalid for the FFT operation.
Return
DS1000Z-E Programming Guide 2-83
The query returns 1 or 0.
RIGOL Chapter 2 Command System
Syntax

:MATH:RESet

the source.
:TIMebase[:MAIN]:SCALe
:MATH:FFT:SOURce?
Description
Set or query the source of FFT operation/filter.
Name
Type
Range
Default
<src>
Discrete
{CHANnel1|CHANnel2}
CHANnel1
Format
:MATH:FFT:SOURce? /* The query returns CHAN1*/
Command
:MATH:FFT:WINDow?
Description
Set or query the wi ndow function of the FFT operation.
Name
Type
Range
Default
FLATtop|TRIangle}
characteristics.
Format
Example :MATH:INVert ON /*Enable the inverted display mode*/
:MATH:INVert? /*The query returns 1*/
Related
:MATH:OPERator
Command
:MATH:RESet
Description Sending this command, the instrument adjusts the vertical scale of the operation result to
the most proper value according to the current operator and the horizontal timebase of
Related
Commands
:MATH:OPERator :MATH:SCALe

:MATH:FFT:SOURce

Syntax :MATH:FFT:SOURce <src>
Parameter
Return
Example
Related
The query returns CHAN1 or CHAN2.
:MATH:FFT:SOURce CHANnel1 /* Set the source of FFT operation to CH1*/
:MATH:OPERator

:MATH:FFT:WINDow

Syntax :MATH:FFT:WINDow <wnd>
Parameter
<wnd> Discrete
Explanation Spectral leakage can be considerably decreased when a window function is used.
Different window functions are applicable to measure different wav ef orms. You need
to select the window function according to wa veform to be measured and its
{RECTangle|BLACkman|HANNing|HAMMing|
RECTangle
Return
2-84 DS1000Z-E Programming Guide
The query returns RECT, BLAC, HANN, HAMM, FLAT, or TRI.
Loading...