Rigol DS1104Z, DS1074Z, DS1104Z-S, DS1074Z-S Programming Guide

RIGOL
Programming Guide
DS1000Z Series Digita l Oscilloscope
Dec. 2013
RIGOL Technologies, Inc.
RIGOL

Guaranty and Declaration

Copyright
© 2013 RIGOL Technologies, Inc. All Rights Reserved.
Trademark Information
RIGOL is a registered trademark of RIGOL Technologies, Inc.
Publication Number
PGA17103-1110
Notices
RIGOL products are protected by patent law in and outside of P.R.C. RIGOL reserves the right to modify or change parts of or all the specifications and pricing policies at
company’s sole decision.
Information in this publication replaces all previously corresponding material. RIGOL shall not be liable for losses caused by either incidental or consequential 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 or photocopied or rearranged without prior written
approval of RIGOL.
Product Certification
RIGOL guarantees this product conforms to the national and industrial standards in China as well as the ISO9001:2008 standard and the ISO14001:2004 standard. Other international standard conformance certification is 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
Tip
For the newest version of this manual, please download it from www.rigol.com.
Model
Analog Bandwidth
Channel Number
Source Channel Number
DS1104Z
100 MHz
4
None
DS1074Z
70 MHz
4
None
DS1104Z-S
100 MHz
4 2 DS1074Z-S
70 MHz
4
2

Document Overview

