Rigol DS1202Z-E Programming Guide

Programming Guide

DS1000Z-E Series

Digital Oscilloscope

Aug. 2019

RIGOL (SUZHOU) TECHNOLOGIES INC.

RIGOL

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 company’s sole decision.

Information in this publication replaces all previously released materials.

Information in this publication is subject to change without notice.

RIGOL shall not be liable for either incidental or 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 and 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

Document Overview

This manual provides guidance on how to use the SCPI 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 introduces 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 using instruction of each command.

Chapter 3 Programming Demos

This chapter lists some programming demos to illustrate how to use commands 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.

Tip

For the newest version of this manual, please download it from RIGOL official website (www.rigol.com).

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 first 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.

Model

Analog Bandwidth

Number of Analog Channels

DS1202Z-E

200 MHz

2

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

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 real panel of the oscilloscope and the USB Host interface of the PC using a USB cable.

(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 Device (IVI)" driver following the directions in the wizard. The steps are as follows.

1

2

1-2

DS1000Z-E Programming Guide

Rigol DS1202Z-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 to search for the resources.

(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 resource name "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.

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 Commands 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 floating point operation rule in IEEE 754 standard, ISO 646 7-bit coded character for information interchange (equivalent to ASCII programming)). The SCPI commands provide a hierarchical tree structure and consist of multiple subsystems. Each command subsystem consists of a root keyword and one or more sub-keywords.

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 to 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:GBRightness <brightness>

: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 Abbreviation

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 default unit of each parameter, please refer to the description in each command in the following introductions.

DS1000Z-E Programming Guide

2-1

RIGOL

Chapter 2 Command System

:AUToscale

Syntax :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 on the front panel.

Explanation Theoretically, waveform 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 :MASK:ENABle command), if you sent 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 recorded waveform, this command is invalid.

:CLEar

Syntax :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 panel.

Related :DISPlay:CLEar

Command

:RUN

:STOP

Syntax :RUN :STOP

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 front panel.

Explanation When the waveform record function is enabled or during the playback of the recorded waveform, these commands are invalid.

2-2

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:SINGle

Syntax Description

Explanation

Related

Commands

:SINGle

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

the :TRIGger:SWEep SINGle command.

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 recorded waveform, this command is invalid.

:TFORce

:RUN

:STOP

:TFORce

Syntax :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 the FORCE key in the trigger control area on the front panel.

DS1000Z-E Programming Guide

2-3

RIGOL

Chapter 2 Command System

: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 [1]:

:ACQuire:AVERages

:ACQuire:MDEPth

:ACQuire:TYPE

:ACQuire:SRATe?

Note[1]: In the "Command List" in this manual, the parameters in the setting commands and the query commands are not included and you can refer to the complete introductions of the commands in the text according to the keywords.

:ACQuire:AVERages

Syntax :ACQuire:AVERages <count> :ACQuire:AVERages?

Description Set or query the number of averages under the average acquisition mode.

Parameter

Name

Type

Range

 

Default

 

<count>

Integer

2n (n is an integer from 1 to 10)

 

2

Explanation

You can send 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 waveform to the waveform changes.

Return The query returns an integer between 2 and 1024.

Format

Example :ACQuire:AVERages 128

/*Set the number of averages to 128*/

:ACQuire:AVERages?

/*The query returns 128*/

2-4

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:ACQuire:MDEPth

Syntax :ACQuire:MDEPth <mdep> :ACQuire:MDEPth?

Description Set or query the memory depth of the oscilloscope (namely the number of waveform points that can be stored in a single trigger sample). The default unit is pts (points).

Parameter

Name

Type

Range

Default

 

 

<mdep>

Discrete

Refer to Explanation

AUTO

Explanation

Return

Format

Example

Related

Command

When a single channel is enabled, the range of <mdep> is {AUTO|12000| 120000|1200000|12000000|24000000}.

When dual channels are enabled, the range of <mdep> is {AUTO|6000|60000| 600000|6000000|12000000}.

The following equation describes 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 the :TIMebase[:MAIN]:SCALe command) times the number of grids in the horizontal direction on the screen (12 for DS1000Z-E).

