Rigol DS1000Z Programming Guide
User Manual: Pdf
Open the PDF directly: View PDF .
Page Count: 172
Download | |
Open PDF In Browser | View PDF |
RIGOL Programming Guide DS1000Z Series Digital Oscilloscope Dec. 2013 RIGOL Technologies, Inc. RIGOL Guaranty and Declaration Copyright © 2013 RIGOL Technologies, Inc. All Rights Reserved. Trademark Information RIGOL is a registered trademark of RIGOL Technologies, Inc. Publication Number PGA17104-1110 Notices RIGOL products are protected by patent law in and outside of P.R.C. RIGOL reserves the right to modify or change parts of or all the specifications and pricing policies at company’s sole decision. Information in this publication replaces all previously corresponding material. RIGOL shall not be liable for losses caused by either incidental or consequential in connection with the furnishing, use or performance of this manual as well as any information contained. Any part of this document is forbidden to be copied or photocopied or rearranged without prior written approval of RIGOL. Product Certification RIGOL guarantees this product conforms to the national and industrial standards in China as well as the ISO9001:2008 standard and the ISO14001:2004 standard. Other international standard conformance certification is in progress. Contact Us If you have any problem or requirement when using our products or this manual, please contact RIGOL. E-mail: service@rigol.com Website: www.rigol.com DS1000Z Programming Guide I RIGOL Document Overview This manual guides users to control RIGOL DS1000Z series digital oscilloscope remotely by programming using SCPI commands through the remote interface. DS1000Z can build communication with the PC through the USB, LAN or GPIB (option) interface. Main Topics in this Manual: Chapter 1 Programming Overview This chapter introduces how to build the remote communication between DS1000Z series digital oscilloscope and the PC. It also introduces the remote control method and the SCPI commands. Chapter 2 Command System This chapter introduces the syntax, function, parameter and using instruction of each command. Chapter 3 Programming Demos This chapter lists some programming demos to illustrate how to use commands to realize the common functions of the oscilloscope in the development environments of Excel, LabVIEW, Matlab, Visual Basic 6.0 and Visual C++ 6.0. Tip For the newest version of this manual, please download it from www.rigol.com. Format Conventions in this Manual: 1. Button The function key at the front panel is denoted by the format of “Button Name (Bold) + Text Box” in the manual, for example, Utility denotes the “Utility” key. 2. Menu The menu item is denoted by the format of “Menu Word (Bold) + Character Shading” in the manual, for example, System denotes the “System” item under Utility. 3. Operation Step The next step of the operation is denoted by an arrow “” in the manual. For example, Utility System denotes pressing Utility at the front panel and then pressing System. Content Conventions in this Manual: DS1000Z series includes the following models. Unless otherwise noted, this manual takes DS1104Z-S as an example to illustrate the command system of DS1000Z series. Model DS1104Z DS1074Z DS1104Z-S DS1074Z-S II Analog Bandwidth 100 MHz 70 MHz 100 MHz 70 MHz Channel 4 4 4 4 Source Channel None None 2 2 DS1000Z Programming Guide Contents RIGOL Contents Guaranty and Declaration ......................................................................................................... I Document Overview ................................................................................................................. II Chapter 1 Programming Overview......................................................................................1-1 To Build Remote Communication ............................................................................................... 1-2 Remote Control Methods ........................................................................................................... 1-4 SCPI Command Overview .......................................................................................................... 1-5 Syntax ............................................................................................................................... 1-5 Symbol Description ............................................................................................................ 1-5 Parameter Type .................................................................................................................. 1-6 Command Abbreviation ...................................................................................................... 1-6 Chapter 2 Command System ...............................................................................................2-1 :AUToscale ............................................................................................................................... 2-2 :CLEar...................................................................................................................................... 2-2 :RUN........................................................................................................................................ 2-2 :STOP ...................................................................................................................................... 2-2 :SINGle .................................................................................................................................... 2-3 :TFORce ................................................................................................................................... 2-3 :ACQuire Commands ................................................................................................................. 2-4 :ACQuire:AVERages ............................................................................................................ 2-4 :ACQuire:MDEPth ............................................................................................................... 2-5 :ACQuire:TYPE ................................................................................................................... 2-6 :ACQuire:SRATe? ................................................................................................................ 2-7 :CALibrate Commands ............................................................................................................... 2-8 :CALibrate:QUIT ................................................................................................................ 2-8 :CALibrate:STARt ............................................................................................................... 2-8 :CHANnelCommands ......................................................................................................... 2-9 :CHANnel :BWLimit....................................................................................................... 2-9 :CHANnel :COUPling ................................................................................................... 2-10 :CHANnel :DISPlay ..................................................................................................... 2-10 :CHANnel :INVert ....................................................................................................... 2-10 :CHANnel :OFFSet ...................................................................................................... 2-11 :CHANnel :RANGe ...................................................................................................... 2-11 :CHANnel :TCAL ......................................................................................................... 2-12 :CHANnel :SCALe ....................................................................................................... 2-13 :CHANnel :PROBe ....................................................................................................... 2-13 :CHANnel :UNITs ........................................................................................................ 2-14 :CHANnel :VERNier ..................................................................................................... 2-14 :CURSor Commands ............................................................................................................... 2-15 :CURSor:MODE ................................................................................................................ 2-15 :CURSor:MANual .............................................................................................................. 2-16 :CURSor:TRACk ............................................................................................................... 2-21 :CURSor:AUTO:ITEM ........................................................................................................ 2-25 :CURSor:XY ..................................................................................................................... 2-26 :DISPlay Commands ............................................................................................................... 2-29 :DISPlay:CLEar ................................................................................................................ 2-29 :DISPlay:DATA? ............................................................................................................... 2-30 :DISPlay:TYPE ................................................................................................................. 2-31 :DISPlay:GRADing:TIME ................................................................................................... 2-31 :DISPlay:WBRightness ...................................................................................................... 2-31 :DISPlay:GRID ................................................................................................................. 2-32 :DISPlay:GBRightness ...................................................................................................... 2-32 IEEE488.2 Common Commands............................................................................................... 2-33 *CLS ............................................................................................................................... 2-33 *ESE ............................................................................................................................... 2-33 DS1000Z Programming Guide III RIGOL Contents *ESR? .............................................................................................................................. 2-34 *IDN? .............................................................................................................................. 2-34 *OPC ............................................................................................................................... 2-34 *RST ............................................................................................................................... 2-34 *SRE ............................................................................................................................... 2-34 *STB? .............................................................................................................................. 2-35 *TST? .............................................................................................................................. 2-35 *WAI ............................................................................................................................... 2-35 :MATH Commands .................................................................................................................. 2-36 :MATH:DISPlay ................................................................................................................. 2-37 :MATH:OPERator .............................................................................................................. 2-37 :MATH:SOURce1 .............................................................................................................. 2-37 :MATH:SOURce2 .............................................................................................................. 2-38 :MATH:SCALe ................................................................................................................... 2-38 :MATH:OFFSet ................................................................................................................. 2-39 :MATH:INVert ................................................................................................................... 2-39 :MATH:RESet ................................................................................................................... 2-39 :MATH:FFT:WINDow ......................................................................................................... 2-40 :MATH:FFT:SPLit .............................................................................................................. 2-40 :MATH:FFT:UNIT .............................................................................................................. 2-41 :MATH:FFT:HSCale ........................................................................................................... 2-41 :MATH:FFT:HCENter ......................................................................................................... 2-42 :MATH:OPTion:STARt........................................................................................................ 2-42 :MATH:OPTion:END .......................................................................................................... 2-43 :MATH:OPTion:INVert ....................................................................................................... 2-43 :MATH:OPTion:SENSitivity ................................................................................................. 2-44 :MATH:OPTion:DIStance ................................................................................................... 2-44 :MATH:OPTion:ASCale ...................................................................................................... 2-44 :MATH:OPTion:THReshold1 ............................................................................................... 2-45 :MATH:OPTion:THReshold2 ............................................................................................... 2-45 :MASK Commands ................................................................................................................... 2-46 :MASK:ENABle .................................................................................................................. 2-46 :MASK:SOURce................................................................................................................. 2-47 :MASK:OPERate................................................................................................................ 2-47 :MASK:MDISplay .............................................................................................................. 2-48 :MASK:SOOutput .............................................................................................................. 2-48 :MASK:OUTPut ................................................................................................................. 2-49 :MASK:X .......................................................................................................................... 2-49 :MASK:Y .......................................................................................................................... 2-49 :MASK:CREate .................................................................................................................. 2-50 :MASK:PASSed? ................................................................................................................ 2-50 :MASK:FAILed? ................................................................................................................. 2-50 :MASK:TOTal? .................................................................................................................. 2-50 :MASK:RESet .................................................................................................................... 2-50 :MEASure Commands .............................................................................................................. 2-51 :MEASure:SOURce ............................................................................................................ 2-54 :MEASure:COUNter:SOURce .............................................................................................. 2-54 :MEASure:COUNter:VALue? ............................................................................................... 2-54 :MEASure:CLEar ............................................................................................................... 2-55 :MEASure:RECover ........................................................................................................... 2-55 :MEASure:ADISplay .......................................................................................................... 2-56 :MEASure:AMSource ......................................................................................................... 2-56 :MEASure:SETup:MAX ....................................................................................................... 2-57 :MEASure:SETup:MID ....................................................................................................... 2-57 :MEASure:SETup:MIN ....................................................................................................... 2-58 :MEASure:SETup:PSA ........................................................................................................ 2-58 :MEASure:SETup:PSB ........................................................................................................ 2-59 :MEASure:SETup:DSA ....................................................................................................... 2-59 IV DS1000Z Programming Guide Contents RIGOL :MEASure:SETup:DSB ....................................................................................................... 2-59 :MEASure:STATistic:DISPlay.............................................................................................. 2-60 :MEASure:STATistic:MODE ................................................................................................ 2-60 :MEASure:STATistic:RESet ................................................................................................ 2-61 :MEASure:STATistic:ITEM ................................................................................................. 2-61 :MEASure:ITEM ............................................................................................................... 2-62 :REFerence Commands ........................................................................................................... 2-63 :REFerence:DISPlay ......................................................................................................... 2-63 :REFerence :ENABle ................................................................................................... 2-63 :REFerence :SOURce .................................................................................................. 2-64 :REFerence :VSCale .................................................................................................... 2-64 :REFerence :VOFFset .................................................................................................. 2-65 :REFerence :RESet ..................................................................................................... 2-65 [:SOURce[ ]] Commands (DS1000Z-S Only)........................................................................ 2-66 [:SOURce[ ]]:OUTPut[ ][:STATe] ............................................................................ 2-67 [:SOURce[ ]]:OUTPut[ ]:IMPedance ....................................................................... 2-67 [:SOURce[ ]]:FREQuency[:FIXed] ................................................................................ 2-68 [:SOURce[ ]]:PHASe[:ADJust] ..................................................................................... 2-68 [:SOURce[ ]]:PHASe:INITiate ...................................................................................... 2-69 [:SOURce[ ]]:FUNCtion[:SHAPe] .................................................................................. 2-69 [:SOURce[ ]]:FUNCtion:RAMP:SYMMetry ..................................................................... 2-70 [:SOURce[ ]]:VOLTage[:LEVel][:IMMediate][:AMPLitude] .............................................. 2-70 [:SOURce[ ]]:VOLTage[:LEVel][:IMMediate]:OFFSet...................................................... 2-71 [:SOURce[ ]]:PULSe:DCYCle ....................................................................................... 2-71 [:SOURce[ ]]:MOD[:STATe] ......................................................................................... 2-72 [:SOURce[ ]]:MOD:TYPe ............................................................................................. 2-72 [:SOURce[ ]]:MOD:AM[:DEPTh] .................................................................................. 2-73 [:SOURce[ ]]:MOD:AM:INTernal:FREQuency ................................................................ 2-73 [:SOURce[ ]]:MOD:FM:INTernal:FREQuency ................................................................ 2-73 [:SOURce[ ]]:MOD:AM:INTernal:FUNCtion ................................................................... 2-74 [:SOURce[ ]]:MOD:FM:INTernal:FUNCtion ................................................................... 2-74 [:SOURce[ ]]:MOD:FM[:DEVIation] .............................................................................. 2-74 [:SOURce[ ]]:APPLy? .................................................................................................. 2-75 [:SOURce[ ]]:APPLy:NOISe ......................................................................................... 2-75 [:SOURce[ ]]:APPLy:PULSe ......................................................................................... 2-75 [:SOURce[ ]]:APPLy:RAMP .......................................................................................... 2-75 [:SOURce[ ]]:APPLy:SINusoid...................................................................................... 2-75 [:SOURce[ ]]:APPLy:SQUare........................................................................................ 2-75 [:SOURce[ ]]:APPLy:USER ........................................................................................... 2-75 :SYSTem Commands ............................................................................................................... 2-77 :SYSTem:AUToscale.......................................................................................................... 2-77 :SYSTem:BEEPer .............................................................................................................. 2-77 :SYSTem:ERRor[:NEXT]? .................................................................................................. 2-78 :SYSTem:GPIB ................................................................................................................. 2-78 :SYSTem:LANGuage ......................................................................................................... 2-78 :SYSTem:LOCKed ............................................................................................................. 2-78 :SYSTem:PON .................................................................................................................. 2-79 :SYSTem:OPTion:INSTall .................................................................................................. 2-79 :SYSTem:OPTion:UNINSTall .............................................................................................. 2-79 :TIMebase Commands ............................................................................................................ 2-80 :TIMebase:DELay:ENABle ................................................................................................. 2-80 :TIMebase:DELay:OFFSet ................................................................................................. 2-80 :TIMebase:DELay:SCALe .................................................................................................. 2-81 :TIMebase[:MAIN]:OFFSet................................................................................................ 2-81 :TIMebase[:MAIN]:SCALe ................................................................................................. 2-82 :TIMebase:MODE ............................................................................................................. 2-82 :TRIGger Commands .............................................................................................................. 2-83 :TRIGger:MODE ............................................................................................................... 2-83 DS1000Z Programming Guide V RIGOL Contents :TRIGger:COUPling ........................................................................................................... 2-84 :TRIGger:STATus? ............................................................................................................ 2-84 :TRIGger:SWEep .............................................................................................................. 2-84 :TRIGger:HOLDoff ............................................................................................................ 2-85 :TRIGger:NREJect ............................................................................................................ 2-85 :TRIGger:EDGe ................................................................................................................ 2-86 :TRIGger:PULSe ............................................................................................................... 2-88 :TRIGger:SLOPe ............................................................................................................... 2-91 :TRIGger:VIDeo ............................................................................................................... 2-96 :TRIGger:PATTern ............................................................................................................. 2-99 :TRIGger:DURATion ........................................................................................................ 2-101 :TRIGger:TIMeout (Option) ............................................................................................. 2-104 :TRIGger:RUNT (Option) ................................................................................................. 2-106 :TRIGger:WINDows (Option)........................................................................................... 2-110 :TRIGger:DELay (Option) ................................................................................................ 2-113 :TRIGger:SHOLd (Option) ............................................................................................... 2-116 :TRIGger:NEDGe (Option) ............................................................................................... 2-119 :TRIGger:RS232 (Option) ................................................................................................ 2-121 :TRIGger:IIC (Option)..................................................................................................... 2-125 :TRIGger:SPI (Option) .................................................................................................... 2-129 :WAVeform Commands .......................................................................................................... 2-133 :WAVeform:SOURce ........................................................................................................ 2-134 :WAVeform:MODE .......................................................................................................... 2-135 :WAVeform:FORMat ........................................................................................................ 2-135 :WAVeform:DATA? .......................................................................................................... 2-136 :WAVeform:XINCrement? ................................................................................................ 2-137 :WAVeform:XORigin? ...................................................................................................... 2-137 :WAVeform:XREFerence? ................................................................................................ 2-137 :WAVeform:YINCrement? ................................................................................................ 2-138 :WAVeform:YORigin? ...................................................................................................... 2-138 :WAVeform:YREFerence? ................................................................................................ 2-138 :WAVeform:STARt ........................................................................................................... 2-139 :WAVeform:STOP ........................................................................................................... 2-139 :WAVeform:PREamble? ................................................................................................... 2-140 Chapter 3 Programming Demos ......................................................................................... 3-1 Programming Preparations ......................................................................................................... 3-2 Excel Programming Demo .......................................................................................................... 3-3 Matlab Programming Demo........................................................................................................ 3-7 LabVIEW Programming Demo .................................................................................................... 3-9 Visual Basic Programming Demo .............................................................................................. 3-13 Visual C++ Programming Demo ............................................................................................... 3-15 VI DS1000Z Programming Guide Chapter 1 Programming Overview RIGOL Chapter 1 Programming Overview This chapter introduces how to build the remote communication between the PC and instrument and provides an overview of the syntax, symbol, parameter type and abbreviation rules of the SCPI commands. Main topics of this chapter: To Build Remote Communication Remote Control Methods SCPI Command Overview DS1000Z Programming Guide 1-1 RIGOL Chapter 1 Programming Overview To Build Remote Communication This oscilloscope can build communication with the PC through the USB, LAN or GPIB (option) interface. This section introduces how to control the oscilloscope remotely through the USB interface using Ultra Sigma in details. Operation Steps: 1. Install the Ultra Sigma common PC software Download the Ultra Sigma common PC software from www.rigol.com or acquire it from the resource CD supplied with the accessories and install it according to the instructions. 2. Connect the instrument and PC and configure the interface parameters of the instrument DS1000Z can build communication with the PC through the USB, LAN or GPIB (option) interface. This manual takes the USB interface as an example. (1) Connect the devices Connect the USB DEVICE interface at the real panel of the oscilloscope and the USB Host interface of the PC using a USB cable. (2) Install the USB driver This oscilloscope is a USBTMC device. Assuming that your PC has already been installed with Ultra Sigma, after you connect the oscilloscope to the PC and turn both on for the first time (the oscilloscope is automatically configured to the USB interface), the New Hardware Wizard as shown in the figure below is displayed on the PC. Please install the “USB Test and Measurement Device” driver following the directions in the wizard. The steps are as follows. 1 2 3 4 1-2 DS1000Z Programming Guide RIGOL Chapter 1 Programming Overview 5 6 7 (3) Search for device resource Start up the Ultra Sigma and the software will automatically search for the oscilloscope resources currently connected to the PC. You can also click to search for the resources. During the search, the status bar of the software is as shown in the figure below. DS1000Z Programming Guide 1-3 RIGOL Chapter 1 Programming Overview (4) View the device resources The resources found will appear under the “RIGOL Online Resource” directory and the model number and USB interface information of the instrument will also be displayed as shown in the figure below. (5) Communication test Right click the resource name “DS1104Z (USB0::0x1AB1::0x04CE::DS1T0000000006::INSTR)” and select “SCPI Panel Control” to turn on the remote command control panel (as shown in the figure below) through which you can send commands and read data. Remote Control Methods 1. User-defined Programming Users can use the SCPI (Standard Commands for Programmable Instruments) commands to program and control the oscilloscope. For details, refer to the introductions in Chapter 3 Programming Demos. 2. Send SCPI Commands via the PC Software You can control the oscilloscope remotely by sending SCPI commands via the PC software (Ultra Sigma) provided by RIGOL. Besides, you can also control the instrument using the “Measurement & Automation Explorer” of NI (National Instruments Corporation) or the “Agilent IO Libraries Suite” of Agilent (Agilent Technologies, Inc.). 1-4 DS1000Z Programming Guide Chapter 1 Programming Overview RIGOL SCPI Command Overview SCPI (Standard Commands for Programmable Instruments) is a standardized instrument programming language that is built upon the standard IEEE488.1 and IEEE 488.2 and conforms to various standards (such as the floating point operation rule in IEEE754 standard, ISO646 7-bit coded character for information interchange (equivalent to ASCll programming)). The SCPI commands provide a hierarchical tree structure. Each command subsystem consists of a root keyword and on or more sub-keywords. Syntax The command string usually starts with ":"; the keywords are separated by ":" and are followed by the parameter settings available; "?" is added at the end of the command string to indicate query; the command and parameter are separated by space. For example, :ACQuire:TYPE :ACQuire:TYPE? ACQuire is the root keyword of the command. TYPE is the second-level keyword. The command string starts with ":" which is also used to separate the multiple-level keywords. represents the parameters available for setting. "?" represents query. The command :ACQuire:TYPE and parameter are separated by space. "," is generally used for separating multiple parameters contained in the same command, for example, :TRIGger:PATTern:PATTern , , , Symbol Description The following symbols will not be sent with the commands. 1. Braces {} The parameters enclosed in the braces are optional and are usually separated by the vertical bar "|". When using the command, one of the parameters must be selected. 2. Vertical Bar | The vertical bar is used to separate multiple parameters and one of the parameters must be selected when using the command. 3. Square Brackets [] The content in the square brackets can be omitted. 4. Triangle Brackets <> The parameter enclosed in the triangle brackets must be replaced by an effective value. DS1000Z Programming Guide 1-5 RIGOL Chapter 1 Programming Overview Parameter Type 1. Bool The parameter could be OFF, ON, 0 or 1. For example, :MEASure:ADISplay :MEASure:ADISplay? Wherein, can be set to {{0|OFF}|{1|ON}}. The query returns 0 or 1. 2. Discrete The parameter could be any of the values listed. For example, :ACQuire:TYPE :ACQuire:TYPE? Wherein, can be set to NORMal|AVERages|PEAK|HRESolution. The query returns the abbreviations (NORM, AVER, PEAK or HRES). 3. Integer Unless otherwise noted, the parameter can be any integer (NR1 format) within the effective value range. Note that do not set the parameter to a decimal, otherwise errors will occur. For example, :DISPlay:GBRightness :DISPlay:GBRightness? Wherein, can be set to any integer between 0 and 100. The query returns an integer between 0 and 100. 4. Real The parameter can be any real number within the effective value range and this command accepts decimal (NR2 format) and scientific notation (NR3 format) parameter input. For example, :TRIGger:TIMeout:TIMe :TRIGger:TIMeout:TIMe? Wherein, can be set to any real number between 1.600000e-08 (namely 16ns) to 0.1e+02 (namely 10s). The query returns a real number in scientific notation. 5. ASCII String The parameter should be the combinations of ASCII characters. For example, :SYSTem:OPTion:INSTall Wherein, can be set to PDUY9N9QTS9PQSWPLAETRD3UJHYA. Command Abbreviation All the commands are case-insensitive and you can use any of them. If abbreviation is used, all the capital letters in the command must be written completely. For example, the :MEASure:ADISplay? command can be abbreviated to :MEAS:ADIS?. 1-6 DS1000Z Programming Guide Chapter 2 Command System RIGOL Chapter 2 Command System This chapter introduces the syntax, function, parameter and using instruction of each DS1000Z command. Main topics of this chapter: :AUToscale :CLEar :RUN :STOP :SINGle :TFORce :ACQuire Commands :CALibrate Commands :CHANnel Commands :CURSor Commands :DISPlay Commands IEEE488.2 Common Commands :MATH Commands :MASK Commands :MEASure Commands :REFerence Commands [:SOURce[ ]] Commands (DS1000Z-S Only) :SYSTem Commands :TIMebase Commands :TRIGger Commands :WAVeform Commands Note: 1. Unless otherwise noted, this manual takes DS1104Z-S as an example to introduce the commands. 2. For parameter setting commands (for example, the time, frequency and amplitude), the oscilloscope can only accept numbers and set the parameters using the default units; it cannot recognize the units sent with the parameters. For the default unit of each parameter, please refer to the description in each command in the following introductions. DS1000Z Programming Guide 2-1 RIGOL Chapter 2 Command System :AUToscale Syntax :AUToscale Description Enable the waveform auto setting function. The oscilloscope will automatically adjust the vertical scale, horizontal timebase and trigger mode according to the input signal to realize optimum waveform display. This command is equivalent to pressing the AUTO key at the front panel. Explanation Theoretically, waveform auto setting function requires that the frequency of sine is no lower than 41Hz; the duty cycle should be greater than 1% and the amplitude must be at least 20mVpp for square. When the pass/fail function is enabled (see the :MASK:ENABle command), if you sent this command, the oscilloscope will disable the pass/fail function firstly and then execute the waveform auto setting function. When the waveform record function is enabled or during the playback of the recorded waveform, this command is invalid. :CLEar Syntax Description Related Command :CLEar Clear all the waveforms on the screen. If the oscilloscope is in the RUN state, waveform will still be displayed. This command is equivalent to pressing the CLEAR key at the front panel. :DISPlay:CLEar :RUN :STOP Syntax :RUN :STOP Description The :RUN command makes the oscilloscope start running and the :STOP command makes the oscilloscope stop running. These commands are equivalent to pressing the RUN/STOP key at the front panel. Explanation When the waveform record function is enabled or during the playback of the recorded waveform, this command is invalid. 2-2 DS1000Z Programming Guide Chapter 2 Command System RIGOL :SINGle Syntax :SINGle Description Set the oscilloscope to the single trigger mode. This command is equivalent to the following two operations: pressing the SINGLE key at the front panel and sending the :TRIGger:SWEep SINGle command. Explanation In the single trigger mode, the oscilloscope triggers once when the trigger conditions are met and then stops. When the waveform record function is enabled or during the playback of the recorded waveform, this command is invalid. Related Commands :TFORce :RUN :STOP :TFORce Syntax Description Related Command :TFORce Generate a trigger signal forcefully. This command is only applicable to the normal and single trigger modes (see the :TRIGger:SWEep command) and is equivalent to pressing the FORCE key at the front panel. :TRIGger:SWEep DS1000Z Programming Guide 2-3 RIGOL Chapter 2 Command System :ACQuire Commands The :ACQuire commands are used to set and query the memory depth, acquisition mode and the current sample rate of the oscilloscope as well as to set the number of averages under the average acquisition mode. Command List [1] : :ACQuire:AVERages :ACQuire:MDEPth :ACQuire:TYPE :ACQuire:SRATe? Note[1]: In the “Command List” in this manual, the parameters in the setting commands and the query commands are not included and you can refer to the complete introductions of the commands in the text according to the keyword. :ACQuire:AVERages Syntax :ACQuire:AVERages :ACQuire:AVERages? Description Parameter Explanation Return Format Example Related Command 2-4 Set or query the number of averages under the average acquisition mode. Name Type Range Default Integer 2n (n is an integer from 1 to 10) 2 You can sent the :ACQuire:TYPE command to set the acquisition mode. In the average acquisition mode, the greater the number of averages is, the lower the noise will be and the higher the vertical resolution will be but the slower the response of the displayed waveform to the waveform changes will be. The query returns an integer between 2 and 1024. :ACQuire:AVERages 128 :ACQuire:AVERages? /*Set the number of averages to 128*/ /*The query returns 128*/ :ACQuire:TYPE DS1000Z Programming Guide RIGOL Chapter 2 Command System :ACQuire:MDEPth Syntax :ACQuire:MDEPth :ACQuire:MDEPth? Description Parameter Explanation Return Format Example Related Commands Set or query the memory depth of the oscilloscope namely the number of waveform points that can be stored in a single trigger sample. The default unit is pts (points). Name Type Range Default Discrete Refer to the Explanation AUTO When a single channel is on: {AUTO|12000|120000|1200000|12000000|24000000} When dual channels are on: {AUTO|6000|60000|600000|6000000|12000000} When four channels are on: {AUTO|3000|30000|300000|3000000|6000000} Wherein, 24000000, 12000000 and 6000000 are options. The relationship among the memory depth, sample rate and waveform length satisfies the following equation: Memory Depth = Sample Rate × Waveform Length Wherein, the Waveform Length is the product of the horizontal timebase (set by the :TIMebase[:MAIN]:SCALe command) times the number of the horizontal scales (12 for DS1000Z). When AUTO is selected, the oscilloscope will select the memory depth automatically according to the current sample rate. The query returns the actual number of points (integer) or AUTO. :ACQuire:MDEPth 12000 :ACQuire:MDEPth? /*Set the memory depth to 12000*/ /*The query returns 12000*/ :ACQuire:SRATe? :TIMebase[:MAIN]:SCALe DS1000Z Programming Guide 2-5 RIGOL Chapter 2 Command System :ACQuire:TYPE Syntax :ACQuire:TYPE :ACQuire:TYPE? Description Parameter Explanation Return Format Example Related Command 2-6 Set or query the acquisition mode when the oscilloscope samples. Name Type Range Default Discrete {NORMal|AVERages|PEAK|HRESolution} NORMal NORMal: in this mode, the oscilloscope samples the signal at equal time interval to rebuild the waveform. For most of the waveforms, the best display effect can be obtained using this mode. AVERages: in this mode, the oscilloscope averages the waveforms from multiple samples to reduce the random noise of the input signal and improve the vertical resolution. The number of averages can be set by the:ACQuire:AVERages command. The greater the number of averages is, the lower the noise will be and the higher the vertical resolution will be but the slower the response of the displayed waveform to the waveform changes will be. PEAK (Peak Detect): in this mode, the oscilloscope acquires the maximum and minimum values of the signal within the sample interval to get the envelope of the signal or the narrow pulse of the signal that might be lost. In this mode, signal confusion can be prevented but the noise displayed would be larger. HRESolution (High Resolution): this mode uses a kind of ultra-sample technique to average the neighboring points of the sample waveform to reduce the random noise on the input signal and generate much smoother waveforms on the screen. This is generally used when the sample rate of the digital converter is higher than the storage rate of the acquisition memory. The query returns NORM, AVER, PEAK or HRES. :ACQuire:TYPE AVERages /*Select the average acquisition mode*/ :ACQuire:AVERages DS1000Z Programming Guide RIGOL Chapter 2 Command System :ACQuire:SRATe? Syntax :ACQuire:SRATe? Description Query the current sample rate. The default unit is Sa/s. Explanation Sample rate is the sample frequency of the oscilloscope, namely the waveform points sampled per second. The relationship among the memory depth, sample rate and waveform length satisfies the following equation: Memory Depth = Sample Rate × Waveform Length Wherein, the Memory Depth can be set using the :ACQuire:MDEPth command, and the Waveform Length is the product of the horizontal timebase (set by the :TIMebase[:MAIN]:SCALe command) times the number of the horizontal scales (12 for DS1000Z). Return Format The query returns the sample rate in scientific notation. Example :ACQuire:SRATe? Related Commands :ACQuire:MDEPth /*The query returns 2.000000e+09*/ :TIMebase[:MAIN]:SCALe DS1000Z Programming Guide 2-7 RIGOL Chapter 2 Command System :CALibrate Commands Command List: :CALibrate:QUIT :CALibrate:STARt :CALibrate:QUIT Syntax Description Related Command :CALibrate:QUIT Exit the calibration at any time. :CALibrate:STARt :CALibrate:STARt Syntax :CALibrate:STARt Description The oscilloscope starts to execute the self-calibration. Explanation The self-calibration can make the oscilloscope quickly reach its optimum working state to obtain the most accurate measurement values. During the self-calibration, all the channels of the oscilloscope must be disconnected from the inputs. The functions of most of the keys are disabled during the self-calibration. You can send the :CALibrate:QUIT command to quit the self-calibration. Related Command 2-8 :CALibrate:QUIT DS1000Z Programming Guide RIGOL Chapter 2 Command System :CHANnel Commands The :CHANnel commands are used to set or query the vertical system parameters, such as the bandwidth limit, coupling, vertical scale and vertical offset. Command List: :CHANnel :BWLimit :CHANnel :COUPling :CHANnel :DISPlay :CHANnel :INVert :CHANnel :OFFSet :CHANnel :RANGe :CHANnel :TCAL :CHANnel :SCALe :CHANnel :PROBe :CHANnel :UNITs :CHANnel :VERNier :CHANnel :BWLimit Syntax :CHANnel :BWLimit :CHANnel :BWLimit? Description Parameter Explanation Return Format Example Set or query the bandwidth limit parameter of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Discrete {20M|OFF} OFF OFF: disable the bandwidth limit and the high frequency components of the signal under test can pass the channel. 20M: enable the bandwidth limit and the high frequency components that exceed 20 MHz are attenuated. Enabling the bandwidth limit can reduce the noise, but can also attenuate the high frequency components. The query returns 20M or OFF. :CHANnel1:BWLimit 20M DS1000Z Programming Guide /*Enable the 20MHz bandwidth limit*/ 2-9 RIGOL Chapter 2 Command System :CHANnel :COUPling Syntax :CHANnel :COUPling :CHANnel :COUPling? Description Parameter Explanation Return Format Example Set or query the coupling mode of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Discrete {AC|DC|GND} DC AC: the DC components of the signal under test are blocked. DC: the DC and AC components of the signal under test can both pass the channel. GND: the DC and AC components of the signal under test are both blocked. The query returns AC, DC or GND. :CHANnel1:COUPling AC /*Select the AC coupling mode*/ :CHANnel :DISPlay Syntax :CHANnel :DISPlay :CHANnel :DISPlay? Description Parameter Return Format Example Enable or disable the specified channel or query the status of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Bool {{0|OFF}|{1|ON}} CH1: 1|ON Others: 0|OFF The query returns 0 or 1. :CHANnel1:DISPlay ON /*Enable CH1*/ :CHANnel :INVert Syntax :CHANnel :INVert :CHANnel :INVert? Description Parameter Explanation Return Format Example 2-10 Enable or disable the inverted display mode of the specified channel or query the status of the inverted display mode of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Bool {{0|OFF}|{1|ON}} 0|OFF When the inverted display mode is enabled, the oscilloscope displays the waveform inverted taking the vertical offset horizontal line as reference. The query returns 0 or 1. :CHANnel1:INVert ON /*Enable the inverted display mode of CH1*/ DS1000Z Programming Guide RIGOL Chapter 2 Command System :CHANnel :OFFSet Syntax :CHANnel :OFFSet :CHANnel :OFFSet? Description Parameter Set or query the vertical offset of the specified channel. The default unit is V. Name Type Range Default Discrete {1|2|3|4} -- Real Related to the current vertical scale and probe ratio. When the probe ratio is 1, vertical scale≥500mV/div: -100V to +100V vertical scale<500mV/div: -2V to +2V 0V Return Format Example The query returns the vertical offset in scientific notation. :CHANnel1:OFFSet 0.01 :CHANnel1:OFFSet? /*Set the vertical offset of CH1 to 10mV*/ /*The query returns 1.000000e-02*/ :CHANnel :RANGe Syntax :CHANnel :RANGe :CHANnel :RANGe? Description Parameter Explanation Return Format Example Related Command Set or query the vertical range of the specified channel. The default unit is V. Name Type Range Default Discrete {1|2|3|4} -- Real Related to the current vertical scale and probe ratio. When the probe ratio is 1, 8mV to 80V 8V This command indirectly modifies the vertical scale of the specified channel (vertical range=8*vertical scale). The vertical scale can be set by the :CHANnel :SCALe command. The query returns the vertical range in scientific notation. :CHANnel1:RANGe 8 :CHANnel1:RANGe? /*Set the vertical range of CH1 to 8V*/ /*The query returns 8.000000e+00*/ :CHANnel :SCALe DS1000Z Programming Guide 2-11 RIGOL Chapter 2 Command System :CHANnel :TCAL Syntax :CHANnel :TCAL :CHANnel :TCAL? Description Parameter Explanation Return Format Set or query the delay calibration time of the specified channel to calibrate the zero offset of the corresponding channel. The default unit is s. Name Type Range Default Discrete {1|2|3|4} -- Real -100ns to 100ns 0.00ns can only be set to the specific values in the specified step. If the parameter you sent is not one of the specific values, the parameter will be set to the nearest specific values automatically. The step varies with the horizontal timebase (set by the :TIMebase[:MAIN]:SCALe command). Horizontal Timebase Step of the Delay Calibration Time 5ns 100ps 10ns 200ps 20ns 400ps 50ns 1ns 100ns 2ns 200ns 4ns 500ns 10ns 1μs and above 20ns The query returns the delay calibration time in scientific notation. Example :CHANnel1:TCAL 0.00002 :CHANnel1:TCAL? Related Command :TIMebase[:MAIN]:SCALe 2-12 /*Set the delay calibration time to 20ns*/ /*The query returns2.000000e-05*/ DS1000Z Programming Guide RIGOL Chapter 2 Command System :CHANnel :SCALe Syntax :CHANnel :SCALe :CHANnel :SCALe? Description Parameter Explanation Return Format Example Related Command Set or query the vertical scale of the specified channel. The default unit is V. Name Type Range Default Discrete {1|2|3|4} -- Real Related to the current probe ratio. probe ratio = 1: 1mV to 10V probe ratio = 10 (default): 10mV to 100V 1V (the probe ratio is 10) The range of the vertical scale is related to the current probr ratio (set by the :CHANnel :PROBe command). As the default probe ratio of DS1000Z is 10, the default value of is the value when the probe ratio is 10. You can use the :CHANnel :VERNier command to enable or disable the fine adjustment of the vertical scale. By default, the fine adjustment is off. At this point, you can only set the vertical scale in 1-2-5 step, namely 1mV, 2mV, 5mV, 10mV, …, 10V. When the fine adjustment is on, you can further adjust the vertical scale within a relatively smaller range to improve the vertical resolution. If the amplitude of the input waveform is a little bit greater than the full scale under the current scale and the amplitude would be a little bit lower if the next scale is used, fine adjustment can be used to improve the display amplitude of the waveform to view the signal details. The query returns the vertical scale in scientific notation. :CHANnel1:SCALe 1 :CHANnel1:SCALe? /*Set the vertical scale of CH1 to 1V*/ /*The query returns 1.000000e+00*/ :CHANnel :PROBe :CHANnel :VERNier :CHANnel :PROBe Syntax :CHANnel :PROBe :CHANnel :PROBe? Description Parameter Explanation Return Format Example Related Command Set or query the probe ratio of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Discrete {0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|1 00|200|500|1000} 10 Setting the probe ratio refers to multiply the signal sampled with the specified ratio and then display the result (the actual amplitude of the signal will be not affected). Setting the probe ratio will affect the range of the vertical scale. The query returns the probe ratio in scientific notation. :CHANnel1:PROBe 10 /*Set the probe ratio to 10*/ :CHANnel1:PROBe? /*The query returns 1.000000e+01*/ :CHANnel :SCALe DS1000Z Programming Guide 2-13 RIGOL Chapter 2 Command System :CHANnel :UNITs Syntax :CHANnel :UNITs :CHANnel :UNITs? Description Parameter Return Format Example Set or query the amplitude display unit of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Discrete {VOLTage|WATT|AMPere|UNKNown} VOLTage The query returns VOLT, WATT, AMP or UNKN. :CHANnel1:UNITs VOLTage /*Set the amplitude display unit of CH1 to V*/ :CHANnel :VERNier Syntax :CHANnel :VERNier :CHANnel :VERNier? Description Parameter Explanation Return Format Example Related Command 2-14 Enable or disable the fine adjustment of the vertical scale of the specified channel, or query the fine adjustment status of the vertical scale of the specified channel. Name Type Range Default Discrete {1|2|3|4} -- Bool {{0|OFF}|{1|ON}} 0|OFF By default, the fine adjustment is off. At this point, you can only set the vertical scale in 1-2-5 step, namely 1mV, 2mV, 5mV, 10mV…10V. When the fine adjustment is on, you can further adjust the vertical scale within a relatively smaller range to improve the vertical resolution. If the amplitude of the input waveform is a little bit greater than the full scale under the current scale and the amplitude would be a little bit lower if the next scale is used, fine adjustment can be used to improve the display amplitude of the waveform to view the signal details. The query returns 0 or 1. :CHANnel1:VERNier ON /*Enable the fine adjustment of the vertical scale of CH1*/ :CHANnel :SCALe DS1000Z Programming Guide RIGOL Chapter 2 Command System :CURSor Commands The :CURSor commands are used to measure the X-axis value (such as time) and Y-axis value (such as voltage) of the waveform displayed on the screen. Command List: :CURSor:MODE :CURSor:MANual :CURSor:TRACk :CURSor:AUTO:ITEM :CURSor:XY :CURSor:MODE Syntax :CURSor:MODE :CURSor:MODE? Description Parameter Explanation Return Format Example Related Commands Set or query the cursor measurement mode. Name Type Range Default Discrete {OFF|MANual|TRACk|AUTO|XY} OFF OFF: disable the cursor measurement function. MANual: enable the manual cursor measurement mode. TRACk: enable the track cursor measurement mode. AUTO: enable the auto cursor measurement mode. XY: enable the XY cursor measurement mode. This mode is valid only when the horizontal timebase mode is XY. The query returns OFF, MAN, TRAC, AUTO or XY. :CURSor:MODE MANual /*Enable the manual cursor measurement mode*/ :CURSor:MANual :CURSor:TRACk :CURSor:XY :TIMebase:MODE DS1000Z Programming Guide 2-15 RIGOL Chapter 2 Command System :CURSor:MANual Command List: :CURSor:MANual:TYPE :CURSor:MANual:SOURce :CURSor:MANual:TUNit :CURSor:MANual:VUNit :CURSor:MANual:AX :CURSor:MANual:BX :CURSor:MANual:AY :CURSor:MANual:BY :CURSor:MANual:AXValue? :CURSor:MANual:AYValue? :CURSor:MANual:BXValue? :CURSor:MANual:BYValue? :CURSor:MANual:XDELta? :CURSor:MANual:IXDELta? :CURSor:MANual:YDELta? :CURSor:MANual:TYPE Syntax :CURSor:MANual:TYPE :CURSor:MANual:TYPE? Description Parameter Explanation Return Format Example 2-16 Set or query the cursor type in manual cursor measurement mode. Name Type Range Default Discrete {X|Y} X X: select the X type cursors. The X type cursors are a vertical solid line (cursor A) and a vertical dotted line (cursor B) and are usually used to measure the time parameters. Y: select the Y type cursors. The Y type cursors are a horizontal solid line (cursor A) and a horizontal dotted line (cursor B) and are usually used to measure the voltage parameters. The query returns X or Y. :CURSor:MANual:TYPE Y /*select the Y type cursors*/ DS1000Z Programming Guide RIGOL Chapter 2 Command System :CURSor:MANual:SOURce Syntax :CURSor:MANual:SOURce