RIGOL DS1000B User Manual

RIGOL
Programming Guide
DS1000B Series Digital Oscilloscope
DS1204B/DS1104B/DS1074B
Feb. 2014
RIGOL
I

Guaranty and Declaration

Copyright
© 2008 RIGOL Technologies, Inc. All Rights Reserved.
Trademark Information
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
Programming Guide for DS1000B Series
RIGOL
II
Content
Chapter 1 Programming Introduction .................................................. 1-1
Communication Interface ......................................................................... 1-2
Command Introduction ............................................................................ 1-3
Command Syn tax ............................................................................. 1-3
Symbol Desc ri pt ion ........................................................................... 1-4
Command I nput ............................................................................... 1-5
Parameter Type ................................................................................ 1-6
Chapter 2 Command Systems .............................................................. 2-1
General Commands ................................................................................. 2-2
SYSTem Commands................................................................................. 2-5
ACQuire Commands ............................................................................... 2-12
DISPlay Commands ................................................................................ 2-15
TIMebas e Co mm ands ............................................................................. 2-21
TRIGger Comma nds ............................................................................... 2-26
Trigger Control ................................................................................ 2-28
EDGE Trigger .................................................................................. 2-34
PULSe Trigger ................................................................................. 2-35
VIDEO Trigger ................................................................................. 2-36
PATTern Trigger ............................................................................... 2-38
ALTernation Trigger .......................................................................... 2-39
MATH Commands ................................................................................... 2-48
CHANnel Commands .............................................................................. 2-50
MEASure Commands .............................................................................. 2-57
WAVeform Command s ............................................................................ 2-69
KEY Commands ..................................................................................... 2-79
SAVe/RECall Commands .......................................................................... 2-97
MASK Command s ................................................................................. 2-103
CURSor Commands .............................................................................. 2-109
Other Commands ................................................................................. 2-116
Chapter 3 Programming Examples ....................................................... 3-1
Prepare for Programming ......................................................................... 3-2
Program in Visual C++ 6.0 ....................................................................... 3-3
Programming Guide for DS1000B Series
RIGOL
III
Program in Visual Basic 6.0 ...................................................................... 3-8
Program in L abVIEW 8.6 ........................................................................ 3-10
Appendix: Command Quick Reference A-Z ................................................. 1
Programming Guide for DS1000B Series
Programming Introduction RIGOL
1-1

Chapter 1 Programming Introduction

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:
manufacturer, <model>, <serial>, <version>.
Example:
Rigol Technologies, DS1204B, DS10000000, 00. 02 . 04.
2. *RST Command For ma t:
*RST
Function:
The command resets the system.
3. *LRN? Command For mat:
*LRN?
Function:
The command queries the system settings.
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.
SYSTem Commands include:
:RUN :STOP :AUTO :SYSTem:ERRor :SYSTem:SETup
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.
0 ERR_NONE, No error 1 ERR_SAME_SETTING, Same setting 2 ERR_INVALID_INPUT, Invalid input 3 ERR_LIMIT_SETTING, Setting limit 4 ERR_CH_OFFSET_LIMIT, Channel offset limit 5 ERR_CH_SCALE_LIMIT, Channel scale limit 6 ERR_CH_PROBE_LIMIT, Channel probe limit 7 ERR_CH_FILTER_LIMIT, Channel filter limit 8 ERR_TIME_OFFSET_LIMIT, Timebase offset limit 9 ERR_TIME_SCALE_LIMIT, Timebase scale limit 10 ERR_TIME_DELAYED_OFFSET_LIMIT, Timebase of timedelay offset limit 11 ERR_TIME_DELAYED_SCALE_LIMIT, Timebase of timedelay scale limit 12 ERR_TRIG_LEVEL_LIMIT, Trigger level limit 13 ERR_MATH_VERT_OFFSET_LIMIT, Math vertical offset limit 14 ERR_MATH_VERT_SCALE_LIMIT, Math vertical scale limit 15 ERR_FFT_VERT_SCALE_LIMIT, FFT vertical offset limit 16 ERR_FFT_VERT_OFFSET_LIMIT, FFT vertical offset limit 17 ERR_FFT_HORIZ_SCALE_LIMIT, FFT horizontal scale limit 18 ERR_FFT_HORIZ_OFFSET_LIMIT, FFT horizontal offset limit 19 ERR_CUR_A_X_LIMIT, CursorA X-Axial limit 20 ERR_CUR_B_X_LIMIT, CursorB X-Axial limit 21 ERR_CUR_A_Y_LIMIT, CursorA Y-Axial limit 22 ERR_CUR_B_Y_LIMIT, CursorB Y-Axial limit 23 ERR_HOLDOFF_TIME_LIMIT, Holdoff time limit 24 ERR_INTENSITY_LIMIT, Intensity limit 25 ERR_PULSE_WIDTH_LIMIT, Pulse width limit
Programming Guide for DS1000B Series
RIGOL Command Systems
2-10
26 ERR_VIDEO_LINE_LIMIT, Video line limit 27 ERR_REC_INTERVAL_LIMIT, Record interval limit 28 ERR_REC_END_FRAME_LIMIT, Record end frame limit 29 ERR_PLAY_INTERVAL_LIMIT, Play interval limit 30 ERR_PLAY_START_FRAME_LIMIT, Play start frame limit 31 ERR_PLAY_CUR_FRAME_LIMIT, Play current frame limit 32 ERR_PLAY_END_FRAME_LIMIT, Play end frame limit 33 ERR_STOARAGE_START_FRAME_LIMIT, Storage start frame limit 34 ERR_STOARGE_END_FRAME_LIMIT, Storage end frame limit 35 ERR_REF_VERT_OFFSET_LIMIT, Ref vertical offset limit 36 ERR_REF_VERT_SCALE_LIMIT, Ref vertical scale limit 37 ERR_PF_MASK_LIMIT, Passfail mask limit 38 ERR_SAMPLING_RATE_LIMIT, Sampling rate limit 39 ERR_GRID_INTENSITY_LIMIT, Grid intensity limit 40 ERR_TRIG_SENSITIVITY_LIMIT, Trigger sensitivity limit 41 ERR_TRIG_SLOPE_TIME_LIMIT, Trigger slop time limit 42 ERR_MEM_DEPTH_LIMIT, Memory depth limit 43 ERR_FUNCTION_NOT_AVAILABLE, Function not available 44 ERR_LOCATION_EMPTY, Location empty 45 ERR_MEAS_ALREADY_SELECTED, Measure already selected 46 ERR_NO_SIGNAL_FOUND, No signal found 47 ERR_WAVEFORM_RECORD_FINISHED, Waveform record finished 48 ERR_FILE_UTILITY_FAIL, File utility fail 49 ERR_CHANNEL_INVALID, Channel invalid 50 ERR_AUTO_KEY_LIMITED, Auto key limited 51 ERR_NOT_ENOUGH_MEMORY, Not enough memory 52 ERR_WAVE_SAVE_FAILED, Waveform save failed 53 ERR_WAVE_LOAD_FAILED, Waveform load failed 54 ERR_FILE_IS_COVERED, File is covered 55 ERR_FILTER_IS_CLOSED, Filter is closed 56 ERR_WAVE_TYPE_NONE, No signal detected 57 ERR_WAVE_TYPE_DC, DC signal detected 58 ERR_WAVE_TYPE_SINE, Sine signal detected 59 ERR_WAVE_TYPE_RAMP, Triangle signal detected 60 ERR_WAVE_TYPE_RECT, Square signal detected 61 ERR_WAVE_TYPE_UNKNOWN, Unknown signal detected 62 CMD_ERR, Error header 63 CMD_NOT_PARSE, Undefined header
Programming Guide for DS1000B Series
Command Systems RIGOL
2-11
64 ERR_PF_OUTPUT, PassFail Out 65 ERR_MISSING_HW, Missing Hardware 66 ERR_OUT_OF_RANGE Out of range
67 ERR_CANNOT_EXECURE Can’ t execute
Programming Guide for DS1000B Series
RIGOL Command Systems
2-12

ACQuire Commands

ACQuire Commands are used to set the acquisition mode for oscilloscope. ACQuire Commands include:
:ACQuire:TYPE :ACQuire:MODE :ACQuire:AVERages :ACQuire:SRATe?
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-13
1. :ACQuire:TYPE Command For ma t:
:ACQuire:TYPE <type> :ACQuire:TYPE?
Function:
The command sets the acquisition type. The <type>may be NORMal(common sample), AVERage(average sample) or PEAKdetect(peak detection).
Returned Format:
The query returns Normal or AVERAGE, PEAKDETECT.
Example:
:ACQ:TYPE AVERage Set the acquisition type as average acquisition. :ACQ:TYPE? Return AVERAGE.
2. :ACQuire:MODE Command For ma t:
:ACQuire:MODE <mode> :ACQuire:MODE?
Function:
The command sets the acquisit ion mode. The <mode> may be RT IMe (real time sample) or ETIMe (equal time sample).
Returned Format:
The query returns RTIME or ETIME.
Example:
:ACQ:MODE ETIM Set the acquisition mode as equal time acquisition. :ACQ:MODE? Return ETIME.
3. :ACQuire:AVERages Command For ma t:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-14
:ACQuire:AVERages <count> :ACQuire:AVERages?
Function:
The command sets the average acquisition time. The <count> range is 2~256, and the count increases by the power operation of 2.
Returned Format:
The query returns 2 or 4, 8, 16, 32, 64, 128, 256.
Example:
:ACQ:AVER 16 Set the average acquisition time as 16. :ACQ:AVER? Return 16.
4. :ACQuire:SRATe? Command For ma t:
:ACQuire:SRATe? [{<CHANnel<n>}]
Function
To query sample rate of CHANnel <n>, <n> may be 1, 2, 3, 4.
Returned Format:
The query returns 5.000e005, the unit is Sa/s.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-15