This manual guides users to control RIGOL DS1000Z series digital oscilloscope remotely by programming using SCPI commands through the remote interface. DS1000Z can build communication with PC through USB, LAN or GPIB (option).
Main Topics in this Manual:
Chapter 1 Programming Overview
This chapter introduces how to build the remote communication between DS1000Z series digital oscilloscope and PC, remote control method as well as brief introduction 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, LabVIEW, Matlab, Visual Basic 6.0 and Visual C++ 6.0.
Format Conventions in this Manual:
1. Button
The function key at the front panel is denoted by the format of “Button Name (Bold) + Text Box” in the manual, for example, Utility denotes the “Utility” key.
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 pressing Utility at the front panel and then pressing System.
Content Conventions in this Manual:
DS1000Z series include the following models. Unless otherwise noted, this manual takes DS1104Z-S as an example to illustrate the command system of DS1000Z series.
II DS1000Z 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-6
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-6
:ACQuire:SRATe? .............................................................................................................. 2-7
: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-9
:CHANnel<n>:OFFSet .................................................................................................... 2-10
:CHANnel<n>:RANGe ..................................................................................................... 2-10
:CHANnel<n>:TCAL ....................................................................................................... 2-11
:CHANnel<n>:SCALe ...................................................................................................... 2-12
:CHANnel<n>:PROBe ..................................................................................................... 2-12
:CHANnel<n>:UNITs ...................................................................................................... 2-13
:CHANnel<n>:VERNier ................................................................................................... 2-13
:CURSor Commands .............................................................................................................. 2-14
:CURSor:MODE .............................................................................................................. 2-14
:CURSor:MANual ............................................................................................................ 2-15
:CURSor:TRACk .............................................................................................................. 2-20
:CURSor:AUTO:ITEM ...................................................................................................... 2-24
:CURSor:XY ................................................................................................................... 2-25
:DISPlay Commands ............................................................................................................. 2-28
:DISPlay:CLEar .............................................................................................................. 2-28
:DISPlay:DATA? .............................................................................................................. 2-29
:DISPlay:TYPE ............................................................................................................... 2-30
:DISPlay:GRADing:TIME ................................................................................................. 2-30
:DISPlay:WBRightness .................................................................................................... 2-30
:DISPlay:GRID ............................................................................................................... 2-31
:DISPlay:GBRightness ..................................................................................................... 2-31
IEEE488.2 Common Commands ............................................................................................. 2-32
*CLS ............................................................................................................................. 2-32
*ESE ............................................................................................................................. 2-32
DS1000Z Programming Guide III
RIGOL Contents
*ESR?............................................................................................................................ 2-33
*IDN? ............................................................................................................................ 2-33
*OPC ............................................................................................................................. 2-33
*RST ............................................................................................................................. 2-33
*SRE ............................................................................................................................. 2-33
*STB? ............................................................................................................................ 2-34
*TST? ........................................................................................................................... 2-34
*WAI ............................................................................................................................. 2-34
:MA TH Commands ................................................................................................................ 2-35
:MATH:DISPlay ............................................................................................................... 2-36
:MATH:OPERator ............................................................................................................ 2-36
:MATH:SOURce1 ............................................................................................................ 2-36
:MATH:SOURce2 ............................................................................................................ 2-37
:MATH:SCALe ................................................................................................................. 2-37
:MATH:OFFSet ............................................................................................................... 2-38
:MATH:INVert ................................................................................................................. 2-38
:MATH:RESet ................................................................................................................. 2-38
:MATH:FFT:WINDow ....................................................................................................... 2-39
:MATH:FFT:SPLit ............................................................................................................ 2-39
:MATH:FFT:UNIT ............................................................................................................ 2-40
:MATH:FFT:HSCale ......................................................................................................... 2-40
:MATH:FFT:HCENter ....................................................................................................... 2-41
:MATH:OPTion:STARt ...................................................................................................... 2-41
:MATH:OPTion:END ........................................................................................................ 2-42
:MATH:OPTion:INVert ..................................................................................................... 2-42
:MATH:OPTion:SENSitivity ............................................................................................... 2-43
:MATH:OPTion:DIStance ................................................................................................. 2-43
:MATH:OPTion:ASCale .................................................................................................... 2-43
:MATH:OPTion:THReshold1 ............................................................................................. 2-44
:MATH:OPTion:THReshold2 ............................................................................................. 2-44
:MASK Commands ................................................................................................................. 2-45
:MASK:ENABle ................................................................................................................ 2-45
:MASK:SOURce .............................................................................................................. 2-46
:MASK:OPERate .............................................................................................................. 2-46
:MASK:MDISplay ............................................................................................................ 2-47
:MASK:SOOutput ............................................................................................................ 2-47
:MASK:OUTPut ............................................................................................................... 2-48
:MASK:X ........................................................................................................................ 2-48
:MASK:Y ........................................................................................................................ 2-48
:MASK:CREate ................................................................................................................ 2-49
:MASK:PASSed? .............................................................................................................. 2-49
:MASK:FAILed? ............................................................................................................... 2-49
:MASK:TOTal? ................................................................................................................ 2-49
:MASK:RESet.................................................................................................................. 2-49
:MEASure Commands ............................................................................................................ 2-50
:MEASure:SOURce .......................................................................................................... 2-53
:MEASure:COUNter:SOURce ............................................................................................ 2-53
:MEASure:COUNter:VALue? ............................................................................................. 2-53
:MEASure:CLEar ............................................................................................................. 2-54
:MEASure:RECover ......................................................................................................... 2-54
:MEASure:ADISplay ........................................................................................................ 2-55
:MEASure:AMSource ....................................................................................................... 2-55
:MEASure:SETup:MAX ..................................................................................................... 2-56
:MEASure:SETup:MID ..................................................................................................... 2-56
:MEASure:SETup:MIN ..................................................................................................... 2-57
:MEASure:SETup:PSA ...................................................................................................... 2-57
:MEASure:SETup:PSB ...................................................................................................... 2-58
:MEASure:SETup:DSA ..................................................................................................... 2-58
IV DS1000Z Programming Guide
Contents RIGOL
:MEASure:SETup:DSB ..................................................................................................... 2-58
:MEASure:STATistic:DISPlay ............................................................................................ 2-59
:MEASure:STATistic:MODE .............................................................................................. 2-59
:MEASure:STATistic:RESet ............................................................................................... 2-60
:MEASure:STATistic:ITEM ................................................................................................ 2-60
:MEASure:ITEM .............................................................................................................. 2-61
:REFerence Com mands ......................................................................................................... 2-62
:REFerence:DISPlay ........................................................................................................ 2-62
:REFerence<n>:ENABle .................................................................................................. 2-62
:REFerence<n>:SOURce ................................................................................................. 2-63
:REFerence<n>:VSCale .................................................................................................. 2-63
:REFerence<n>:VOFFset ................................................................................................ 2-64
:REFerence<n>:RESet .................................................................................................... 2-64
[:SOURce[<n>]] Commands (DS1000Z-S Only) ....................................................................... 2-65
[:SOURce[<n>]]:OUTPut[<n>][:STATe] .......................................................................... 2-66
[:SOURce[<n>]]:OUTPut[<n>]:IMPedance ...................................................................... 2-66
[:SOURce[<n>]]:FREQuency[:FIXed] ............................................................................... 2-67
[:SOURce[<n>]]:PHASe[:ADJust] .................................................................................... 2-67
[:SOURce[<n>]]:PHASe:INITiate .................................................................................... 2-68
[:SOURce[<n>]]:FUNCtion[:SHAPe] ................................................................................ 2-68
[:SOURce[<n>]]:FUNCtion:RAMP:SYMMetry .................................................................... 2-69
[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] .............................................. 2-69
[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate]:OFFSet ..................................................... 2-70
[:SOURce[<n>]]:PULSe:DCYCle ...................................................................................... 2-70
[:SOURce[<n>]]:MOD[:STATe]........................................................................................ 2-71
[:SOURce[<n>]]:MOD:TYPe ........................................................................................... 2-71
[:SOURce[<n>]]:MOD:AM[:DEPTh] ................................................................................. 2-72
[:SOURce[<n>]]:MOD:AM:INTernal:FREQuency ............................................................... 2-72
[:SOURce[<n>]]:MOD:FM:INTernal:FREQuency ................................................................ 2-72
[:SOURce[<n>]]:MOD:AM:INTernal:FUNCtion .................................................................. 2-73
[:SOURce[<n>]]:MOD:FM:INTernal:FUNCtion ................................................................... 2-73
[:SOURce[<n>]]:MOD:FM[:DEVIation] ............................................................................ 2-73
[:SOURce[<n>]]:APPLy? ................................................................................................. 2-74
[:SOURce[<n>]]:APPLy:NOISe ........................................................................................ 2-74
[:SOURce[<n>]]:APPLy:PULSe ........................................................................................ 2-74
[:SOURce[<n>]]:APPLy:RAMP ......................................................................................... 2-74
[:SOURce[<n>]]:APPLy:SINusoid .................................................................................... 2-74
[:SOURce[<n>]]:APPLy:SQUare ...................................................................................... 2-74
[:SOURce[<n>]]:APPLy:USER ......................................................................................... 2-74
:SYSTem Commands ............................................................................................................. 2-76
:SYSTem:AUToscale ........................................................................................................ 2-76
:SYSTem:BEEPer ............................................................................................................ 2-76
:SYSTem:ERRor[:NEXT]? ................................................................................................. 2-77
:SYSTem:GPIB ............................................................................................................... 2-77
:SYSTem:LANGuage ....................................................................................................... 2-77
:SYSTem:LOCKed ........................................................................................................... 2-77
:SYSTem:PON ................................................................................................................ 2-78
:SYSTem:OPTion:INSTall ................................................................................................. 2-78
:SYSTem:OPTion:UNINSTall ............................................................................................. 2-78
:TIMebase Commands ........................................................................................................... 2-79
:TIMebase:DELay:ENABle ............................................................................................... 2-79
:TIMebase:DELay:OFFSet ............................................................................................... 2-79
:TIMebase:DELay:SCALe ................................................................................................. 2-80
:TIMebase[:MAIN]:OFFSet .............................................................................................. 2-80
:TIMebase[:MAIN]:SCALe ............................................................................................... 2-81
:TIMebase:MODE ........................................................................................................... 2-81
:TRIGger Commands ............................................................................................................. 2-82
:TRIGger:MODE ............................................................................................................. 2-82
DS1000Z Programming Guide V
RIGOL Contents
:TRIGger:COUPling ......................................................................................................... 2-83
:TRIGger:STATus? .......................................................................................................... 2-83
:TRIGger:SWEep ............................................................................................................ 2-83
:TRIGger:HOLDoff .......................................................................................................... 2-84
:TRIGger:NREJect .......................................................................................................... 2-84
:TRIGger:EDGe .............................................................................................................. 2-85
:TRIGger:PULSe ............................................................................................................. 2-87
:TRIGger:SLOPe ............................................................................................................. 2-90
:TRIGger:VIDeo ............................................................................................................. 2-95
:TRIGger:PATTern ........................................................................................................... 2-98
:TRIGger:DURATion ...................................................................................................... 2-100
:TRIGger:TIMeout (Option) ........................................................................................... 2-103
:TRIGger:RUNT (Option) ............................................................................................... 2-105
:TRIGger:WINDows (Option) ......................................................................................... 2-109
:TRIGger:DELay (Option) .............................................................................................. 2-112
:TRIGger:SHOLd (Option) ............................................................................................. 2-115
:TRIGger:NEDGe (Option) ............................................................................................. 2-118
:TRIGger:RS232 (Option) .............................................................................................. 2-120
:TRIGger:IIC (Option) ................................................................................................... 2-124
:TRIGger:SPI (Option) .................................................................................................. 2-128
:WAVeform Commands ........................................................................................................ 2-132
:WAVeform:SOURce ...................................................................................................... 2-133
:WAVeform:MODE ........................................................................................................ 2-134
:WAVeform:FORMat ...................................................................................................... 2-134
:WAVeform:DATA? ........................................................................................................ 2-135
:WAVeform:XINCrement? .............................................................................................. 2-136
:WAVeform:XORigin? .................................................................................................... 2-136
:WAVeform:XREFerence? ............................................................................................... 2-136
:WAVeform:YINCrement? .............................................................................................. 2-137
:WAVeform:YORigin? .................................................................................................... 2-137
:WAVeform:YREFerence? ............................................................................................... 2-137
:WAVeform:STARt ......................................................................................................... 2-138
:WAVeform:STOP ......................................................................................................... 2-138
:WAVeform:PREamble? ................................................................................................. 2-139
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
VI DS1000Z Programming Guide
Chapter 1 Programming Overview RIGOL