When AUTO is selected, the oscilloscope will select the memory depth automatically according to the current sample rate.

The query returns the actual number of points (integer) or AUTO.

:ACQuire:MDEPth 12000

/*Set the memory depth to 12000pts*/

:ACQuire:MDEPth?

/*The query returns 12000*/

:ACQuire:SRATe?

 

:ACQuire:TYPE

Syntax

:ACQuire:TYPE <type>

 

 

 

 

:ACQuire:TYPE?

 

 

Description

Set or query the acquisition mode of the oscilloscope.

 

Parameter

Name

Type

Range

Default

 

 

<type>

Discrete

{NORMal|AVERages|PEAK|HRESolution}

NORMal

Explanation

NORMal: in this mode, the oscilloscope samples the signal at equal time interval to

 

 

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 averages can be set by the:ACQuire:AVERages command. Greater number of averages 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.

HRESolution (High Resolution): this mode uses a kind of ultra-sample technique to

DS1000Z-E Programming Guide

2-5

RIGOL

Chapter 2 Command System

average the neighboring points of the sample waveform to reduce the random noise 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 storage rate of the acquisition memory.

Return The query returns NORM, AVER, PEAK, or HRES.

Format

Example :ACQuire:TYPE AVERages

/*Select the average acquisition mode*/

:ACQuire:TYPE?

/*The query returns AVER*/

:ACQuire:SRATe?

Syntax :ACQuire:SRATe?

Description Query the current sample rate. The default unit is Sa/s.

Explanation Sample rate is the sample frequency of the oscilloscope, namely the waveform points sampled per second.

The following equation describes the relationship among memory depth, sample rate, and waveform length:

Memory Depth = Sample Rate x Waveform Length

Wherein, the Memory Depth can be set using the :ACQuire:MDEPth command, and the Waveform Length is the product of the horizontal timebase (set by

the :TIMebase[:MAIN]:SCALe command) times the number of the horizontal scales (12 for DS1000Z-E).

Return The query returns the sample rate in scientific notation.

Format

Example :ACQuire:SRATe? /*The query returns 2.000000e+09*/

2-6

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:CALibrate Commands

Command List:

:CALibrate:QUIT

:CALibrate:STARt

:CALibrate:QUIT

Syntax :CALibrate:QUIT

Description Exit the self-calibration at any time.

Related :CALibrate:STARt

Command

:CALibrate:STARt

Syntax :CALibrate:STARt

Description The oscilloscope starts to execute self-calibration.

Explanation The self-calibration operation can make the oscilloscope quickly reach 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 send the :CALibrate:QUIT command to quit the self-calibration.

DS1000Z-E Programming Guide

2-7

RIGOL

Chapter 2 Command System

: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>

 

 

 

:CHANnel<n>:BWLimit?

 

 

Description

Set or query the bandwidth limit parameter of the specified channel.

 

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

<type>

Discrete

{20M|OFF}

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 limit can reduce the noise, but can also attenuate the high frequency components.

Return The query returns 20M or OFF.

Format

Example :CHANnel1:BWLimit 20M

/*Enable the 20MHz bandwidth limit*/

:CHANnel1:BWLimit?

/*The query returns 20M*/

2-8

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:CHANnel<n>:COUPling

Syntax

:CHANnel<n>:COUPling <coupling>

 

 

 

:CHANnel<n>:COUPling?

 

 

 

Description

Set or query the coupling mode of the specified channel.

 

Parameter

Name

Type

Range

 

Default

 

 

<n>

Discrete

{1|2}

 

--

 

 

<coupling>

Discrete

{AC|DC|GND}

 

DC

Explanation

AC: the DC components of the signal under test are blocked.

 

DC: the DC and AC components of the signal under test can both pass the channel.

GND: the DC and AC components of the signal under test are both blocked.

Return The query returns AC, DC, or GND.

Format

Example :CHANnel1:COUPling AC

/*Select the AC coupling mode*/

:CHANnel1:COUPling?

/*The query returns AC*/