DISPlay Commands

DISPlay Commands are used to set the display system. DISPlay Commands include:
:DISPlay:TYPE :DISPlay:GRID :DISPlay:PERSist :DISPlay:MNUDisplay :DISPlay:MNUStatus :DISPlay:SCReen :DISPlay:CLEar :DISPlay:BRIGhtness :DISPlay:INTensity :DISPlay:DATA?
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.
5. :DISPlay:MNUStatus Command For ma t:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-18
:DISPlay:MNUStatus {{1|ON}|{0|OFF}} :DISPlay:MNUStatus?
Function:
The command sets menu display function ON (Performing menu operation) or OFF (viewing the waveform).
Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:DISP:MNUS ON Set menu display function on. :DISP:MNUS? Return 1.
6. :DISPlay:SCReen Command For mat:
:DISPlay:SCReen <scr> :DISPlay:SCReen?
Function:
The command sets the display mode of screen. The <scr>may be NORMal (normal display mode ) or INVerted (inverted di s pl ay mode).
Returned Format:
The query returns NORMAL or INVERTED .
Example:
:DISP:SCR NORM Set the screen as normal display mode. :DISP:SCR? Return NORMAL.
7. :DISPlay:CLEar Command For ma t:
:DISPlay:CLEar
Function:
Programming Guide for DS1000B Series
Command Systems RIGOL
2-19
The command clears the out of date waveforms on the screen during waveform persist.
8. :DISPlay:BRIGhtness Command For ma t:
:DISPlay:BRIGhtness <count> :DISPlay:BRIGhtness?
Function:
The command sets the brightness of grid. The <count > range is 0~10 0, and t he bigger the count is, the brighter the grid becomes.
Returned Format:
The query returns 0 or 1, 2 ……100.
Example:
:DISP:BRIG 10 Set the grid brightness as 10. :DISP:BRIG? Return 10.
9. :DISPlay:INTensity Command For ma t:
:DISPlay:INTensity <count> :DISPlay:INTensity?
Function:
The command sets the brightness of the waveform. The <count> range is 0~100, and the bigger the count is, the brighter the waveform becomes.
Returned Format:
The query returns 0 or 1, 2 ……100.
Example:
:DISP:INT 12 S et the waveform brightness as 12. :DISP:IN? Return 12.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-20
10. :DISPlay:DATA? Command For ma t:
:DISPlay:DATA?
Function:
The command queries image data on the current screen. The data format accords with IEEE 488.2 standard. The data structure is: #800078788+t he dat a of 8 bit bitmap.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-21

TIMebase Commands

TIMebase Commands are used to set horizontal scal e and horizontal offset. Changing horizontal scale makes the waveform enlarge or shrink; and changing horizontal position will lead the waveform offset relative to center screen.
TIMebase Commands include:
:TIMebase:MODE :TIMebase[:MAIN]:OFFSet :TIMebase:DELayed:OFFSet :TIMebase[:MAIN]:SCALe :TIMebase:DELayed:SCALe :TIMebase:FORMat
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-22
1. :TIMebase:MODE Command For ma t:
:TIMebase:MODE <mode> :TIMebase:MODE?
Function:
The command sets the scan mode of horizontal timebase as MAIN (main time base) or DELayed (zoomed scan t ime bas e).
Returned Format:
The query returns MAIN or DELAYED.
Example:
:TIM:MODE MAIN Set the scan mode as main time base. :TIM:MODE? Return M AIN.
2. :TIMebase[:MAIN]:OFFSet Command For ma t:
:TIMebase[:MAIN]:OFFSet <offset> :TIMebase:MAIN:OFFSet?
Function:
The command sets the timebase offset of main mode, that is the offset of the waveform position relative to center screen. In NORMAL mode , <o ffs e t>: 1s ~ memory capacitance; In STOP mode, <offset>: -500s ~ +500s; In SCAN mode, <offset>: ( -6*MainScale + 6*DelayedScale) ~ ( 6*MainScale – 6*DelayedScale) Scale is the current horizontal scale, and the unit is s/div.
Returned Format:
The query returns the value of timebase offset, and the unit is s.
Example:
:TIM:MODE MAIN Set the scan mode as main. :TIM:OFFS 1 Set the ti m ebase offset as 1s.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-23
:TIM:OFFS? Return 1.000e000.
3. :TIMebase:DELayed:OFFSet Command For ma t:
:TIMebase:DELayed:OFFSet <offset> :TIMebase:DELayed:OFFSet?
Function:
The command sets the timebase offset of delayed scan, that is the offset of the waveform position relative to center screen. In NORMAL mode, <offse t >: 1s ~ memory capac i tance; In STOP mode, <offset>: -500s ~ +500s; In SCAN mode, <offset>: ( -6*MainScale + 6*DelayedScale
) ~(6*Ma i nScale – 6*DelayedScale)
Scale is the current horizontal scale, and the unit is s/div.
NOTE: In Delayed mode, only Delayed offset can be changed but for Main offset. Thereinto: the time range: +/- 6*MainScale; The length of time is 12*DelayedScale; So Delayed Offset range is: (-6*MainScale + 6*DelayedScale) ~ (6*MainScale-6*DelayedScale). For example: When Main 5ms, Delay 2ms, EMS memory time is +/- 6*5=30ms, Delay time is 6*2 = 12ms. Delay Offset range: (-30+6) ~ (30-6) ms.
Returned Format:
The query returns the value of offset, and the unit is s.
Example:
:TIM:MODE DEL Set the scan mode as delayed scan. :TIM:DEL:OFFS 1 Set the timebase offset as 1s. :TIM:DEL:OFFS? Return 1.000e000.
4. :TIMebase[:MAIN]:SCALe Command For ma t:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-24
:TIMebase[:MAIN]:SCALe <scale_val> :TIMebase[:MAIN]:SCALe?
Function:
The command sets the timebase scale of main mode, and the unit is s/div. In NORMAL mode, different types of instruments have different sweep
ranges: DS1204B , <scale_val> range: 1ns/div~50s/div. DS1104B, <scale_val>range: 2ns/div~50s/div. DS1074B, <scale_val>range: 5ns/div~50s/div.
In SCAN mode, <scale_val>range: 50ms ~ 50s.
Returned Format:
The query returns the value of timebase scale, and the unit is s.
Example:
:TIM:MODE MAIN Set the scan mode as main. :TIM:SCAL 2 Set the timebase scal e as 2s. :TIM:SCAL? Return 2.000e000.
5. :TIMebase:DELayed:SCALe Command For ma t:
:TIMebase:DELayed:SCALe <scale_val> :TIMebase:DELayed:SCALe?
Function:
The command sets the timebase scale of delayed scan, and the unit is s/div. When the “Delayed” is “ON”, for view waveform details, the waveform may be amplified under the width of window vary with the delayed timebase scale. In NORMAL mode, different types of instruments have different sweep
ranges: DS1204B, <scale_val > r ange: 1ns/div~50s/div. DS1104B, <scale_val>range: 2ns/div~50s/div. DS1074B, <scale_val>range: 5ns/div~50s/div.
In SCAN mode, <scale_val>range: 50ms ~ 50s.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-25
Returned Format:
The query returns the value of timebase scale, and the unit is s.
Example:
:TIM:MODE DEL Set the scan mode as delayed scan. :TIM:DEL:SCAL 2 Set the timebase scale as 2s. :TIM:DEL:SCAL? Return 2.000e000.
6. :TIMebase:FORMat Command For mat:
:TIMebase:FORMat <vlaue> :TIMebase:FORMat?
Function:
The command sets the timebase format as XY (the amplitude of channel 1 is shown in X axis, and the amplitude of channel 2 is shown in Y axis), YT (the relationship between the voltage and the time is shown) or ROLL (the acquisition points on screen are updated from left to right).
Returned Format:
The query returns X-Y or Y -T, ROLL.
Example:
:TIM:FORM YT Set the timebas e format as Y-T. :TIM:FORM? Return Y -T.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-26

TRIGger Commands

Trigger system makes the meaningful waveform shown steadily. Trigger determines when the oscilloscope starts to acquire data and to display a w avefo rm. When trigger is set up properly, it can convert unstable displays into meaningful waveforms.
When the oscilloscope starts to acquire data, firstly enough data are needed to be collected so as to shape into a waveform on the left of the trigger point. The oscilloscope continues acquirin g data w hile w aiting f or t he trig ger con dition t o oc cur. After it detects a trigger, the oscilloscope c ontinues to a cquire en ough data so that it can display the waveform on the right of the trigger point.
Trigger Mode includes: Edge, Pulse, Video, Pattern and Alternation trigger. TRIGger Commands includ e:
Trigger Control Command
:TRIGger:MODE :TRIGger<mode>:SOURce :TRIGger<mode>:LEVel :TRIGger<mode>:SWEep :TRIGger:SENSitivity :TRIGger:COUPling :TRIGger:HFREject :TRIGger:HOLDoff :TRIGger:STATus? :Trig%50 :FORCetrig :SINGLE
EDGE Command
:TRIGger:EDGE:SLOPe
PULSe Command
:TRIGger:PULSe:MODE :TRIGger:PULSe:WIDTh
Programming Guide for DS1000B Series
Command Systems RIGOL
2-27
VIDEO Command
:TRIGger:VIDEO:MODE :TRIGger:VIDEO:POLarity :TRIGger:VIDEO:STANdard :TRIGger:VIDEO:LINE
PATTern Command
:TRIGger:PATTern:PATTern
ALTernation Command
:TRIGger:ALTernation:SOURce :TRIGger:ALTernation:CURRentSOURce :TRIGger:ALTernation:TYPE :TRIGger:ALTernation:TimeSCALe :TRIGger:ALTernation:TimeOFFSet :TRIGger:ALTernation:LEVel :TRIGger:ALTernation:EDGE:SLOPe :TRIGger:ALTernation:PULSe:MODE :TRIGger:ALTernation:PULSe:TIME :TRIGger:ALTernation:VIDEO:POLarity :TRIGger:ALTernation:VIDEO:STANdard :TRIGger:ALTernation:VIDEO:MODE :TRIGger:ALTernation:VIDEO:LINE :TRIGger:ALTernation:COUPling :TRIGger:ALTernation:HFREject :TRIGger:ALTernation:HOLDoff :TRIGger:ALTernation:SENSitivity
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-28