Chapter 1 Programming Overview

This chapter introduces how to build the remote communication between the PC and instrument and provides an overview of the syntax, symbol, parameter type and abbreviation rules of the SCPI commands.
Main topics of this chapter:
To Build Remote Communication Remote Control Methods SCPI Command Overview
DS1000Z Programming Guide 1-1
1
2 3 4

To Build Remote Communication

This oscilloscope can build communication with PC through USB, LAN or GPIB (option) interface. This section will introduces detailly how to control the oscilloscope remotely through USB interface using Ultra Sigma.
Operation Steps:
1. Install the Ultra Sigma common PC software
Download the Ultra Sigma common PC software from CD supplied with the accessories and install it according to the instructions.
2. Connect the instrument and PC and configure the interface parameters of the instrum ent
DS1000Z can build communication with PC through USB, LAN or G PIB (option) interface. This manual takes USB 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 USB cable.
(2) Install the USB driver
This oscilloscope is a USBTMC device. Assuming that your PC has already been installed with Ultra Sigma, after y ou connect the oscilloscope to the PC and turn both on for the first time (the oscilloscope is automatically configured to USB interface), the New Hardware Wizard as shown in the figure below is displayed on the PC. Please install the “USB Test and Measurement Device” driver following the directions in the wizard. The steps are as follows.
www.rigol.com or acquire it from the resource
1-2 DS1000Z Programming Guide
5 6 7
(3) Search device resource
Start up the Ultra Sigma and the software will automatically search for the oscilloscope resources currently connected to the PC. You can also click During the search, the status bar of the software is as shown in the figure below.
to search the resources.
DS1000Z Programming Guide 1-3
(4) View the device resource
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 as shown in the figure below.
(5) Communication test
Right click the resource name “DS1104Z (USB0::0x1AB1::0x04CE::DS1T0000000006::INSTR)” to select “SCPI Panel Control” to turn on the remote command control panel (as shown in the figure below) through which you can send commands and read data.