:CHANnel<n>:DISPlay

Syntax :CHANnel<n>:DISPlay <bool> :CHANnel<n>:DISPlay?

Description

Enable or disable the specified channel or query the status of the specified channel.

Parameter

Name

Type

 

Range

Default

 

 

<n>

Discrete

 

{1|2}

--

 

 

<bool>

Bool

 

{{1|ON}|{0|OFF}}

CH1: 1|ON

 

 

 

CH2: 0|OFF

 

 

 

 

 

 

Return

The query returns 1 or 0.

 

 

 

Format

 

 

 

 

 

Example

:CHANnel1:DISPlay ON

/*Enable CH1*/

 

 

 

:CHANnel1:DISPlay?

/*The query returns 1*/

 

DS1000Z-E Programming Guide

2-9

RIGOL

Chapter 2 Command System

:CHANnel<n>:INVert

Syntax :CHANnel<n>:INVert <bool> :CHANnel<n>:INVert?

Description Enable or disable the waveform invert of the specified channel or query the status of the waveform invert of the specified channel.

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

<bool>

Bool

{{1|ON}|{0|OFF}}

0|OFF

Explanation When waveform invert is turned off, the waveform display is normal; when waveform invert is turned on, the waveform voltage values are inverted.

Return The query returns 1 or 0.

Format

Example :CHANnel1:INVert ON

/*Enable the waveform invert of CH1*/

:CHANnel1:INVert?

/*The query returns 1*/

:CHANnel<n>:OFFSet

Syntax :CHANnel<n>:OFFSet <offset> :CHANnel<n>:OFFSet?

Description Set or query the vertical offset of the specified channel. The default unit is V.

Parameter

Name

Type

 

Range

Default

 

 

<n>

Discrete

 

{1|2}

--

 

 

 

 

 

Related to the current vertical scale and

 

 

 

 

 

 

probe ratio

 

 

 

 

 

 

When the probe ratio is 1X,

0V (the probe

 

 

<offset>

Real

 

vertical scale≥500mV/div: -100V to +100V

 

 

 

vertical scale<500mV/div: -2V to +2V

ratio is 10X)

 

 

 

 

 

 

 

 

 

 

When the probe ratio is 10X,

 

 

 

 

 

 

vertical scale≥5V/div: -1000V to +1000V

 

 

 

 

 

 

vertical scale<5V/div: -20V to +20V

 

Return

The query returns the vertical offset in scientific notation.

Format

 

 

Example

:CHANnel1:OFFSet 0.01 /*Set the vertical offset of CH1 to 10mV*/

 

:CHANnel1:OFFSet?

/*The query returns 1.000000e-02*/

2-10

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:CHANnel<n>:RANGe

Syntax :CHANnel<n>:RANGe <range> :CHANnel<n>:RANGe?

Description Set or query the vertical range of the specified channel. The default unit is V.

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

<range>

Real

Related to the probe ratio

8V (the probe

 

 

When the probe ratio is 1X: 8mV to 80V

 

 

ratio is 10X)

 

 

 

 

When the probe ratio is 10X: 80mV to 800V

 

 

 

 

 

Explanation This command indirectly modifies the vertical scale of the specified channel (Vertical Scale = Vertical Range/8). The vertical scale can be set by the :CHANnel<n>:SCALe command.

Return The query returns the vertical range in scientific notation.

Format

Example :CHANnel1:RANGe 8

/*Set the vertical range of CH1 to 8V*/

:CHANnel1:RANGe?

/*The query returns 8.000000e+00*/

DS1000Z-E Programming Guide

2-11

RIGOL

Chapter 2 Command System

:CHANnel<n>:TCAL

Syntax :CHANnel<n>:TCAL <val> :CHANnel<n>:TCAL?

Description Set or query the delay calibration time of the specified channel to calibrate the zero offset of the corresponding channel. The default unit is s.

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

<val>

Real

-100ns to 100ns

0.00s

Explanation <val> can only be set to the specific values in the specified step. If the parameter you sent is not one of the specific values, the parameter will be set to the nearest specific values automatically. The step varies with the horizontal timebase (set by

the :TIMebase[:MAIN]:SCALe command), as shown in the table below.

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