Trigger Control

1. :TRIGger:MODE Command For ma t:
:TRIGger:MODE <mode> :TRIGger:MODE?
Function:
The command sets the trigger mode as EDGE, PULSe, VIDEO, ALTernation or PATTern trigger.
Returned Format:
The query returns EDGE or PULSE, VIDEO, ALTERNATION, PATTERN.
Example:
:TRIG:MODE EDGE Set the trigger mode as edge trigger. :TRIG:MODE? Return EDGE.
2. :TRIGger<mode>:SOURce Command For mat:
:TRIGger<mode>:SOURce <source> :TRIGger<mode>:SOURce?
Function:
The command sets the trigger source as channel (CH1, CH2, CH3, CH4), external trigger (EXT, EXT5) or AC Line. The< mode> is :EDGE, the <source> may be CHANnel<n>, EXT, EXT5 or ACLine; The< mode> is :PULSE, the <source> may be CHANnel<n>, EXT or EXT5; The< mode> is :VIDEO, the <source> may be CHANnel<n>, EXT or EXT5; The <mode> is :PATTern, <source> may be CHANnel<n>, EXT or EXT5. The <n> may be 1, 2, 3 or 4.
Returned Format:
The query returns CH1 or CH2, CH3, CH4, EXT, EXT5, ACLINE.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-29
Example:
:TRIG:EDGE:SOUR CHAN1 Set the edge trigger source as channel 1. :TRIG:EDGE:SOUR? Return CH1.
3. :TRIGger<mode>:LEVel Command For ma t:
:TRIGger<mode>:LEVel <level>[,<src>] :TRIGger<mode>:LEVel? [,<src>]
Function:
The command sets the voltage level of Edge, Pulse or Video trigger.
<mode> may be :EDGE, :PULSe or :VIDEO or :PATTern. <level> range: (- 6*Scale-Offset) ~(+6*Scale+Offset).
Scale is the current vertical scale, and the unit is V/div.
In PATTern mode, <src> should be set to CHANnel<n> or EXT.
NOTE: Trigger Level r ange is up to+/-6 Scale, when channel has offset, it needs to detract offset ,such as 1V tap position, 1V offset, the trigger range is -7V~5V.
Returned Format:
The query returns the value of voltage level, and the unit is V.
Example:
:TRIG:EDGE:LEV 2 Set the trigg er level as 2V. :TRIG:EDGE:LEV? Return 2.000e 000.
4. :TRIGger<mode>:SWEep Command For ma t:
:TRIGger<mode>:SWEep {AUTO|NORMal|SINGle} :TRIGger<mode>:SWEep?
Function:
The command sets the trigger mode. The <mode> may be :EDGE, :PULSe or :PATTern.
AUTO: When no trigger is existing, the system will gener ate a trig ger si gnal
to force trigger;
Programming Guide for DS1000B Series
RIGOL Command Systems
2-30
NORMal: Acq u ire waveform when trigger occurred;
SINGle: Execute once trigger when all the conditi on are marched and stop.
Returned Format:
The query returns AUTO or NO RMAL, SINGLE.
Example:
:TRIG:EDGE :SWE AUTO Set the trigger type as AUTO. :TRIG:EDGE :SWE? Return AUTO.
5. :TRIGger:SENSitivity Command For mat:
:TRIGger:SENSitivity <count> :TRIGger:SENSitivity?
Function:
The command sets the trigger sensitivity. The <count> range is 0.1div~1div.
Returned Format:
The query returns the value of trigger sensitivity, and the unit is div.
Example:
:TRIG:SENS 0.2 Set the trigger sensitivity as 0.2div. :TRIG:SENS? Return 2.000e-001.
6. :TRIGger:COUPling Command Format:
:TRIGger:COUPling {DC|AC|LF} :TRIGger:COUPling?
Function:
The command sets the coupling mode.
DC: Allow all signals pass; AC: Reject DC signals and attenuate the signal below 10Hz; LF: Reject DC signals and attenuate the signals below 8kHz.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-31
Returned Format:
The query returns DC, AC or LF.
Example:
:TRIG:COUP DC Se t th e coupling mode as DC. :TRIG:COUP? Return DC.
7. :TRIGger:HFREject Command For ma t:
:TRIGger:HFREject {{1|ON}|{0|OFF}} :TRIGger:HFREject?
Function:
The command sets high frequency reject function on or off.
Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:TRIG:HFRE ON Set HFR on. :TRIG:HFRE? Return 1.
8. :TRIGger:HOLDoff Command For ma t:
:TRIGger:HOLDoff <count> :TRIGger:HOLDoff?
Function:
The command sets the holdoff time of a trigger. Holdoff time indicates the waiting time before oscilloscope starts a new trigger. During Holdoff, the oscilloscope will not trigger until Holdoff ends. The <count> range is 100 ns~1 .5s .
Returned Format:
The query returns the value of holdoff time, and the unit is s.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-32
Example:
:TRIG:HOLD 0.0001 Set the holdoff time as 100μs. :TRIG:HOLD? Return 1.000e-004.
9. :TRIGger:STATus? Query Format:
:TRIGger:STATus?
Function:
The command queries the current status of the oscillosc ope. The status may be RUN, STOP, T’ D, WAIT, SCAN or AUTO.
Returned Format:
The query returns RUN or STOP, T’D, WAIT, AUTO.
10. :Trig%50 Command For mat:
:Trig%50
Function:
The command sets the trigger level at the vertical midpoint of the signal amplitude.
11. :FORCetrig Command For ma t:
:FORCetrig
Function:
The command will produce a trigger signal to force the oscilloscope trigger and to display a waveform when there is no suitable trigger condition.
NOTE: It is mainly applicable to the “Normal” and “Single” trigger modes.
12. :SINGLE
Programming Guide for DS1000B Series
Command Systems RIGOL
2-33
Command For ma t:
:SINGLE
Function:
The command sets the trigger mode as Single trigger, means that collect a waveform when detect a trigger signal, then stop running.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-34

EDGE Trigger

1. :TRIGger:EDGE:SLOPe Command For ma t:
:TRIGger:EDGE:SLOPe {POSitive|NEGative|ALTernation} :TRIGger:EDGE:SLOPe?
Function:
The command sets the trigger edge as POSitive (rising edge), NEGative (falling edge) or ALTernation (rising and fallin g ed ge) .
Returned Format:
The query returns POSITIVE or NEGATIVE, ALTERNATION.
Example:
:TRIG:EDGE:SLOP POS Set the trigger edge as rise edge. :TRIG:EDGE:SLOP? Return POSITIVE.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-35

PULSe Trigger

1. :TRIGger:PULSe:MODE
Command For ma t:
:TRIGger:PULSe:MODE <mod> :TRIGger:PULSe:MODE?
Function:
The command sets the trigger condition. <mod> can be: +GREaterthan (positive pulse width greater than), +LESSthan (positive pulse width less than ), + EQUal (positive pulse width equal), -GREaterthan (negative pulse width greater than), -LESSthan (negative pulse width less than) or –EQUal (negative pulse width equal).
Returned Format: The query returns +GREATER THAN or +LESS THAN, +EQUAL, -GREATER THAN, -LESS THAN, –EQUAL.
Example:
:TRIG:PULS:MODE +GRE Set the trigger condition as +GREaterthan. :TRIG:PULS:MODE? Return +GREATE R THAN.
2. :TRIGger:PULSe:WIDTh
Command For mat:
:TRIGger:PULSe:WIDTh <wid> :TRIGger:PULSe:WIDTh?
Function:
The command sets the pulse width. The <wid> range is 20ns ~10s.
Returned Format: The query returns the value of pulse width, and the unit is s.
Example:
:TRIGr:PULS:WIDT 0.001 Set the pulse width as 1 ms. :TRIG:PULS:WIDT? Return 1.000e-003.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-36

VIDEO Trigger

1. :TRIGger:VIDEO:MODE
Command For ma t:
:TRIGger:VIDEO:MODE <mode> :TRIGger:VIDEO:MODE?
Function:
The command sets the trigger sync mode as ODDfield, EVENfield, LINE or ALLlines.
Returned Format: The query returns ODD FIELD, EVEN FIELD, LINE or ALL LINES.
Example:
:TRIG:VIDEO:MODE EVEN Set the trigger sync mode as even f ield. :TRIG:VIDEO:MODE? Return EVEN FIELD.
2. :TRIGger:VIDEO:POLarity
Command For ma t:
:TRIGger:VIDEO:POLarity {POSitive|NEGative} :TRIGger:VIDEO:POLarity?
Function:
The command sets the video polarity as POSitive (it is applicable for the video signal that the black level is low) or NEGative (the black level is high).
Returned Format: The query returns POSITIVE or NEGATIVE.
Example:
:TRIG:VIDEO:POL POS Set the video polarity as positive. :TRIG:VIDEO:POL? Return POSITIVE.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-37
3. :TRIGger:VIDEO:STANdard
Command For mat:
:TRIGger:VIDEO:STANdard {NTSC|PALSecam} :TRIGger:VIDEO:STANdard?
Function:
The command sets the video standard as NTSC or PAL/SECAM.
Returned Format:
The query returns NTSC or PAL/SECAM.
Example:
:TRIG:VIDEO:STAN PALS Set the video standard as PAL/SECAM. :TRIG:VIDEO:STAN? Return PAL /S E CAM.
4. :TRIGger:VIDEO:LINE
Command For ma t:
:TRIGger:VIDEO:LINE <value> :TRIGger:VIDEO:LINE?
Function:
The command sets the number of sync specifi ed line. In NTSC s t andard, the <value> range is 1~525; in PAL standard, the <value> range is 1~625.
Returned Format: The query returns the number of specified line.
Example:
:TRIG:VIDEO:LINE 25 Set the number of sync specified line as 25. :TRIG:VIDEO:LINE? Return 25.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-38