Remote Control Methods

1. User-defined Programming
Users can use SCPI (Standard Commands for Programmable I nstruments) command s to pr ogr am and control the oscilloscope. For details, refer to the introductions in Chapter 3
2. Send SCPI Commands via the PC Software
You can control the oscilloscope remotely by sending SCPI commands via the PC software (Ultra Sigma) provided by RIGOL Automation Explorer” of NI (National Instruments Corporation) or the “Agilent IO Libraries Suite” of Agilent (Agilent Technologies, Inc.).
1-4 DS1000Z Programming Guide
. Besides, you can also control the instrument using the “Measurement &
Programming Demos.

SCPI Command Overview

SCPI (Standard Commands for Programmable Instruments) is a standardized instrument programming language that is built upon the standard IEEE488.1 and IEEE 488.2 and conforms to various standards (such as the floating point operation rule in IEEE754 standard, ISO646 7-bit coded character for information interchange (equivalent to ASCll programming)). This section introduces the syntax, symbols, parameters and abbreviation rules of the SCPI commands.

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 and param e t e r 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 separates the multiple-level keywords. <type> represents the parameters available for setting. "?" represents query . The command :ACQuire:TYPE and parameter <type> are separated by space.
"," is generally used for separating multiple parameters contained in the same command, for example, :TRIGger:PATTern:PATTern <pattern1>,<pattern2>,<pattern3>,<pattern4>

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 vertic al 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.
DS1000Z Programming Guide 1-5

Parameter Type

1. Bool
The parameter could be OFF, ON, 0 or 1. For example, :MEASure:ADISplay <bool> :MEASure:ADISplay? Wherein, <bool> can be set to {{0|OFF}|{1|ON}}. The query returns 0 or 1.
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 r eal number between 1.600000e-08 (namely 16ns) to 0.1e+02 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, the :MEASure:ADISplay? command can be abbreviated to :MEAS:ADIS?.
1-6 DS1000Z Programming Guide
Chapter 2 Command System RIGOL

Chapter 2 Command System

This chapter introduces the syntax, function, parameter and using instruction of each DS1000Z command.
Main topics of this chapter:
:AUToscale :CLEar:RUN :STOP :SINGle:TFORce :ACQuire Commands :CALibrate Commands :CHANnel<n> Commands :CURSor Commands :DISPlay Commands IEEE488.2 Common Commands :MATH Commands :MASK Commands :MEASure Commands :REFerence Commands [:SOURce[<n>]] Commands (DS1000Z-S Only) :SYSTem Commands :TIMebase Commands :TRIGger Commands :WAVeform Commands
Note:
1. Unless otherwise noted, this manual takes DS1104Z-S as an example to introduces the commands.
2. For parameter setting commands (for example, time , frequency, amplitude and etc.), the oscilloscope can only accept numbers and set the parameters using default units and can not recognize the units following the parameters. For the default units of each parameter, please refer to the description in each command listed following.
DS1000Z Programming Guide 2-1
RIGOL Chapter 2 Command System
Syntax