Note: When the horizontal timebase is equal to or greater than 10μs, the delay calibration time cannot be adjusted.

Return The query returns the delay calibration time in scientific notation.

Format

Example :CHANnel1:TCAL 0.00000002

/*Set the delay calibration time to 20ns*/

:CHANnel1:TCAL?

/*The query returns 2.000000e-08*/

2-12

DS1000Z-E Programming Guide

Chapter 2 Command System

RIGOL

:CHANnel<n>:SCALe

Syntax :CHANnel<n>:SCALe <scale> :CHANnel<n>:SCALe?

Description Set or query the vertical scale of the specified channel. The default unit is V.

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

 

 

Related to the current probe ratio

1V (the probe

 

 

<scale>

Real

When the probe ratio is 1X: 1mV to 10V

 

 

When the probe ratio is 10X (default): 10mV to

ratio is 10X)

 

 

 

 

 

 

 

 

100V

 

Explanation

The range of the vertical scale is related to the current probe ratio (set by

 

 

the :CHANnel<n>:PROBe command).

 

You can use the :CHANnel<n>:VERNier command to enable or disable the fine 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 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 amplitude of the waveform to view the signal details.

Return The query returns the vertical scale in scientific notation.

Format

Example :CHANnel1:SCALe 1

/*Set the vertical scale of CH1 to 1V*/

:CHANnel1:SCALe?

/*The query returns 1.000000e+00*/

:CHANnel<n>:PROBe

Syntax

:CHANnel<n>:PROBe <atten>

 

 

 

 

:CHANnel<n>:PROBe?

 

 

 

Description

Set or query the probe ratio of the specified channel.

 

 

Parameter

 

Name

 

 

Type

 

Range

Default

 

 

 

 

<n>

 

 

Discrete

 

{1|2}

--

 

 

 

 

<atten>

 

 

Discrete

 

{0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|

10

 

 

 

 

 

 

 

100|200|500|1000}

 

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).

 

Setting the probe ratio will affect the range of the vertical scale.

Return

The query returns the probe ratio in scientific notation.

Format

 

 

Example

:CHANnel1:PROBe 10 /*Set the probe ratio of CH1 to 10X*/

 

:CHANnel1:PROBe?

/*The query returns 1.000000e+01*/

Related

:CHANnel<n>:SCALe

 

Command

 

 

DS1000Z-E Programming Guide

2-13

RIGOL

Chapter 2 Command System

:CHANnel<n>:UNITs

Syntax :CHANnel<n>:UNITs <units> :CHANnel<n>:UNITs?

Description

Set or query the amplitude display unit of the specified channel.

 

Parameter

Name

Type

Range

Default

 

 

<n>

Discrete

{1|2}

--

 

 

<units>

Discrete

{VOLTage|WATT|AMPere|UNKNown}

VOLTage

Return

The query returns VOLT, WATT, AMP, or UNKN.

 

Format

 

 

 

 

 

Example

:CHANnel1:UNITs VOLTage

/*Set the amplitude display unit of CH1 to V*/

 

 

:CHANnel1:UNITs?

 

/*The query returns VOLT*/

 

:CHANnel<n>:VERNier

Syntax :CHANnel<n>:VERNier <bool> :CHANnel<n>:VERNier?

Description

Enable or disable the fine adjustment of the vertical scale of the specified channel, or

 

query the fine adjustment status of the vertical scale of the specified channel.

Parameter

Name

Type

Range

Default

 

<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

 

amplitude of the waveform to view the signal details.

 

Return

The query returns 1 or 0.

 

 

Format

 

 

 

 

Example

:CHANnel1:VERNier ON

/*Enable the fine adjustment function of the vertical scale of

 

 

 

CH1*/

 

 

:CHANnel1:VERNier?

/*The query returns 1*/

 

Related

:CHANnel<n>:SCALe

 

 

Command

 

 

 

 

2-14

DS1000Z-E Programming Guide

Loading...
+ 190 hidden pages