PATTern Trigger

1. :TRIGger:PATTern:PATTern Command For ma t:
:TRIGger:PATTern:PATTern <value>,<mask>,<ext source>[,<edge source>,<edge>] :TRIGger:PATTern:PATTern?
Function:
The command sets the code pattern of signals.
<value>:
Code pattern values of the channels. It is a 16 bit un signed integer (High is 1, Low i s 0).
<mask>:
Mask code of the channels. It is a 16 bit u nsigned integer (enable is 1, X is
0) which indicates whether the mask code is 1 or 0. The relationship between <mask> and <value> is "And" , if the mask of a channel is 0, which denotes this channel is ineffective and the corresponding setting of oscilloscope is "X"; if the mask is 1, <value> will decide whether the channel is H or L.
<ext source>:
It is external trigger signal, and EXT5 is 1, EXT is 0;
<edge source>:
It is the current channel, its range: 0(CH1), 1(CH2), 2(CH3), 3(CH4), 4(EXT5);
<edge>:
It is the code pattern of current channel. The rising <edge> is 1and the falling<edge> is 0.
NOTE: The priority of <edge> is higher than <mask>.
Returned Format:
The query returns the value, the mask, the ext source, the edge source and the edge. The value a nd the mask are expr essed in d ecimal.
Example:
:TRIG:PATT:PATT 31,31,1,2,1 Set the code pattern. :TRIG:PATT:PATT? Return 27, 31, EXT5, Channel3, Positive.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-39

ALTernation Trigger

1. :TRIGger:ALTernation:SOURce
Command For ma t:
:TRIGger:ALTernation:SOURce <source> :TRIGger:ALTernation:SOURce?
Function:
The command selects the alternation trigger channel. The <source> may be CH1CH2, CH1CH3, CH1CH4, CH2CH3, CH2CH4 or CH3CH4.
Returned Format: The query returns CH1CH2 or CH1CH3, CH1CH4, CH2CH3, CH2CH4, CH3CH4.
Example:
:TRIG:ALT:SOUR CH1CH2 Set the alternation channel as CH1CH2. :TRIG:ALT:SOUR? R eturn CH1CH2.
2. :TRIGger:ALTernation:CURRentSOURce
Command For ma t:
:TRIGger:ALTernation:CURRentSOURce <source> :TRIGger:ALTernation:CURRentSOURce?
Function:
The command sets the current channel. The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format: The query returns SOURceA or SOURceB.
Example:
:TRIG:ALT:SOUR CH1CH2 Set the alternation channe l as CH1CH2 . :TRIG:ALT:CURRSOUR SO URB Set the current channel as source B. :TRIG:ALT:CURRSOUR? Return SOURceB.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-40
3. :TRIGger:ALTernation:TYPE Command For mat:
:TRIGger:ALTernation:TYPE <type>[,<source>] :TRIGger:ALTernation:TYPE? [<source>]
Function:
The command sets the trigger type. The <type> may be EDGE, PULSe or VIDEO, and the <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format: The query returns EDGE or PULSE, VIDEO.
Example:
:TRIG:ALT:TYPE EDGE,SOURB Set the trigger type as edge trigger. :TRIG:ALT:TYPE? SOURB Return EDGE.
4. :TRIGger:ALTernation:TimeSCALe Command For ma t:
:TRIGger:ALTernation:TimeSCALe <value>[,<source>] :TRIGger:ALTernation:TimeSCALe? [<source>]
Function:
The command sets the time scale of current channel. The <value> range is 2ns~20m s , and the <source> may be SOURceA or SO U RceB, and the s ource A and B are varying with the current alternation channel. In NORMAL mode, different types of instruments have different sweep ranges: DS1204B, <scale_v al> range:1ns/div~50s/div. DS1104B, <scale_val>range:2ns/div~50s/div. DS1074B, <scale_val>range:5ns/div~50s/div.
Returned Format: The query returns the value of time scale, and the unit is s.
Example:
:TRIG:ALT:TSCAL 0.001,SOURB Set the time scale as 1ms.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-41
:TRIG:ALT:TSCAL? SOURB Re tu rn 1.0 00e-003.
5. :TRIGger:ALTernation:TimeOFFSet
Command For ma t:
:TRIGger:ALTernation:TimeOFFSet <value>[,<source>] :TRIGger:ALTernation:TimeOFFSet? [<source>]
Function:
The command sets the timebase offset. In NORMAL mode, <value>: 1s ~ memory capacitance; In STOP mode, <value: -500s ~ +500s.
Returned Format: The query returns the value of timebase offset, and the unit is s.
Example:
:TRIG:ALT:TOFFS 0.0002,SOURB Set the timebase offset as 200μs. :TRIG:ALT:TOFFS? SOURB Return 2.000e-004.
6. :TRIGger:ALTernation:LEVel
Command For ma t:
:TRIGger:ALTernation:LEVel <value>[,<source>] :TRIGger:ALTernation:LEVel? [<source>]
Function:
The command sets the trigger level of current channel. The <value> range <value> range: (- 6*Scale-Offset
) ~(+6*Scale+Offset).Scale is the current
vertical scale, and the uni t is V/div. the <source> may be SOURceA or SOURceB, and the source A and B is dif fe rent a cco rding t o the current alte rnation channe l.
NOTE: Trigger Level range is up to+/-6 Scale, when channel has offset, it needs to detract offset ,such as 1V tap position, 1V offset, the trigger range is -7V~5V.
Returned Format: The query returns the value of trigger voltage level, and the unit is V.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-42
Example:
:TRIG:ALT:LEV 2, SOURB Set the trigger voltage level as 2V. :TRIG:ALT:LEV? SOURB Return 2.000e000.
7. :TRIGger:ALTernation:EDGE:SLOPe Command For ma t:
:TRIGger:ALTernation:EDGE:SLOPe <value>[,<source>] :TRIGger:ALTernation:EDGE:SLOPe? [<source>]
Function:
The command sets the edge type of edge trigger in current channel as POSitive (rising edge) or NEGative (falling edge). The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format: The query returns POSITIVE or NEGATIVE.
Example:
:TRIG:ALT:EDGE:SLOP POS, SOURB Set the edge type as rising edge. :TRIG:ALT:EDGE:SLOP? SOURB Return POSITIVE.
8. :TRIGger:ALTernation:PULSe:MODE Command For ma t:
:TRIGger:ALTernation:PULSE:MODE <value>[,<source>] :TRIGger:ALTernation:PULSe:MODE? [<source>]
Function:
The command sets the trigger condition of pulse trigger. The <value> may be +GREaterthan, +LESSthan, + EQUal, -GREaterthan, -LESSthan or –EQUal. The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format:
The query returns +GREATER THAN or +LESS THAN, +EQUAL, -GREA TER THA N,
Programming Guide for DS1000B Series
Command Systems RIGOL
2-43
-LESS THAN, –EQUAL.
Example:
:TRIG:ALT:PULS:MODE +GRE, SOURB Set the trigger condition. :TRIG:ALT:PULS:MODE? SOURB Return +GREATE R THAN
9. :TRIGger:ALTernation:PULSe:TIME
Command For ma t:
:TRIGger:ALTernation:PULSe:TIME <value>[,<source>] :TRIGger:ALTernation:PULSe:TIME? [<source>]
Function:
The command sets the pul se width, the v alue range is 20ns ~10s. The <s ource> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format: The query returns the value of pulse width, and the unit is s.
Example:
:TRIG:ALT:PULS:TIME 0.002, SOURB Set the pulse width as 2ms. :TRIG:ALT:PULS:TIME? SOURB Return 2.000e-003.
10. :TRIGger:ALTernation:VIDEO:POLarity
Command For ma t:
:TRIGger:ALTernation:VIDEO:POLarity {POSitive|NEGative }[,<source>] :TRIGger:ALTernation:VIDEO:POLarity? [<source>]
Function:
The command sets the video polarity as POSitive or NEGative. The < source> may be SOURceA or SOURceB, and the source A and B are ivarying with the current alternation channel.
Returned Format:
The query returns POSITIVE or NEGATIVE.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-44
Example:
:TRIG:ALT:VIDEO:POL POS,SOURB Set the video polarity as positive. :TRIG:ALT:VIDEO:POL? SOURB Return POSITIVE.
11. :TRIGger:ALTernation:VIDEO:STANdard Command For ma t:
:TRIGger:ALTernation:VIDEO:STANdard {NTSC|PALSecam}[,<source>] :TRIGger:ALTernation:VIDEO:STANdard? [<source>]
Function:
The command sets the video standard as NTSC or PAL/SECAM. The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format: The query returns NTSC or PAL/SECAM.
Example:
:TRIG:ALT:VIDEO:STAN NTSC,SOURB Set the v ideo sta ndard as NT SC. :TRIG:ALT:VIDEO:STAN? SOURB Retu rn NTSC.
12. :TRIGger:ALTernation:VIDEO:MODE Command For ma t:
:TRIGger:ALTernation:VIDEO:MODE {ALLLins|ODDField|EVENfield|LINE}[,<source>] :TRIGger:ALTernation:VIDEO:MODE? [<source>]
Function:
The command sets the sync mode of alternation trigger and video trigger as ALLLINES, OD D FIELD, EVEN FIELD or LINE. The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Returned Format:
The query returns ALL LINES or ODD FIELD, EVEN FIE LD, LINE
Programming Guide for DS1000B Series
Command Systems RIGOL
2-45
Example:
:TRIG:ALT:VIDEO:MODE ALLLINES,SOURB Set the sync mode as all lines. :TRIG:ALT:VIDEO:MODE? SOURB Return ALL LINES.
13. :TRIGger:ALTernation:VIDEO:LINE
Command For ma t:
:TRIGger:ALTernation:VIDEO:LINE <value>[,<source>] :TRIGger:ALTernation:VIDEO:LINE? [<source>]
Function:
The command sets the number of sync specifi ed line. In NTSC s t andard, the <value> range is 1~525; in PAL/SECAN standard, the <value> range is 1~625. The <source> may be SOURceA or SOURceB, and the source A and B ar e varying with the current alternation channel.
Returned Format: The query returns the number of specified line.
Example:
:TRIG:ALT:VIDEO:LINE 100, SOURB Set the specified line number as 100. :TRIG:ALT:VIDEO:LINE? SOURB Return 100 .
14. :TRIGger:ALTernation:COUPling
Command For ma t:
:TRIGger:ALTernation:COUPling {DC|AC|LF}[,<source>] :TRIGger:ALTernation:COUPling? [<source>]
Function:
The command sets the coupling mode. DC: Allow all signals pass; AC: Reject DC signals and attenuate AC signals below 10Hz. LF: Reject DC and attenuate low frequency signals below 8kHz. The <source> may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-46
Returned Format: The query returns DC, AC or LF.
Example:
:TRIG:ALT:COUP DC, SOURB Set the coupling mode as DC. :TRIG:ALT:COUP? SOURB Return DC.
15. :TRIGger:ALTernation:HFREject Command For ma t:
:TRIGger:ALTernation:HFREject {{1|ON}|{0|OFF}} :TRIGger:ALTernation:HFREject?
Function:
The command sets high frequency reject function of ALTernation Trigger on or off.
Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:TRIG:ALT:HFRE ON Set HFR on. :TRIG:ALT:HFRE? Return 1.
16. :TRIGger:ALTernation:HOLDoff Command For ma t:
:TRIGger:ALTernation:HOLDoff <count>[,<source>] :TRIGger:ALTernation:HOLDoff? [<source>]
Function:
The command sets the holdoff time to trigger the specified source alternately. Holdoff time is the waiting time of oscilloscope before starting a new trigger. During Holdoff, oscilloscope will not trigger until Holdoff ends. The <count> range is 100ns~1.5s. The <source> may be SOURceA or SOURceB.
Returned Format:
Programming Guide for DS1000B Series
Command Systems RIGOL
2-47
The query returns the value of holdoff time, and the unit is s.
Example:
:TRIG:HOLD 0.0001, SOURA Set the holdoff time of source A as 100us. :TRIG:HOLD? SOURA Return 1.000e-004.
17. :TRIGger:ALTernation:SENSitivity
Command For ma t:
:TRIGger:ALTernation:SENSitivity <count>[,<source>] :TRIGger:ALTernation:SENSitivity? [<source>]
Function:
The command sets the trigger sensitivity of alternation trigger, the count range is 0.1div~1div. The <source> may be SOURceA or SOURceB, and the source A and B are varying with to the current alternation channel.
Returned Format: The query returns the value of trigger sensitivity, and the unit is div.
Example:
:TRIG:ALT:SENS 0.1, SOURceB Set the trigger sensitivity as 01. :TRIG:ALT:SENS? SOURceB Return 1.000e-001.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-48