:AUToscale

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

:CLEar

still be displayed. This command is equivalent to press the CLEAR key at the front panel.
Command

:STOP

waveform, this command is 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 press the AUTO key at
Explanation Theoretically, wavef orm auto setting f unction requires that the frequ ency of sine can
not be lower than 41Hz, the duty cycle should be greater than 1% as well as the amplitude must be greater than 20mVpp for square.
When the pass/fail function is enabled (see the
this command, the oscilloscope will disable the pass/fail function firstly and the execute waveform auto setting function.
When the waveform record function is enabled or during playback the recorded
:MASK:ENABle command), if y ou sent
:CLEar
Description Clear all the waveforms on the screen. If the oscilloscope is in RUN state, wavef orm will
Related
:DISPlay:CLEar
:RUN :STOP

Syntax :RUN

Description The :RUN command makes the oscilloscope starting running and the :STOP command
makes the oscilloscope stopping running. These commands are equivalent to press the
RUN/STOP key at the front panel.
Explanation When the waveform record function is enabled or during playback the recorded
2-2 DS1000Z Programming Guide
Chapter 2 Command System RIGOL
Syntax

:SINGle

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

:TFORce

key at the front panel.
Command
:SINGle
Description Set the oscilloscope to single trigger mode. This command is equivalent to the following
two operations: pressing the SINGLE key at the front panel, sending
Explanation In single trigger mode, the oscilloscope triggers once the trigger conditions are met
and then stops.
When the waveform record function is enabled or during playback the recorded
Related
Command
:TFORce :RUN
:TFORce
Description Generate a trigger signal forcefully. This command is only applicable to normal and single
Related
trigger mode (see the
:TRIGger:SWEep
:TRIGger:SWEep command) and is equivalent to press the FORCE
DS1000Z Programming Guide 2-3
RIGOL Chapter 2 Command System
:ACQuire:AVERages?
Description
Set or query the number of averages under average acquisition mode.
Name
Type
Range
Default
<count>
Integer
2n (n is an integer and ranges from 1 to 10)
2
response of the displayed waveform to the waveform changes will be.
Format
:ACQuire:AVERages? /*The query returns 128*/

:ACQuire Commands

:ACQuire commands are used to set or query the memory depth, acquisition mode and the current sample rate of the oscilloscope as well as to set the number of averages under average acquisition mode.
Command List
:ACQuire:AVERages:ACQuire:MDEPth:ACQuire:TYPE:ACQuire:SRATe?
[1]
Note
: 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 keyword.

:ACQuire:AVERages

Syntax :ACQuire:AVERages <count>
[1]
:
Parameter
Explanation You can sent the :ACQuire:TYPE command to set the acquisition mode.
In average acquisition mode, the greater the number of av erages is, the lower the
noise will be and the higher the vertical resolution will be but the slower the
Return
Example
Related
Command
The query returns an integer between 2 and 1024.
:ACQuire:AVERages 128 /*Set the number of averages to 128*/
:ACQuire:TYPE
2-4 DS1000Z 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
:ACQuire:MDEPth? /*The query returns 12000*/
:TIMebase[:MAIN]:SCALe

:ACQuire:MDEPth

Syntax :ACQuire:MDEPth <mdep>
Description Set or query the memory depth of the oscilloscope namely the number of waveform
Parameter
<mdep>
Discrete Refer to the Explanation
AUTO
Explanation When a single channel is on: {AUTO|12000|120000|1200000|12000000|24000000}
When dual channels are on: {AUTO|6000|60000|600000|6000000|12000000} When four channels are on: {AUTO|3000|30000|300000|3000000|6000000} Wherein, 24000000, 12000000 and 6000000 are optional.
The relationship among the memory depth, sample rate and waveform length is
satisfied with the following equation: Memory Depth Sample Rate × 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
:TIMebase[:MAIN]:SCALe command) and the number of the horizontal scales
the (12 for DS1000Z). When AUTO is selected, the oscilloscope will select the memory depth automatically
Return
Example
Related
The query returns the actual number of points (integer) or AUTO.
:ACQuire:MDEPth 12000 /*Set the memory depth to 12000*/
:ACQuire:SRATe?
Command
DS1000Z Programming Guide 2-5
RIGOL Chapter 2 Command System
:ACQuire:TYPE?
Description
Set or query the acquisition mode when the oscilloscope samples.
Name
Type
Range
Default
<type>
Discrete
{NORMal|AVERages|PEAK|HRESolution}
NORMal
storage rate of the acquisition memory.
Format
Example
:ACQuire:TYPE AVERages /*Select the average a c quisition mode*/
Command

