RIGOL is regis t ered tradema rk of RIGOL Technologies, Inc.
Publication Number
PGA04109-1110
Notices
RIGOL products are protected by patent law in and outside of P.R.C..
RIGOL Technologies, In c . reserves the right to modify or ch a nge 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 consequenti al
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 copy or
photocopy or re arrange without prior written approval of RIGOL.
Product Certification
RIGOL guar antees thi s p roduct conf orms to the nati onal and in dustrial st andar ds 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 produc ts or this manual,
please contact RIGOL.
E-mail: service@rigol.com
Website: www.rigol.com
This chapter provides guidance to the remote control programming of the DS1000B
series digital oscilloscopes and introduction of the commands.
This chapter includes:
Communication Interface
Command Introduction
Command Syntax
Symbol Description
Command Input
Parameter Type
Command Input
Programming Guide for DS1000B Series
RIGOL Programming Introduction
1-2
Communication Interface
Computers can communicate with the oscilloscope by sending and receiving
messages over USB or LAN interface. Commands in the form of ASCII character
strings are embedded in your computer to make control easier.
Operations that you can do with a computer and the oscilloscope include:
Set up the oscilloscope;
Relational measurements;
Acquire data (wav e forms or measureme nt data) from the oscilloscope.
Equipment Connection:
USB: Use an USB data cable and connect the USB Device port on the rear panel
of the oscilloscope to PC.
LAN: Use a network cable and connet the oscilloscope t o LAN.
Programming Guide for DS1000B Series
Programming Introduction RIGOL
1-3
Command Introduction
Command Syntax
The commands system of DS1000B series oscilloscope is a multistage tree structure,
and each of sub-system is consists of a “Root” keyword and multilayered keywords.
The commands are always begin with a “:”(except for IEEE commands) and the
keywords are also separated by “:”; optional parameters are permitted to follow the
keywords; “?” appeared following a command line denotes to query this function;
besides, “space” is used to divide command and parameter.
For example:
:TRIGger:EDGE:SLOPe {POSitive|NEGative|ALTernation}
:TRIGger:EDGE:SLOPe?
TRIGger is the root keyword of the command, EDGE and SLOPe is separately its
second and th i rd keyword , a l l of them are se parated by “:”. Connects enclosed in the
“{}” denote the parameters permitted to be set by user; “?” denotes t o query; the
command :TRIGger:EDGE:SLOPe is set apart from parameter using “space”. “,” is
used to compart the parameters existed in some commands, for example:
:TRIGger:PATTern:PATTern <value>,<mask>,<ext source>[,<edge
source>,<edge>]
Programming Guide for DS1000B Series
RIGOL Programming Introduction
1-4
Symbol Description
The followin g symbols are not “real” parts of the co mmands, but they are usua lly used
to assist to explain the parameters containd in a command line.
1. Braces { }
The parameters or contents enclosed in “{}” must be selected, and only one
parameter or content could be selected once. All the options are separated by
“|”.
For ex ampl e:
{{1|ON}|{0|OFF}} indicateds th a t 1, ON, 0 or OFF can be se lecte d at a time.
2. Square brackets [ ]
Some keywords or contents are enclosed by square bracket “[ ]”, which
indicates that those parameters are optional and will be execute no matter
whether been omitted or not.
For ex ampl e:
:TIMebase[:MAIN]:OFFSet <offset>
[:MAIN] can be omitted.
3. Triangle Brackets < >
Parameter enclosed in “< >” should be replace d by a effective value.
For ex ampl e:
:DISPlay:BRIGhtness <ncount>
replaced by an effective value:
:DISPlay:BRIGhtness 80
Programming Guide for DS1000B Series
Programming Introduction RIGOL
1-5
Command Input
All the coman ds a re not se nsitive to both capital letter and lowercase, so y ou can use
any kind of them. But if use abbreviation, the capital letters specified in commands
must be written completely.
For ex ampl e:
:TRIGger:ALTernation:SOURce
also can be:
:TRIG:ALT:SOUR or :trig:alt:sour
Programming Guide for DS1000B Series
RIGOL Programming Introduction
1-6
Parameter Type
The commands contains 5 kinds of parameters, different parameters has different
setting methods.
1. Boolean
The parameter should be “OFF”, “ON”, “0” or “1”. For example :
:DISPlay:PERSist {{1|ON}|{0|OFF}}
“ON” and “1” denotes trun on (enable) the function, “OFF” and “0” denotes turn
off (disable) the fucntion.
2. Consecutive Integer
The parameter should be a consecutive integer. For example:
:DISPlay:BRIGhtness <ncount>
<ncount> could be the i nteger bet ween 0 and 100 (i ncluding 0 and 100).
3. Consecutive Real Number
The parameters can be any value only in effective range precision permitting.
For ex ampl e:
:TRIGger:SENSitivity <count>
<count> could be any value between 0.1 and 1 (including 0.1 and 1).
4. Discrete
The parameters can only be the cited value. For example:
:ACQuire:AVERages <count>
<count> could only be 2, 4, 8, 16, 32, 64, 128, 256.
5. ASCII Character String
The parameter should be composed of ASCII character string. For e xample:
:TRIGger:MODE <mod>
<mod> cou ld be EDGE, PULSe, VIDEO, PATTern or ALTernation.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-1
Chapter 2 Command Systems
In this chapter, we will introduce every comand in the DS1000B comm a nd systems.
The introduction inludes command format, function description, query/Returned
Format and some other notices that should pay attention to during using the
commands.
DS1000B series support the following command subsystems:
General Command
SYSTem Command
ACQuire Command
DISPlayDISPlay Command
TIMebase Command
TRIGger Command
Trigger Control
EDGE Trigger
PULS e Trigger
VIDEO Trigger
PATTern Trigger
ALTernation Trigger
MATH Command
CHANnel Command
MEASure Command
WAVeform Command
KEY Comm a nd
SAVe/RECall Command
MASK Command
CURSor Command
Other Command
Programming Guide for DS1000B Series
RIGOL Command Systems
2-2
General Commands
IEEE Standards have defined some general commands which are applied to query
basic information of the instrument or perform elementary operations. These
commands always have 3 characters and with a “*” marker.
DS1000B series support the following General Commands:
*IDN?
*RST
*LRN?
*OPC?
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-3
1. *IDN?
Command For ma t:
*IDN?
Function:
The command queries the manufacturer, the oscilloscope model, the product
serial and the software version.
Returned Format:
The query returns the data of system settings in the form of a self-defined
character string which could be downloaded to do the same settings in the
future.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-4
4. *OPC?
Command For ma t:
*OPC?
Function:
The command queries whether the command opera t ion has been com plet ed.
Returned Format:
The query returns 0 or 1 . 1 means o per ation has be en com pleted, 0 means no t.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-5
SYSTem Commands
SYSTem Commands are used for the basic operations of an os cillos co pe: R UN /STOP
control, operation of the error queue and system setup data.
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-6
1. :RUN
Command For ma t:
:RUN
Function:
Execute this command, the oscilloscope will start waveform sampling working.
To stop working, exe cute :STOP command again.
2. :STOP
Command For ma t:
:STOP
Function:
Execute this command, the oscilloscope will stop waveform sampling working.
To restart w orking, execute :RUN command again.
3. :AUTO
Command For ma t:
:AUTO
Function:
The command makes the oscilloscope tests all input waveforms and set the
waveforms automatically to get the optimum conditions to display.
4. :SYSTem:ERRor
Command For mat:
:SYSTem:ERRor
:SYSTem:ERRor?
Function:
The command clears the queue of error information.
Returned Format:
Programming Guide for DS1000B Series
Command Systems RIGOL
2-7
The query returns the last error, such as “Undefined header”. If there is n o erro r,
return “0, No error”.
For details about system error codes, please refer to page 2-8:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-8
System Error Code
5. :SYSTem:SETup
Command For ma t:
:SYSTem:SETup <setup_data>
:SYSTem:SETup?
Function:
The command downloads the system setup data. <setup data> is a binary data
that meets IEEE 488.2 # format.
Returned Format:
The query returns the value of system setup data.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-9
Error Code
Mnemonic Symbol
Error Description
System Error Code
Up to 10 errors can be record ed in the system error queu e. If not enough, the system will
adopt FIFO manner to cover the original error record.
The SYST:ERR? Command is used to read the first error code in the form of “error code, error
description”, so as to reduce the error number of error queue. For instance, if no error appears,
the system will return: 0, No error.
Besides, the :SYST:ERR Command is able to clear error queue.
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-16
1. :DISPlay:TYPE
Command For ma t:
:DISPlay:TYPE <type>
:DISPlay:TYPE?
Function:
The command sets the display type of acquisition points. The <type> may be
VECTors (acquisition point s are conne cted by lines) or DOTS (acquisition points
are displayed by dots).
Returned Format:
The query returns VECTORS or DOTS.
Example:
:DISP:TYPE VECT Set the disp l ay type a s vect ors.
:DISP:TYPE? Ret urn VECTORS.
2. :DISPlay:GRID
Command For ma t:
:DISPlay:GRID <grid>
:DISPlay:GRID?
Function:
The command sets the display type of screen grid. The <grid> may be FULL
(grid and coordinate are shown), HALF (grid is not shown) or NONE (grid and
coordinate are not shown).
Returned Format:
FULL or HALF, NONE.
Example:
:DISP:GRID FULL Make grid and coordinate shown.
:DISP:GRID? Return FULL.
3. :DISPlay:PERSist
Programming Guide for DS1000B Series
Command Systems RIGOL
2-17
Command For ma t:
:DISPlay:PERSist {{1|ON}|{0|OFF}}
:DISPlay:PERSist?
Function:
The command sets waveform persist f unction ON (The wavefor m is shown until
waveform persist function is off or relevant settings are changed.) or OFF (The
waveform is updated as high refresh rate).
Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:DISP:PERS ON Set waveform persist function on.
:DISP:PERS? Return 1.
4. :DISPlay:MNUDisplay
Command For mat:
:DISPlay:MNUDisplay <time>
:DISPlay:MNUDisplay?
Function:
The command sets the display time of menu. The menu will hide after the
display time. The <ti me> ma y be 1s, 2s , 5s, 10s, 2 0s or IN Finite (dis play all th e
time).
Returned Format:
The query returns 1s or 2s, 5s, 10s, 20s, Infinite.
Example:
:DISP:MNUD 10s Set the display time as 10s.
:DISP:MNUD? Return 10s.