MATH Commands

MATH Commands are used to display the result of adding, subtracting, multiplying and FFT operation for the signals from CH1, CH2, CH3 and CH4. The results can be measured by the grid and the cursor.
MATH Commands include: :MATH:DISPlay
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-49
1. :MATH:DISPlay
Command For ma t:
:MATH:DISPlay {{1|ON}|{0|OFF}} :MATH:DISPlay?
Function:
The command sets Math waveform on or off.
Returned Format: The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:MATH:DISP ON Set Math waveform on. :MATH:DISP? Return 1.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-50

CHANnel Commands

CHANnel Commands are used to set the vertical system from every channel separately.
CHANnel Com mands include:
:CHANnel<n>:BWLimit :CHANnel<n>:COUPling :CHANnel<n>:DISPlay :CHANnel<n>:INVert :CHANnel<n>:OFFSet :CHANnel<n>:PROBe :CHANnel<n>:SCALe :CHANnel<n>:FILTer :CHANnel<n>:MEMoryDepth? :CHANnel<n>:VERNier :CHANnel<n>:UNITs
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-51
1. :CHANnel<n>:BWLimit
Command For ma t:
:CHANnel<n>:BWLimit {{1|ON}|{0|OFF}} :CHANnel<n>:BWLimit?
Function:
The command sets bandwidth limit function ON (limit band width to 20MHz to reduce noise) or OFF (full band width). The <n> may be 1, 2, 3 or 4.
Returned Format: The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:CHAN2:BWL OFF Set BW limit function of channel 2 off. :CHAN2:BWL? Return 0.
2. :CHANnel<n>:COUPling
Command For ma t:
:CHANnel<n>:COUPling {DC|AC|GND} :CHANnel<n>:COUPling?
Function:
The command sets coupling mode as DC (both AC and DC components of the input signal can pass), AC (the DC component of the input signal can not pass) or GND (disconnect the input signal). The <n> may be 1, 2, 3 or 4.
Returned Format: The query returns AC or DC, GND.
Example:
:CHAN2:COUP DC Set the coupling mode of channel 2 as DC. :CHAN2:COUP? Return DC.
3. :CHANnel<n>:DISPlay
Programming Guide for DS1000B Series
RIGOL Command Systems
2-52
Command For ma t: :CHANnel<n>:DISPlay {{1|ON}|{0|OFF}} :CHANnel<n>:DISPlay?
Function:
The command sets the channel ON or OFF. The <n> may be 1, 2, 3 or 4.
Returned Format: The query returns 1 or 0, respectively indicates ON or OFF.
Examples:
:CHAN2:DISP ON Set channel 2 on. :CHAN2:DISP? Return 1.
4. :CHANnel<n>:INVert Command For mat:
:CHANnel<n>:INVert {{1|ON}|{0|OFF}} :CHANnel<n>:INVert?
Function:
The command sets waveform invert function ON (the inverted waveform is display) or OFF (the normal waveform i s display). The <n> may be 1, 2, 3 or 4.
Returned Format: The query returns 1 or 0, respectively indicates ON or OFF.
Example:
:CHAN2:INV OFF Set the invert function of channel 2 off. :CHAN2:INV? Return 0.
5. :CHANnel<n>:OFFSet Command For ma t:
:CHANnel<n>:OFFSet <offset> :CHANnel<n>:OFFSet?
Programming Guide for DS1000B Series
Command Systems RIGOL
2-53
Function:
The command sets the vertical offset. The <n> may be 1, 2, 3 or 4. Scale≥250mV, <o ffset>: -40V~ +40V; Scale<250mV, <o ffset>: -2V ~ +2V.
Returned Format: The query returns the value of offset, and the unit is V.
Example:
:CHAN2:OFFS 20 Set the vertical offs et of channel 2 as 20V. :CHAN2:OFFS? Return 2.000e001.
6. :CHANnel<n>:PROBe
Command For mat:
:CHANnel<n>:PROBe <attn> :CHANnel<n>:PROBe?
Function:
The command sets the at tenuation factor of probe. T he <n> may be 1, 2, 3 or 4, and the <attn> may be 0.001 X, 0 .01 X, 0.1 X, 1 X, 2 X, 5X, 10X , 20 X, 50X, 100X, 200 X, 500X or 1000X.
Returned Format: The query returns the value of attenuation factor.
Example:
:CHAN2:PROB 10X Set the annenuation factor of channel 2 as 10X. :CHAN2:PROB? Return 10X.
7. :CHANnel<n>:SCALe
Command For ma t:
:CHANnel<n>:SCALe <range> :CHANnel<n>:SCALe?
Function:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-54
The command sets the ve rtical scale f or magnif ying wa veform. The <n > may be 1, 2, 3 or 4. Probe 0.001X, <range>: 2μV ~ 10mV; Probe 0.01X, <range>: 20μV ~ 100mV; Probe 0.1X, <range>: 200μV ~ 1V; Probe 1X, <range>: 2mV ~ 10V; Probe 2X, <range>: 4mV ~ 20V; Probe 5X, <range>: 10mV ~ 50V; Probe 10X, <range>: 20mV ~ 100V; Probe 20X, <range>: 40mV ~ 200V; Probe 50X, <range>: 100mV ~ 500V; Probe 100X, <range>: 200m V ~ 1k V; Probe 200X, <range>: 400mV ~ 2kV; Probe 500X,<range>: 1V ~ 5kV; Probe 1000X, <range>: 2V ~ 10kV.
Returned Format: The query returns the value of vertical scale, and the unit is V.
Example:
:CHAN2:PROB 10X Set the attenuation factor of channel 2 as 10X. :CHAN2:SCAL 20 Set the vertical scale of channel 2 as 20V. :CHAN2:SCAL? Return 2.000e001.
8. :CHANnel<n>:FILTer Command For ma t:
:CHANnel<n>:FILTer {{1|ON}|{0|OFF}} :CHANnel<n>:FILTer?
Function:
The command sets digital filter function ON or OFF. The <n> may be 1, 2, 3 or
4. Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Example:
Programming Guide for DS1000B Series
Command Systems RIGOL
2-55
:CHAN2:FILT OFF Set the digital filter of channel 2 off. :CHAN2:FILT? Return 0.
9. :CHANnel<n>:MEMoryDepth? Command For ma t:
:CHANnel<n>:MEMoryDepth?
Function:
This command is query the memory depth on channel x. There are three instances:
1) Alternate trigger: 8192
2) Slow scan or ROLL: 0~8192
3) Others: 8192
NOTE: In Slow scan mode: In the event of the horizontal timebase is set as 50ms/div or more slowly, the instrument will turn into Slow scan mode. Under this circumstance, the oscilloscope w ill gathe r the da tum form the left side o f the tr igger point and then co ntinue gathering the waves form the right side after triggering. If use Slow scan mode to observe the low frequency signal, you are suggested to set the couple mode of channel as DC.
Returned Format:
The query returns the value such as: 8192e003.
10. :CHANnel<n>:VERNier Command For mat:
:CHANnel<n>:VERNier {{1|ON}|{0|OFF}} :CHANnel<n>:VERNier?
Function:
The command sets the adjustment mode of vertical scale as ON (Fine) or OFF (Coarse). The vertical scale steps by 1-2-5 in Coarse mode; and by equality in Fine mode. The <n> may be 1, 2, 3, 4.
Returned Format: The query returns 1 or 0, respectively indicates ON or OFF.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-56
Example:
:CHAN2:VERN ON Set the fine adjustment function of channel 2 on. :CHAN2:VERN? Return 1.
11. :CHANnel<n>:UNITs
Command For ma t:
:CHANnel<n>:UNITs <units> :CHANnel<n>:UNITs?
Function:
The command sets the unit as VOL Ts (V), AMPeres (A), WATTs (W) or UNKNown. The <n> may be 1, 2, 3 or 4.
Returned Format: The query returns VOLTs or AMPeres, W ATTs, UNK Nown.
Example:
:CHAN1:UNIT VOLT Set the unit of channel 1 as V. :CHAN1:UNIT? Return VOLTs.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-57