:ACQuire:TYPE

Syntax :ACQuire:TYPE <type>
Parameter
Explanation
Return
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 senting the command.
The gr eater the number of av erages is, the lower the n oise will be and the
:ACQuire:AVERages
higher the vertical resolution will be but the slower the response of the displayed waveform to the waveform changes will be.
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
average the neighboring points of the sample waveform to reduce the r andom 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
The query returns NORM, AVER, PEAK or HRES.
Related
:ACQuire:AVERages
2-6 DS1000Z Programming Guide
Chapter 2 Command System RIGOL
:ACQuire:SRATe?
Query the current sample rate. The default unit is Sa/s.
(12 for DS1000Z).
Format
Example
:ACQuire:SRATe? /*The query returns 2.000000e+09*/
Syntax

:CALibrate:QUIT

Description
Exit the calibration at any time.
Command
Syntax

:CALibrate:STARt

Description
The oscilloscope starts to execute self-calibration.
sent the :CALibrate:QUIT command to quit the self-calibration.
Command

:ACQuire:SRATe?

Syntax
Description
Explanation Sample rate is the sample frequency of the oscilloscope, namely the waveform points
sampled per second.
The relationship among the memory depth, sample rate and waveform length is
satisfied with the following equation: Memory Depth Sample Rate × Waveform Length Wherein, the Memory Depth can be set using the the Waveform Length is the product of the horizontal timebase (set by
:TIMebase[:MAIN]:SCALe command) and the number of the horizontal scales
the
:ACQuire:MDEPth command and
Return
Related
Command
The query returns the sample rate in scientific notation.
:ACQuire:MDEPth :TIMebase[:MAIN]:SCALe

:CALibrate Commands

Command List:
:CALibrate:QUIT:CALibrate:STARt
:CALibrate:QUIT
Related
:CALibrate:STARt
:CALibrate:STARt
Explanation The self-calibration 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
Related
DS1000Z Programming Guide 2-7
:CALibrate:QUIT
RIGOL Chapter 2 Command System
:CHANnel<n>:BWLimit?
Description
Set or query the bandwidth limit parameter of the specified channel.
Name
Type
Range
Default
<n>
Discrete
{1|2|3|4}
<type>
Discrete
{20M|OFF}
OFF
frequency components.
Format
Example
:CHANnel1:BWLimit 20M /*Enable the 20MHz bandwidth limit*/

:CHANnel<n> Commands

:CHANnel<n> commands are used to set or query the vertical system parameters, such as 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
——
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 that exceed 20 MHz are attenuated.
Enabling the bandwidth limit can reduce the noise, but also can attenuate the high
Return
The query returns 20M or OFF.
2-8 DS1000Z 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
GND: the DC and AC components of the signal under test are both blocked.
Format
Example
:CHANnel1:COUPling AC /*Select AC coupling mode*/
:CHANnel<n>:DISPlay?
Description
Enable or disable the specified channel or query the status of the specified channel.
Name
Type
Range
Default
Others: 0|OFF
Format
Example
:CHANnel1:DISPlay ON /*Enable CH1*/
:CHANnel<n>:INVert?
the inverted display mode of the specified channel.
Name
Type
Range
Default
<n>
Discrete
{1|2|3|4}
<bool>
Bool
{{0|OFF}|{1|ON}}
0|OFF
inverted taking the vertical offset horizontal line as referen c e.
Format
Example
:CHANnel1:INVert ON /*Enable the inverted display mode of CH1*/

:CHANnel<n>:COUPling

Syntax :CHANnel<n>:COUPling <coupling>
Parameter
<n> Discrete {1|2|3|4} <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.
Return
The query returns AC, DC or GND.

:CHANnel<n>:DISPlay

Syntax :CHANnel<n>:DISPlay <bool>
Parameter
<n> Discrete {1|2|3|4}
<bool> Bool {{0|OFF}|{1|ON}}
——
——
CH1: 1|ON
Return
The query returns 0 or 1.

:CHANnel<n>:INVert

Syntax :CHANnel<n>:INVert <bool>
Description Enable or disable the inverted display mode of the specified channel or query the status of
Parameter
——
Explanation When the inverted display mode is enable, the oscilloscope displays the wa veform
Return
The query returns 0 or 1.
DS1000Z Programming Guide 2-9
RIGOL Chapter 2 Command System
:CHANnel<n>:OFFSet?
Description
Set or query the vertical offset of the specified channel. The default unit is V.
Name
Type
Range
Default
vertical scale<500mV/div: -2V to +2V
Format
:CHANnel1:OFFSet? /*The query returns 1.000000e-02*/
: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|3|4}
8mV to 80V
command.
Format
:CHANnel1:RANGe? /*The query returns 8.000000e+00*/
Command

:CHANnel<n>:OFFSet

