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
Loading...
+ 190 hidden pages