MEASure Commands

MEASure Commands are used for the fundamental measurement ope rations, and th e measurement results are expressed by scientific notation.
MEASure C o mmands include:
:MEASure:CLEar :MEASure:PWIDth?
:MEASure:VPP? :MEASure:NWIDth?
:MEASure:VMAX? :MEASure:PDUTycycle?
:MEASure:VMIN? :MEASure:NDUTycycle?
:MEASure:VAMPlitude? :MEASure:PDELay?
:MEASure:VTOP? :MEASure:NDELay?
:MEASure:VBASe? :MEASure:PPHAse?
:MEASure:VAVerage? :MEASure:NPHAse?
:MEASure:VRMS? :MEASure:TOTal
:MEASure:OVERshoot? :MEASure:SOURce
:MEASure:PREShoot? :MEASure:DELAySOURce
:MEASure:FREQuency? :MEASure:PHAseSOURce
:MEASure:RISetime? :MEASure:ENABle
:MEASure:FALLtime? :MEASure:DISable
:MEASure:PERiod? :MEASure?
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-58
1. :MEASure:CLEar
Command For ma t:
:MEASure:CLEar
Function:
The command clears the current measurement parameters.
2. :MEASure:VPP?
Command For mat:
:MEASure:VPP? [<source>]
Function:
The command measures the Peak-Peak value of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
NOTE: “<>” in <source> indicates the source is the parameter that must be set in the commond; and “[ ]” indicates the parameter can be set or not set according to your demand. The followings are the same, don’t r epeat. Plea se refer to c hapter 1 Symbol Description about the related explanations.
Returned Format:
The query returns as 5.280e000, and the unit is V.
3. :MEASure:VMAX?
Command For ma t:
:MEASure:VMAX? [<source>]
Function:
The command measures the maximum of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 2.640e000, and the unit is V.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-59
4. :MEASure:VMIN? Command For ma t:
:MEASure:VMIN? [<source>]
Function:
The command measures the minimum of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as -2.640e000, and the unit is V.
5. :MEASure:VAMPlitude? Command For mat:
:MEASure:VAMPlitude? [<source>]
Function:
The command measures t he amplitude of s ignal fro m <sou rce>. T he <sour ce> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 5.280e000, and the unit is V.
6. :MEASure:VTOP? Command For ma t:
:MEASure:VTOP? [<source>]
Function:
The command measures the top value of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 2.640e000, and the unit is V.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-60
7. :MEASure:VBASe?
Command For ma t:
:MEASure:VBASe? [<source>]
Function:
The command measures the base v alue of signal f rom <sour ce>. The <s ource> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as -2.640e000, and the unit is V.
8. :MEASure:VAVerage? Command For mat:
:MEASure:VAVerage? [<source>]
Function:
The command measures the average value of signal from <source>. The <source> ma y be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns as -4.200e-003, and the unit is V.
9. :MEASure:VRMS? Command For ma t:
:MEASure:VRMS? [<source>]
Function:
The command measures the root mean square of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4 .
Returned Format:
The query returns as 2.460e000, and the unit is V.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-61
10. :MEASure:OVERshoot? Command For ma t:
:MEASure:OVERshoot? [<source>]
Function:
The command measures the overshoot value of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format:
The query returns as 8.000e003, and the unit is V.
11. :MEASure:PREShoot? Command For mat:
:MEASure:PREShoot? [<source>]
Function:
The command measures the preshoot value of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format: The query returns as 8.000e-003, and the unit is V.
12. :MEASure:FREQuency? Command For ma t:
:MEASure:FREQuency? [<source>]
Function:
The command measures the frequency of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 1.000e003, and the unit is Hz.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-62
13. :MEASure:RISetime?
Command For ma t:
:MEASure:RISetime? [<source>]
Function
The command measures the rise time of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 4.000e-005, and the unit is s.
14. :MEASure:FALLtime?
Command For ma t:
:MEASure:FALLtime? [<source>]
Function:
The command measures the fall time of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 4.000e-005, and the unit is s.
15. :MEASure:PERiod?
Command For mat:
:MEASure:PERiod? [<source>]
Function:
The command measures the period of signal from <source>. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns as 1.000e-003, and the unit is s.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-63
16. :MEASure:PWIDth? Command For ma t:
:MEASure:PWIDth? [<source>]
Function:
The command measures the positive pulse width of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format: The query returns as 5.000e-004, and the unit is s.
17. :MEASure:NWIDth? Command Format:
:MEASure:NWIDth? [<source>]
Function:
The command measures t he ne gative pulse width of si gnal from <so urce>. Th e <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format:
The query returns as 5.000e-004, and the unit is s.
18. :MEASure:PDUTycycle? Command For ma t:
:MEASure:PDUTycycle? [<source>]
Function:
The command measures the positive duty cycle of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format:
The query returns as 5.000e001, and the unit is %.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-64
19. :MEASure:NDUTycycle? Command For ma t:
:MEASure:NDUTycycle? [<source>]
Function:
The command measures the negative duty cycle of signal from <source>. The <source> may be CHANnel1, CHANnel2 , CHA Nnel3 or CHANnel4.
Returned Format:
The query returns as 5.000e001, and the unit is %.
20. :MEASure:PDELay? Command For mat:
:MEASure:PDELay? [<source A>,<source B>]
Function:
The command measures the delay between <sourceA> and <sourceB> relative to the rising edge. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns as <-1.000 e-004, and the unit is s.
21. :MEASure:NDELay? Command For ma t:
:MEASure:NDELay? [<source A>,<source B>]
Function:
The command measures the delay between <sourceA> and <sourceB> relative to the falling edge. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns as <-1.000 e-004, and the unit is s.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-65
22. :MEASure:PPHAse?
Command For ma t:
:MEASure:PPHAse? [<source A>,<source B>]
Function:
The command measures the phase difference between <sourceA> and <sourceB> relative to the rising edge. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns as <-1.000 e-004, and the unit is s.
23. :MEASure:NPHAse? Command For mat:
:MEASure:NPHAse? [<source A>,<so urce B>]
Function:
The command measures the phase difference between <sourceA> and <sourceB> relative to the falling edge. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns as <-1.000 e-004, and the unit is s.
24. :MEASure:TOTal Command For ma t:
:MEASure:TOTal {{1|ON}|{0|OFF}} :MEASure:TOTal?
Function:
The command sets all the measurement functions on or off.
Returned Format:
The query returns 1 or 0, respectively indicates ON or OFF.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-66
Example:
:MEAS:TOT ON Set the total measurement function on. :MEAS:TOT? Return 1.
25. :MEASure:SOURce
Command For ma t:
:MEASure:SOURce <source> :MEASure:SOURce?
Functions
The command selects the measurement channel. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Returned Format:
The query returns CH1 or CH2, CH3, CH4.
Example:
:MEAS:SOUR CHAN1 Measure the signal from CH1. :MEAS:SOUR? Return CH1.
26. :MEASure:DELAySOURce Command For ma t:
:MEASure:DELAySOURce <source>,<source> :MEASure:DELAySOURce?
Functions
The command selects the channel for measuring the time delay. The< source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns CH1, CH2 or CH1, CH3, CH1, CH4, CH2, CH3, CH2, CH4, CH3, CH4.
Example:
:MEAS:DELASOUR CHAN1 CHAN2 Measure the delay source.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-67
:MEAS:DELASOUR? Return CH1, CH2.
27. :MEASure:PHAseSOURce
Command For ma t:
:MEASure:PHAseSOURce <source>,<source> :MEASure:PHAseSOURce?
Functions
The command sele cts the channel for measuring the phase delay. The <source> may be CHANnel1, CHANnel2, CHANnel3 or CHANne l4.
Returned Format:
The query returns CH1, CH2 o r CH1, CH3, CH 1, CH4 , CH2, CH3, CH2, CH 4, CH 3, CH4.
Example:
:MEAS:PHASOUR CHAN1 CHAN2 M easure the phase delay. :MEAS:PHASOUR? Return CH1, CH2.
28. :MEASure:ENABle
Command For ma t:
:MEASure:ENAble
Functions
This command is ope n the locke d MEA SURE but ton a nd allow user t o open Aut o Measure.
NOTE: Only corresponding unlock command can open AUTO and Auto Measure once they are locked, neither restart nor update is available.
29. :MEASure:DISable
Command For mat:
:MEASure:DISable
Function:
Programming Guide for DS1000B Series
RIGOL Command Systems
2-68
This command is lock MEASURE button and forbid user opening Auto Measure.
30. :MEASure?
Command Format:
:MEASure?
Function:
This command is query the state of keylock.
Returned Format:
The query returns Locked or UnLocked.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-69