Syntax :CHANnel<n>:OFFSet <offset>
Parameter
<n> Discrete {1|2|3|4}
<offset> Real
Return
Example
The query returns the vertical offset in scientific notation.
:CHANnel1:OFFSet 0.01 /*Set the vertical offset of CH1 to 10mV*/

:CHANnel<n>:RANGe

Syntax :CHANnel<n>:RANGe <range>
Parameter
<range> Real
Be dependent on the current vertical scale and probe ratio. When the probe ratio is 1, vertical scale500mV/div: -100V to +100V
Be dependent on the current vertical scale and probe ratio. When the probe ratio is 1,
——
0V
——
8V
Explanation This command indirectly modifies the vertical scale of the specified channel (vertical
:CHANnel<n>:SCALe
Return
Example
Related
range=8*vertical scale). The vertical scale can be set by the
The query returns the vertical range in scientific notation.
:CHANnel1:RANGe 8 /*Set the vertical range of CH1 to 8V*/
:CHANnel<n>:SCALe
2-10 DS1000Z Programming Guide
Chapter 2 Command System RIGOL
:CHANnel<n>:TCAL?
of the corresponding channel. The default unit is s.
Name
Type
Range
Default
<val>
Real
-100ns to 100ns
0.00ns
Horizontal Timebase
Step of Delay Calibration Time
5ns
100ps
10ns
200ps
20ns
400ps
50ns
1ns
100ns
2ns
200ns
4ns
500ns
10ns
1μs and above
20ns
Format
:CHANnel1:TCAL? /*The query returns 2.000000e-05*/
Command

:CHANnel<n>:TCAL

Syntax :CHANnel<n>:TCAL <val>
Description Set or query the delay calibration time of the specified channel to calibrate the zero of fset
Parameter
<n> Discrete {1|2|3|4}
——
Explanation The <val> parameter can only be set to specific values in specified step. If the parameter
you sent is not one of the values that can be set, the parameter will be set automatically to the nearest value. The step varies with the horizontal timebase (set by
:TIMebase[:MAIN]:SCALe command).
the
Return
The query returns the delay calibration time in scientific notation.
Example
Related
:CHANnel1:TCAL 0.00002 /*Set the delay calibration time to 20ns*/
:TIMebase[:MAIN]:SCALe
DS1000Z Programming Guide 2-11
RIGOL Chapter 2 Command System
:CHANnel<n>:SCALe?
Description
Set or query the vertical scale of the specified channel. The default unit is V.
Name
Type
Range
Default
used to improve the amplitude of waveform display to view signal d etails.
Format
:CHANnel1:SCALe? /*The query returns 1.000000e+00*/
:CHANnel<n>:VERNier
:CHANnel<n>:PROBe?
Description
Set or query the probe ratio of the specified channel.
Name
Type
Range
Default
Setting probe ratio will affect the range of current 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|3|4} <scale> Real Be dependent on the current probe ratio.
probe ratio = 1: 1mV to 10V
—— 1V (the probe
ratio is 10)
probe ratio = 10 (default): 10mV to 100V
Explanation The range of the vertical scale is dependent on the current probr ratio (set by
:CHANnel<n>:PROBe command). Because the default probe ratio of DS1000Z is
the 10, the default value of <scale> is the value when the probe ratio is 10.
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 1mV, 2mV, 5mV, 10mV, …, 10V. When the fine adjustment is on, you can further adjust the vertical scale within a relatively smaller range to improve 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
Return
Example
Related
The query returns the vertical scale in scientific notation.
:CHANnel1:SCALe 1 /*Set the vertical scale of CH1 to 1V*/
:CHANnel<n>:PROBe
Command

:CHANnel<n>:PROBe

Syntax :CHANnel<n>:PROBe <atten>
Parameter
<n> Discrete {1|2|3|4} <atten> Discrete {0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|1
00|200|500|1000}
Explanation Setting probe ratio refers to multiply the signal sampled with the specified ratio and
then display the result (the real amplitude of the signal will be not affected).
Return
Example
Related
The query returns the probe ratio in scientific notation.
:CHANnel1:PROBe 10 /*Set the probe ratio to 10*/
:CHANnel<n>:SCALe
—— 10
2-12 DS1000Z Programming Guide
Chapter 2 Command System RIGOL
:CHANnel<n>:UNITs?
Description
Set or query amplitude unit displayed of the specified channel.
Name
Type
Range
Default
<units>
Discrete
{VOLTage|WATT|AMPere|UNKNown}
VOLTage
Format
Example
:CHANnel1:UNITs VOLTage /*Set the amplitude unit displayed of CH1 to V*/
:CHANnel<n>:VERNier?
query the fine adjustment status of the vertical scale of the specified channel.
Name
Type
Range
Default
signal details.
Format
Example
:CHANnel1:VERNier ON /* Enable the fine adjustment of the vertical scale of CH1*/
Command