WAVeform Commands

WAVeform Commands a re used to read the data a nd par amete rs of w avef orm on the screen.
WAVeform Commands include:
:WAVeform:FORMat :WAVeform:DATA? :WAVeform:POINts :WAVeform:POINts:MODE :WAVeform:SOURce :WAVeform:PREamble? :WAVeform:YINCrement? :WAVeform:YORigin? :WAVeform:XINCrement? :WAVeform:XORigin? :WAVeform:XREFerence? :WAVeform:YREFerence?
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-70
1. :WAVeform:FORMat Command For ma t:
:WAVeform:FORMat <value> :WAVeform:FORMat?
Function:
The command sets the format of waveform data. The <value> may be WORD, BYTE or ASCii. Difference of WORD, BYTE and ASCii: ASCii: Returns ASCII values when data ware transformed into character. Eg: Wa veform data is 1 000, returns ’1’,’0’,’0’,’0’, a point cor re spond many bytes. BYTE and WORD: They will returns 8 bit and 16 bit values to use datum. Eg: Wa v ef or m data i s 1 00 0, ret u rns 100 0 in deci mal sy ste m , a poi nt c orre s pond one byte.
Returned Format: The query returns WORD or BYTE, ASCii.
Example:
:WAV:FORM ASC Set the data format as ASCII. :WAV:FORM? Return ASCii.
2. :WAVeform:DATA? Command For ma t:
:WAVeform:DATA? [<source>]
Function:
The command reads waveform data from the specified source. <source> may be : CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH.
Returned Format:
The query returns a certain amount of waveform data that specifed by :WAVeform:POINts.
NOTE:
The command returns the data on the screen while waveform playback, at this moment,
Programming Guide for DS1000B Series
Command Systems RIGOL
2-71
only NORMal and MAXimum mode is available and the system is in STOP state.
600 points are returned in common operation+, , ×while 500 points are returned
in FFT operation in all modes (NORMal, RAW, MAXimum).
The waveform data read in NORMal mode is fixed as 600 points while the system is in
STOP state, if increase the time base until all the waveforms are displayed on the screen,
some invalid data ma y be contained in d at a returned under the circum stan ces. So, you are recommended to read the data in RAW mode while in STOP state.
Example:
:WAV:DATA? CHAN1 Read the data from CH1.
3. :WAVeform:POINts Command For ma t:
:WAVeform:POINts <points> :WAVeform:POINts?
Function:
This command sets the waveform points need to be returned, the default is 0. <points> has different Value ranges in different modes. NORMal: 0~600 RAW: 0~8192 or 0~16384 (in half cha nnel state )
NOTE: Half channel indicates selecting one of the channels in CH1 and CH2, or in CH3 and CH4.
Returned Format:
The query returns an integer, for example : 10.
NOTE:
If you set the waveform points to be 0, t he query will retur n the maximum points in
current mode (NORMal: return 600 points, RAW: return current memory depth);
In MATH operation, 600 points are returned no matter what mode it is; In FFT, the maximum points will always be 500.
Example:
:WAV:POIN 20 S et the waveform poin ts as 20. :WAV:POIN? Return 20.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-72
MATH
FFT
CHx
Half-Channel
For detail s about stora ge format of waveform points, please re fer to Page 2-76:
Peak Detect
4. :WAVeform:POINts:MODE Command For ma t:
:WAVeform:POINts:MODE <points_mode> :WAVeform:POINts:MODE?
Function:
This command sets the mode of waveform points. <points_mode> can be: NORMal, MAXimum or RAW.
NOTE: What will be returned by :WAVeform:POINts? in different modes:
NORMal: Return data points currently display on the screen (600 points). RAW: Return the data points of the memor y data (in STOP state) . In RUN state, no
data are returned, the system error code i s 67 which in dicate system c ondition is not met and the execution failed.
MAXimum: Return the maximum valid data points in current state. In RUN state, the
screen data points are returned, while in STOP state, the memory data points are returned.
NORmal RAW MAX
Programming Guide for DS1000B Series
Normal
/Average 600 1200 600 500 500 500 600 1200 8192 600 1200 16384
Peak Detect
In RUN state,
MAX is the same with NORMal; in STOP state, MAX is the same with RA W.
CHx
Returned Format:
The query returns NORMal, MAXimum or RAW.
Example:
:WAV:POIN:MODE NORM Set the mode as NORMal. :WAV:POIN:MODE? Return NORMal.
Command Systems RIGOL
2-73
5. :WAVeform:SOURce
Command For ma t:
:WAVeform:SOURce <source> :WAVeform:SOURce?
Function:
The command sets the source of waveform data which is going to check. The <source> may be CHANnel1, CHA Nnel2, CHANnel3, CHANnel4 or MATH. Returned Format: The query returns Channel1 or Channel2, Channel3, Channel4, MATH.
Example:
:WAV:SOUR CHAN2 Set the data source as channel 2. :WAV:SOUR? Return Channel2.
6. :WAVeform:PREamble?
Command For ma t:
:WAVeform:PREamble?
Function:
This command queries the current waveform settings.
Returned Format:
The query returns 10 data which ar e s eparated by comma “,”, they are: Format,Type,Points,Count,Xinc,Xor,Xref,Yinc,Yor,Yref
Parameter Value: Format: BYTE – 0; WORD – 1; ASCII – 2. Type: NORMAL – 0; PEAK_DETECT – 1; AVERAGE – 2. Points: specified by
:WAVeform:POINts command.
Count: the “average acquisition time” (in average mode) or “1” (other mode); Xinc: 1/SaRate (RAW) or TimeScale/50 (NORMAL); Xor: relative time of the trigger points; Xref: X reference; Yinc: Y unit voltage;
Programming Guide for DS1000B Series
RIGOL Command Systems
2-74
Yor: vertical offset relative to YREF; Yref: Y reference, the middle point of the screen.
Example:
+1,+0,0,+1,8.000e-009,-6.000e-006,+0,4.000e-002,0.000e000,+100
7. :WAVeform:YINCrement?
Command F ormat:
:WAVeform:YINCrement? [<source>]
Function:
This command queries the Y unit voltage of the specified source. <source> can be: CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH.
NOTE: returned value= VoltScale /25
Returned Format:
The query returns Y unit voltage, and the unit is V.
Example:
:WAV:YINC? CHAN2 Return 4.000e000.
8. :WAVeform:YORigin?
Command For mat:
:WAVeform:YORigin? [<source>]
Function:
The command queries the vertical offset of spe cified source. The <source> may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH.
Returned Format:
The query returns the value of vertical offset, and the unit is V.
Example:
:WAV:YOR? CHAN2 Return -1.600e001.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-75
9. :WAVeform:XINCrement?
Command For mat:
:WAVeform:XINCrement? [<source>]
Function:
The command queries the interval time between two points of the specified source. The <source> may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH.
Returned Format:
The query returns the value of interval, and the unit is s.
Example:
:WAV:XINC? CHAN2 Return 1.000e-003.
10. :WAVeform:XORigin?
Command For ma t:
:WAVeform:XORigin? [<source>]
Function:
The command queries the time from trigger point to XREF of the specified source. The <source> may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH
Returned Format:
The query returns the value of time and the unit is s.
Example:
:WAV:XOR? CHAN2 Return 2.000e-002.
11. :WAVeform:XREFerence?
Command For mat:
:WAVeform:XREFerence?
Programming Guide for DS1000B Series
RIGOL Command Systems
2-76
Function:
The command queries the horizontal reference axis.
Returned Format: The query returns the value of reference axis.
Example:
:WAV:XREF? Return 0.
12. :WAVeform:YREFerence?
Command For mat: :WAVeform:YREFrence? Function:
The command queries the vertical reference axis. YREFrence is f ixed at the verticel middle of the screen (100).
Returned Format: The query returns the value of reference axis.
Example:
:WAV:YREF? Return 100.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-77
Peak Detect
1. Conditions
(1) The Peak Detect acquisition mode is open (2) Time base is greater than 1 us
The acquisition is not Peak Detect in other conditions.
2. Data storage format in memory under Peak Detect
The waveform data in Peak Detect mode are stored in the form of max1-min1, max2-min2, max3-min3. That is, a waveform point has a couple of data: a max and a min, which are stored alternately. As the following figure shown, the waveform display will be serrated.
3. Pick up waveform point of specific time:
(1) CntSpan = (-Time+TrigOffset)*SaRate //The sample points of specific time (2) CntSpan = CntSpan*2 // Every time contains two data (3) DstPtr = MidPt – CntSpan // Index of waveform point of specific time
Example: To c alculate the in dex positio n at -7.69ms point when sample rate is 250k Sa/s and trigger offset is 500 us. CntSpan = (7.69+0.5)*250=1 922+125=2047 //The sample points of specific time CntSpan = 2047*2 = 4094 // Every time contains two data DstPtr = 4096 – 4094=2 // Index of waveform point of specific time Then, you will get two waveform points of this time: Memory(2) and Memory(3).
4. Time calculation of specific index point:
Known condition: memory index point ind”
(1) TimeSpan = (ind – MidPt)/(SaRate*2) //T ake half of the result since every time
Programming Guide for DS1000B Series
RIGOL Command Systems
2-78
contains two wave form points
(2) Time(ind) = TimeSpan + TimeOffset
Example: When sample rate is 250k Sa/s and trigger offset is 500 us. To calculate time of index point 2: TimeSpan = (2 – 4096)/(250*2) = -8.188ms Time(2) = (-8.188+0.5) = -7.688ms To calculate time of index point 3: TimeSpan =((3 – 4096)/2)/(250) = (-2047)/250 = -7.686ms Time(3)=(-8.186+0.5) = -7.686ms Time(3) Time(2).
5. Data displays on the screen:
6. Data format of returned screen data:
The screen data obtained by command :WAV:DATA? in Peak Detec t mode are stored in the form of T1max – T1min,T2max-T2min, the format of which is the same a s memor y data storage. Because one time contains two points, the waveform data extends to 1200 600*2.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-79

KEY Commands

KEY Commands are used to control the keys and knobs on the operation panel of DS1000B.
KEY Commands include:
:KEY:LOCK :KEY:CH1_VOLT_INC
:KEY:STORage :KEY:CH1_VOLT_DEC
:KEY:UTILity :KEY:CH1_VOLT_Z
:KEY:MEASure :KEY:CH1_POS_INC
:KEY:CURSor :KEY:CH1_POS_DEC
:KEY:ACQuire :KEY:CH1_POS_Z
:KEY:DISPlay :KEY:CH2_VOLT_INC
:KEY:HELP :KEY:CH2_VOLT_DEC
:KEY:QUICKMEASure :KEY:CH2_VOLT_Z
:KEY:QUICKPRINt :KEY:CH2_POS_INC
:KEY:AUTO :KEY:CH2_POS_DEC
:KEY:RUN :KEY:CH2_POS_Z
:KEY:SINGLe :KEY:CH3_VOLT_INC
:KEY:MNUTIME :KEY:CH3_VOLT_DEC
:KEY:MNUoff :KEY:CH3_VOLT_Z
:KEY:F1 :KEY:CH3_POS_INC
:KEY:F2 :KEY:CH3_POS_DEC
:KEY:F3 :KEY:CH3_POS_Z
:KEY:F4 :KEY:CH4_VOLT_INC
:KEY:F5 :KEY:CH4_VOLT_DEC
:KEY:CH1 :KEY:CH4_VLOT_Z
:KEY:CH2 :KEY:CH4_POS_INC
:KEY:CH3 :KEY:CH4_POS_DEC
:KEY:CH4 :KEY:CH4_POS_Z
:KEY:MATH :KEY:TIME_INC
:KEY:REF :KEY:TIME_DEC
:KEY:TrigMODE :KEY:TIME_Z
:KEY:TrigMENU :KEY:TIME_POS_INC
:KEY:TrigFORCe :KEY:TIME_POS_DEC
:KEY:Trig%50 :KEY:TIME_POS_Z
Programming Guide for DS1000B Series
RIGOL Command Systems
2-80
:KEY:FUNC_Z :KEY:TRIG_LEVEL_INC
:KEY:FUNC_INC :KEY:TRIG_LEVEL_DEC
:KEY:FUNC_DEC :KEY:TRIG_LEVEL_Z
We will give detailed introductions for each command in the following parts.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-81
1. :KEY:LOCK Command For ma t:
:KEY:LOCK { ENABle | DISa bl e } :KEY:LOCK?
Function:
The command enables and disables the function of Remote control on the keys of front panel.
Returned Format:
The query returns ENABLE or DISABLE.
Example:
:KEY:LOCK ENAB Enable remote control on the keys of fr ont panel . :KEY:LOCK? Return ENABLE.
2. :KEY:STORage Command For ma t:
:KEY:STORage
Function:
The command sets storage menu on or off.
3. :KEY:UTILity Command For ma t:
:KEY:UTILITY
Function:
The command sets utility menu on or off.
4. :KEY:MEASure Command Format:
:KEY:MEASure
Programming Guide for DS1000B Series
RIGOL Command Systems
2-82
Function:
The command sets measurement function and its menu on or off.
5. :KEY:CURSor Command For ma t:
:KEY:CURSor
Function:
The command enables cursor measurement function and its menu. The cursor mode can be set by sending the command continually.
6. :KEY:ACQuire Command For mat:
:KEY:ACQuire
Function:
The command sets acquire menu on or off.
7. :KEY:DISPlay Command For ma t:
:KEY:DISPLAY
Function:
The command sets display menu on or off.
8. :KEY:HELP Command For ma t:
:KEY:HELP
Function:
The command sets the built-in help system on or off.
Programming Guide for DS1000B Series
Command Systems RIGOL
2-83
9. :KEY:QUICKMEASure
Command For ma t:
:KEY:QUICKMEASure
Function:
The command sets quick-measurement function on or off. And it could be set in Measurement menu.
10. :KEY:QUICKPRINt
Command For mat:
:KEY:QUICKPRINt
Function:
The command prints and saves the screen.
11. :KEY:AUTO
Command For ma t:
:KEY:AUTO
Function:
The command sets oscilloscope automatically to display the waveform to be optimal condition.
12. :KEY:RUN Command For ma t:
:KEY:RUN
Function:
This command controls the running state of the oscilloscope. The oscilloscope will cutover between RUN and STOP when sending this command continually.
13. :KEY:SINGLe
Programming Guide for DS1000B Series
RIGOL Command Systems
2-84
Command For ma t:
:KEY:SINGLe
Function: The command sets the trigger mode as Single trigger.
14. :KEY:MNUTIME Command For mat:
:KEY:MNUTIME
Function:
The command sets horizontal system and its menu on or off.
15. :KEY:MNUoff Command For mat:
:KEY:MNUoff
Function:
The command sets menu display function on or off.
16. :KEY:F1 Command For ma t:
:KEY:F1
Function:
The command selects the first option in current menu. If the subordinate menu existing and its options are available, then these options could be selected circularly when send repeatly the command.
17. :KEY:F2 Command For ma t:
:KEY:F2
Programming Guide for DS1000B Series
Command Systems RIGOL
2-85
Function:
The command selects the second option in current menu. If the subordinate menu existing and its o ptions are a vaila ble, then the se options could be select ed circularly when send repeatly the command.
18. :KEY:F3
Command For ma t:
:KEY:F3
Function:
The command selects the third option in current menu. If the subo rdinate me nu existing and its options are available, then these options could be selected circularly when send repeatly the command.
19. :KEY:F4 Command For mat:
:KEY:F4
Function:
The command selects the fourth option in current menu. If the subordinate menu existing and its o ptions are a vaila ble, then the se options coul d be select ed circularly when send repeatly the command.
20. :KEY:F5 Command For ma t:
:KEY:F5
Function:
The command selects the fifth option in current menu. If t he subordinate menu existing and its options are available, then these options could be selected circularly when send repeatly the command.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-86
21. :KEY:CH1
Command For ma t:
:KEY:CH1
Function:
The command sets channel 1 and its menu on or off.
22. :KEY:CH2 Command For mat:
:KEY:CH2
Function:
The command sets channel 2 and its menu on or off.
23. :KEY:CH3 Command For mat:
:KEY:CH3
Function:
The command sets channel 3 and its menu on or off.
24. :KEY:CH4 Command For ma t:
:KEY:CH4
Function:
The command sets channel 4 and its menu on or off.
25. :KEY:MATH Command For ma t
:KEY:MATH
Programming Guide for DS1000B Series
Command Systems RIGOL
2-87
Function:
The command sets Math function and its menu on or off.
26. :KEY:REF Command For ma t:
:KEY:REF
Function:
The command sets reference waveform function and its menu on or off.
27. :KEY:TrigMODE Command For mat:
:KEY:TrigMODE
Function:
The command shifts the trigger mode among AUTO, NORMAL and SINGLE.
28. :KEY:TrigMENU Command For ma t:
:KEY:TrigMENU
Function:
The command sets trigger menu on or off.
29. :KEY:TrigFORCe Command For ma t:
:KEY:TrigFORCe
Function:
The command is used for forcing trigger.
Programming Guide for DS1000B Series
RIGOL Command Systems
2-88
30. :KEY:Trig%50
Command For ma t:
:KEY:Trig%50
Function:
This command sets the trigger level at the vertical midpoint of the amplitude of trigger signal.
31. :KEY:FUNC_Z Command For mat:
:KEY:FUNC_Z
Function:
The command selects the multifunction knob.
32. :KEY:FUNC_INC Command For mat:
:KEY:FUNC_INC
Function:
The command increases the offset of multifunction knob.
33. :KEY:FUNC_DEC Command For ma t:
:KEY:FUNC_DEC
Function:
The command decreases the offset of multifunction knob.
34. :KEY:CH1_VOLT_INC Command For ma t:
Programming Guide for DS1000B Series
Loading...