:CHANnel<n>:UNITs

Syntax :CHANnel<n>:UNITs <units>
Parameter
——
Return
<n> Discrete {1|2|3|4}
The query returns VOLT, WATT, AMP or UNKN.

: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|3|4} <bool> Bool {{0|OFF}|{1|ON}} 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 1mV, 2mV, 5mV, 10mV…10V. When the fine adjustment is on, you can further adjust the vertical scale within a relatively smaller range to improve 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 amplitude of waveform display to view
——
Return
Related
The query returns 0 or 1.
:CHANnel<n>:SCALe
DS1000Z Programming Guide 2-13
RIGOL Chapter 2 Command System
:CURSor:MODE?
Description
Set or query the cursor measurement mode.
Name
Type
Range
Default
<mode>
Discrete
{OFF|MANual|TRACk|AUTO|XY}
OFF
horizontal timebase mode is XY.
Format
Example
:CURSor:MODE MANual /*enable the manual cursor mode*/

:CURSor Commands

:CURSor comm ands are used to me asure the X -axis v alue (such as time) and Y-axis value (such as voltage) of the waveform displayed in the screen.
Command List:
:CURSor:MODE:CURSor:MANual:CURSor:TRACk:CURSor:AUTO:ITEM:CURSor:XY

:CURSor:MODE

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

:CURSor:MANual

Command List:
:CURSor:MANual:TYPE:CURSor:MANual:SOURce:CURSor:MANual:TUNit:CURSor:MANual:VUNit:CURSor:MANual:AX:CURSor:MANual:BX :CURSor:MANual:AY :CURSor:MANual:BY:CURSor:MANual:AXValue?:CURSor:MANual:AYValue? :CURSor:MANual:BXValue? :CURSor:MANual:BYValue? :CURSor:MANual:XDELta?:CURSor:MANual:IXDELta? :CURSor:MANual:YDELta?
:CURSor:MANual:TYPE
Syntax :CURSor:MANual:TYPE <type>
Parameter
Explanation X: select X type cursor. The X type cursors are a vertical solid line (cursor A) and a
vertical dotted line (cursor B) and are usually used to measure time parameters.
Y: select Y type cursor. The Y type cursors are a horizontal solid line (cursor A) and a
horizontal dotted line (cursor B) and are usually used to measure voltage
Return
The query returns X or Y.
DS1000Z Programming Guide 2-15
RIGOL Chapter 2 Command System
:CURSor:MANual:SOURce?
Description
Set or query the channel source in manual cursor measurement mode.
Name
Type
Range
Default
CHANnel3|CHANnel4|MATH}
Explanation
Only the channel is enabled currently can be selected.
Format
measurement mode to CH2*/
:CURSor:MANual:TUNit?
Description
Set or query the horizontal unit in manual cursor measurement mode.
Name
Type
Range
Default
<unit>
Discrete
{S|HZ|DEGRee|PERCent}
S
PERCent: AX, BX and BX-AX are in “%”.
Format
Example
:CURSor:MANual:TUNit DEGRee /* Set the horizontal unit to “degree”*/
:CURSor:MANual:VUNit?
Description
Set or query the vertical unit in manual cursor measurement mode.
Name
Type
Range
Default
<unit>
Discrete
{PERCent|SOURce}
SOURce
automatically set to the unit of the current source.
Format
Example
:CURSor:MANual:VUNit PERCent /* Set the vertical unit to %*/
Command
:CURSor:MANual:SOURce
Syntax :CURSor:MANual:SOURce <source>
Parameter
Return
Example
<source> Discrete {CHANnel1|CHANnel2|
The query returns CHAN1, CHAN2, CHAN3, CHAN4 or MATH.
:CURSor:MANual:SOURce CHANnel2 /*Set the channel source of manual cursor
CHANnel1
:CURSor:MANual:TUNit
Syntax :CURSor:MANual:TUNit <unit>
Parameter
Explanation S: AX, BX and BX-AX in the measurement results are in “s” and 1/|dX| is in “Hz”.
HZ: AX, BX and BX-AX in the measurement results are in “Hz” and 1/|dX| is in “s”. DEGRee: AX, BX and BX-AX are in “degree”.
Return
The query returns S, HZ, DEGR or PERC.
:CURSor:MANual:VUNit
Syntax :CURSor:MANual:VUNit <unit>
Parameter
Explanation PERCent: AY, BY and BY-AY in the measurement results are in “degree”.
SOURce: the units of AY, BY and BY-AY in the measurement results will be
Return
Related
The query returns PERC or SOUR.
:CHANnel<n>:UNITs
2-16 DS1000Z Programming Guide
Loading...
+ 142 hidden pages