RIGOL Programming Guide DS1000B Series Digital Oscilloscope DS1204B/DS1104B/DS1064B Dec. 2009 RIGOL Technologies, Inc.
RIGOL Copyright © 2008 RIGOL Technologies, Inc. All Rights Reserved. Trademark Information RIGOL is registered trademark of RIGOL Technologies, Inc. Notices RIGOL products are protected by patent law in and outside of P.R.C.. RIGOL Technologies, Inc. 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 Content Chapter 1 Programming Introduction .................................................. 1-1 Communication Interface ............................................................................ 1-2 Command Introduction ............................................................................... 1-3 Command Syntax ................................................................................ 1-3 Symbol Description ............................................................................
RIGOL Program in Visual Basic 6.0 ......................................................................... 3-8 Program in LabVIEW 8.6............................................................................3-10 Appendix: Command Quick Reference A-Z .................................................
Programming Introduction RIGOL Chapter 1 Programming Introduction This chapter provides guidance to the remote control programming of the DS1000B series digital oscilloscopes and introduction of the commands.
RIGOL Programming Introduction 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 (waveforms or measurement data) from the oscilloscope.
Programming Introduction RIGOL 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.
RIGOL Programming Introduction Symbol Description The following symbols are not “real” parts of the commands, but they are usually 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 example: {{1|ON}|{0|OFF}} indicateds that 1, ON, 0 or OFF can be selected at a time. 2.
Programming Introduction RIGOL Command Input All the comands are not sensitive to both capital letter and lowercase, so you can use any kind of them. But if use abbreviation, the capital letters specified in commands must be written completely.
Programming Introduction RIGOL 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.
Command Systems RIGOL Chapter 2 Command Systems In this chapter, we will introduce every comand in the DS1000B command systems. The introduction inludes command format, function description, query/Returned Format and some other notices that should pay attention to during using the commands.
Command Systems RIGOL 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.
Command Systems 1. RIGOL *IDN? Command Format: *IDN? Function: The command queries the manufacturer, the oscilloscope model, the product serial and the software version. Returned Format: manufacturer, , , . Example: Rigol Technologies, DS1204B, DS10000000, 00.02.04. 2. *RST Command Format: *RST Function: The command resets the system. 3. *LRN? Command Format: *LRN? Function: The command queries the system settings.
RIGOL 4. Command Systems *OPC? Command Format: *OPC? Function: The command queries whether the command operation has been completed. Returned Format: The query returns 0 or 1. 1 means operation has been completed, 0 means not.
Command Systems RIGOL SYSTem Commands SYSTem Commands are used for the basic operations of an oscilloscope: RUN/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.
Command Systems RIGOL 1. :RUN Command Format: :RUN Function: Execute this command, the oscilloscope will start waveform sampling working. To stop working, execute :STOP command again. 2. :STOP Command Format: :STOP Function: Execute this command, the oscilloscope will stop waveform sampling working. To restart working, execute :RUN command again. 3.
Command Systems RIGOL The query returns the last error, such as “Undefined header”. If there is no error, return “0, No error”.
Command Systems RIGOL System Error Code 5. :SYSTem:SETup Command Format: :SYSTem:SETup :SYSTem:SETup? Function: The command downloads the system setup data. is a binary data that meets IEEE 488.2 # format. Returned Format: The query returns the value of system setup data.
Command Systems RIGOL System Error Code Up to 10 errors can be recorded in the system error queue. 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.
Command Systems RIGOL 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 fra
Command Systems RIGOL 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 2-11
RIGOL Command Systems 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.
Command Systems 1. RIGOL :ACQuire:TYPE Command Format: :ACQuire:TYPE :ACQuire:TYPE? Function: The command sets the acquisition type. The 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 :ACQ:TYPE? 2. Set the acquisition type as average acquisition. Return AVERAGE.
Command Systems RIGOL :ACQuire:AVERages :ACQuire:AVERages? Function: The command sets the average acquisition time. The 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 :ACQ:AVER? 4. Set the average acquisition time as 16. Return 16. :ACQuire:SRATe? Command Format: :ACQuire:SRATe? [{}] Function: To query sample rate of CHANnel , may be 1, 2, 3, 4.
Command Systems RIGOL 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.
Command Systems RIGOL 1. :DISPlay:TYPE Command Format: :DISPlay:TYPE :DISPlay:TYPE? Function: The command sets the display type of acquisition points. The may be VECTors (acquisition points are connected by lines) or DOTS (acquisition points are displayed by dots). Returned Format: The query returns VECTORS or DOTS. Example: :DISP:TYPE VECT :DISP:TYPE? 2. Set the display type as vectors. Return VECTORS.
Command Systems RIGOL Command Format: :DISPlay:PERSist {{1|ON}|{0|OFF}} :DISPlay:PERSist? Function: The command sets waveform persist function ON (The waveform 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 :DISP:PERS? 4. Set waveform persist function on. Return 1.
Command Systems RIGOL :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 :DISP:MNUS? 6. Set menu display function on. Return 1. :DISPlay:SCReen Command Format: :DISPlay:SCReen :DISPlay:SCReen? Function: The command sets the display mode of screen.
Command Systems RIGOL The command clears the out of date waveforms on the screen during waveform persist. 8. :DISPlay:BRIGhtness Command Format: :DISPlay:BRIGhtness :DISPlay:BRIGhtness? Function: The command sets the brightness of grid. The range is 0~100, and the bigger the count is, the brighter the grid becomes. Returned Format: The query returns 0 or 1, 2 ……100. Example: :DISP:BRIG 10 :DISP:BRIG? 9. Set the grid brightness as 10. Return 10.
RIGOL Command Systems 10. :DISPlay:DATA? Command Format: :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+the data of 8 bit bitmap.
Command Systems RIGOL TIMebase Commands TIMebase Commands are used to set horizontal scale 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.
Command Systems RIGOL 1. :TIMebase:MODE Command Format: :TIMebase:MODE :TIMebase:MODE? Function: The command sets the scan mode of horizontal timebase as MAIN (main time base) or DELayed (zoomed scan time base). Returned Format: The query returns MAIN or DELAYED. Example: :TIM:MODE MAIN :TIM:MODE? 2. Set the scan mode as main time base. Return MAIN.
Command Systems :TIM:OFFS? 3. RIGOL Return 1.000e000. :TIMebase:DELayed:OFFSet Command Format: :TIMebase:DELayed: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.
Command Systems RIGOL :TIMebase[:MAIN]:SCALe :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 , range: 1ns/div~50s/div. DS1104B, range: 2ns/div~50s/div. DS1064B, range: 5ns/div~50s/div. In SCAN mode, range: 50ms ~ 50s. Returned Format: The query returns the value of timebase scale, and the unit is s.
Command Systems RIGOL Returned Format: The query returns the value of timebase scale, and the unit is s. Example: :TIM:MODE DEL :TIM:DEL:SCAL 2 :TIM:DEL:SCAL? 6. Set the scan mode as delayed scan. Set the timebase scale as 2s. Return 2.000e000.
RIGOL Command Systems TRIGger Commands Trigger system makes the meaningful waveform shown steadily. Trigger determines when the oscilloscope starts to acquire data and to display a waveform. 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.
Command Systems RIGOL 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
Command Systems RIGOL Trigger Control 1. :TRIGger:MODE Command Format: :TRIGger: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 :TRIG:MODE? 2. Set the trigger mode as edge trigger. Return EDGE.
Command Systems RIGOL Example: :TRIG:EDGE:SOUR CHAN1 :TRIG:EDGE:SOUR? 3. Set the edge trigger source as channel 1. Return CH1. :TRIGger:LEVel Command Format: :TRIGger:LEVel [,] :TRIGger:LEVel? [,] Function: The command sets the voltage level of Edge, Pulse or Video trigger. may be :EDGE, :PULSe or :VIDEO or :PATTern. range: (- 6*Scale-Offset①) ~(+6*Scale+Offset①). Scale is the current vertical scale, and the unit is V/div.
Command Systems RIGOL NORMal: Acquire waveform when trigger occurred; SINGle: Execute once trigger when all the condition are marched and stop. Returned Format: The query returns AUTO or NORMAL, SINGLE. Example: :TRIG:EDGE :SWE AUTO :TRIG:EDGE :SWE? 5. Set the trigger type as AUTO. Return AUTO. :TRIGger:SENSitivity Command Format: :TRIGger:SENSitivity :TRIGger:SENSitivity? Function: The command sets the trigger sensitivity. The range is 0.1div~1div.
Command Systems RIGOL Returned Format: The query returns DC, AC or LF. Example: :TRIG:COUP DC :TRIG:COUP? 7. Set the coupling mode as DC. Return DC. :TRIGger:HFREject Command Format: :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 :TRIG:HFRE? 8. Set HFR on. Return 1.
Command Systems RIGOL Example: :TRIG:HOLD 0.0001 :TRIG:HOLD? 9. Set the holdoff time as 100μs. Return 1.000e-004. :TRIGger:STATus? Query Format: :TRIGger:STATus? Function: The command queries the current status of the oscilloscope. 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 Format: :Trig%50 Function: The command sets the trigger level at the vertical midpoint of the signal amplitude. 11.
Command Systems RIGOL Command Format: :SINGLE Function: The command sets the trigger mode as Single trigger, means that collect a waveform when detect a trigger signal, then stop running.
Command Systems RIGOL EDGE Trigger 1. :TRIGger:EDGE:SLOPe Command Format: :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 falling edge). Returned Format: The query returns POSITIVE or NEGATIVE, ALTERNATION. Example: :TRIG:EDGE:SLOP POS :TRIG:EDGE:SLOP? 2-34 Set the trigger edge as rise edge. Return POSITIVE.
Command Systems RIGOL PULSe Trigger 1. :TRIGger:PULSe:MODE Command Format: :TRIGger:PULSe:MODE :TRIGger:PULSe:MODE? Function: The command sets the trigger condition. 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).
Command Systems RIGOL VIDEO Trigger 1. :TRIGger:VIDEO:MODE Command Format: :TRIGger:VIDEO: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 :TRIG:VIDEO:MODE? 2. Set the trigger sync mode as even field. Return EVEN FIELD.
Command Systems 3. RIGOL :TRIGger:VIDEO:STANdard Command Format: :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 :TRIG:VIDEO:STAN? 4. Set the video standard as PAL/SECAM. Return PAL/SECAM. :TRIGger:VIDEO:LINE Command Format: :TRIGger:VIDEO:LINE :TRIGger:VIDEO:LINE? Function: The command sets the number of sync specified line.
Command Systems RIGOL PATTern Trigger 1. :TRIGger:PATTern:PATTern Command Format: :TRIGger:PATTern:PATTern ,,[,,] :TRIGger:PATTern:PATTern? Function: The command sets the code pattern of signals. : Code pattern values of the channels. It is a 16 bit unsigned integer (High is 1, Low is 0). : Mask code of the channels. It is a 16 bit unsigned integer (enable is 1, X is 0) which indicates whether the mask code is 1 or 0.
Command Systems RIGOL ALTernation Trigger 1. :TRIGger:ALTernation:SOURce Command Format: :TRIGger:ALTernation:SOURce :TRIGger:ALTernation:SOURce? Function: The command selects the alternation trigger channel. The 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 :TRIG:ALT:SOUR? 2. Set the alternation channel as CH1CH2. Return CH1CH2.
Command Systems RIGOL 3. :TRIGger:ALTernation:TYPE Command Format: :TRIGger:ALTernation:TYPE [,] :TRIGger:ALTernation:TYPE? [] Function: The command sets the trigger type. The may be EDGE, PULSe or VIDEO, and the 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 :TRIG:ALT:TYPE? SOURB 4. Set the trigger type as edge trigger.
Command Systems :TRIG:ALT:TSCAL? SOURB 5. RIGOL Return 1.000e-003. :TRIGger:ALTernation:TimeOFFSet Command Format: :TRIGger:ALTernation:TimeOFFSet [,] :TRIGger:ALTernation:TimeOFFSet? [] Function: The command sets the timebase offset. In NORMAL mode, : 1s ~ memory capacitance; In STOP mode,
Command Systems RIGOL Example: :TRIG:ALT:LEV 2, SOURB :TRIG:ALT:LEV? SOURB 7. Set the trigger voltage level as 2V. Return 2.000e000. :TRIGger:ALTernation:EDGE:SLOPe Command Format: :TRIGger:ALTernation:EDGE:SLOPe [,] :TRIGger:ALTernation:EDGE:SLOPe? [] Function: The command sets the edge type of edge trigger in current channel as POSitive (rising edge) or NEGative (falling edge).
Command Systems RIGOL -LESS THAN, –EQUAL. Example: :TRIG:ALT:PULS:MODE +GRE, SOURB :TRIG:ALT:PULS:MODE? SOURB 9. Set the trigger condition. Return +GREATER THAN. :TRIGger:ALTernation:PULSe:TIME Command Format: :TRIGger:ALTernation:PULSe:TIME [,] :TRIGger:ALTernation:PULSe:TIME? [] Function: The command sets the pulse width, the value range is 20ns~10s. The may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Command Systems RIGOL Example: :TRIG:ALT:VIDEO:POL POS,SOURB :TRIG:ALT:VIDEO:POL? SOURB Set the video polarity as positive. Return POSITIVE. 11. :TRIGger:ALTernation:VIDEO:STANdard Command Format: :TRIGger:ALTernation:VIDEO:STANdard {NTSC|PALSecam}[,] :TRIGger:ALTernation:VIDEO:STANdard? [] Function: The command sets the video standard as NTSC or PAL/SECAM. The may be SOURceA or SOURceB, and the source A and B are varying with the current alternation channel.
Command Systems RIGOL Example: :TRIG:ALT:VIDEO:MODE ALLLINES,SOURB :TRIG:ALT:VIDEO:MODE? SOURB Set the sync mode as all lines. Return ALL LINES. 13. :TRIGger:ALTernation:VIDEO:LINE Command Format: :TRIGger:ALTernation:VIDEO:LINE [,] :TRIGger:ALTernation:VIDEO:LINE? [] Function: The command sets the number of sync specified line. In NTSC standard, the range is 1~525; in PAL/SECAN standard, the range is 1~625.
Command Systems RIGOL Returned Format: The query returns DC, AC or LF. Example: :TRIG:ALT:COUP DC, SOURB :TRIG:ALT:COUP? SOURB Set the coupling mode as DC. Return DC. 15. :TRIGger:ALTernation:HFREject Command Format: :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.
Command Systems RIGOL The query returns the value of holdoff time, and the unit is s. Example: :TRIG:HOLD 0.0001, SOURA :TRIG:HOLD? SOURA Set the holdoff time of source A as 100us. Return 1.000e-004. 17. :TRIGger:ALTernation:SENSitivity Command Format: :TRIGger:ALTernation:SENSitivity [,] :TRIGger:ALTernation:SENSitivity? [] Function: The command sets the trigger sensitivity of alternation trigger, the count range is 0.1div~1div.
RIGOL Command Systems 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.
Command Systems 1. RIGOL :MATH:DISPlay Command Format: :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 :MATH:DISP? Set Math waveform on. Return 1.
RIGOL Command Systems CHANnel Commands CHANnel Commands are used to set the vertical system from every channel separately. CHANnel Commands include: :CHANnel:BWLimit :CHANnel:COUPling :CHANnel:DISPlay :CHANnel:INVert :CHANnel:OFFSet :CHANnel:PROBe :CHANnel:SCALe :CHANnel:FILTer :CHANnel:MEMoryDepth? :CHANnel:VERNier :CHANnel:UNITs We will give detailed introductions for each command in the following parts.
Command Systems 1. RIGOL :CHANnel:BWLimit Command Format: :CHANnel:BWLimit {{1|ON}|{0|OFF}} :CHANnel:BWLimit? Function: The command sets bandwidth limit function ON (limit band width to 20MHz to reduce noise) or OFF (full band width). The may be 1, 2, 3 or 4. Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :CHAN2:BWL OFF :CHAN2:BWL? 2. Set BW limit function of channel 2 off. Return 0.
Command Systems RIGOL Command Format: :CHANnel:DISPlay {{1|ON}|{0|OFF}} :CHANnel:DISPlay? Function: The command sets the channel ON or OFF. The may be 1, 2, 3 or 4. Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Examples: :CHAN2:DISP ON :CHAN2:DISP? 4. Set channel 2 on. Return 1.
Command Systems RIGOL Function: The command sets the vertical offset. The may be 1, 2, 3 or 4. Scale≥250mV, : -40V~ +40V; Scale<250mV, : -2V ~ +2V. Returned Format: The query returns the value of offset, and the unit is V. Example: :CHAN2:OFFS 20 :CHAN2:OFFS? 6. Set the vertical offset of channel 2 as 20V. Return 2.000e001. :CHANnel:PROBe Command Format: :CHANnel:PROBe :CHANnel:PROBe? Function: The command sets the attenuation factor of probe.
Command Systems RIGOL The command sets the vertical scale for magnifying waveform. The may be 1, 2, 3 or 4. Probe 0.001X, : 2μV ~ 10mV; Probe 0.01X, : 20μV ~ 100mV; Probe 0.
Command Systems :CHAN2:FILT OFF :CHAN2:FILT? 9. RIGOL Set the digital filter of channel 2 off. Return 0. :CHANnel:MEMoryDepth? Command Format: :CHANnel: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.
Command Systems RIGOL Example: :CHAN2:VERN ON :CHAN2:VERN? Set the fine adjustment function of channel 2 on. Return 1. 11. :CHANnel:UNITs Command Format: :CHANnel:UNITs :CHANnel:UNITs? Function: The command sets the unit as VOLTs (V), AMPeres (A), WATTs (W) or UNKNown. The may be 1, 2, 3 or 4. Returned Format: The query returns VOLTs or AMPeres, WATTs, UNKNown. Example: :CHAN1:UNIT VOLT :CHAN1:UNIT? 2-56 Set the unit of channel 1 as V. Return VOLTs.
Command Systems RIGOL MEASure Commands MEASure Commands are used for the fundamental measurement operations, and the measurement results are expressed by scientific notation.
Command Systems RIGOL 1. :MEASure:CLEar Command Format: :MEASure:CLEar Function: The command clears the current measurement parameters. 2. :MEASure:VPP? Command Format: :MEASure:VPP? [] Function: The command measures the Peak-Peak value of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. NOTE: “<>” in 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.
Command Systems 4. RIGOL :MEASure:VMIN? Command Format: :MEASure:VMIN? [] Function: The command measures the minimum of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as -2.640e000, and the unit is V. 5. :MEASure:VAMPlitude? Command Format: :MEASure:VAMPlitude? [] Function: The command measures the amplitude of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Command Systems RIGOL 7. :MEASure:VBASe? Command Format: :MEASure:VBASe? [] Function: The command measures the base value of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as -2.640e000, and the unit is V. 8. :MEASure:VAVerage? Command Format: :MEASure:VAVerage? [] Function: The command measures the average value of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Command Systems RIGOL 10. :MEASure:OVERshoot? Command Format: :MEASure:OVERshoot? [] Function: The command measures the overshoot value of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as 8.000e003, and the unit is V. 11. :MEASure:PREShoot? Command Format: :MEASure:PREShoot? [] Function: The command measures the preshoot value of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Command Systems RIGOL 13. :MEASure:RISetime? Command Format: :MEASure:RISetime? [] Function: The command measures the rise time of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as 4.000e-005, and the unit is s. 14. :MEASure:FALLtime? Command Format: :MEASure:FALLtime? [] Function: The command measures the fall time of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Command Systems RIGOL 16. :MEASure:PWIDth? Command Format: :MEASure:PWIDth? [] Function: The command measures the positive pulse width of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as 5.000e-004, and the unit is s. 17. :MEASure:NWIDth? Command Format: :MEASure:NWIDth? [] Function: The command measures the negative pulse width of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
Command Systems RIGOL 19. :MEASure:NDUTycycle? Command Format: :MEASure:NDUTycycle? [] Function: The command measures the negative duty cycle of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as 5.000e001, and the unit is %. 20. :MEASure:PDELay? Command Format: :MEASure:PDELay? [,] Function: The command measures the delay between and relative to the rising edge.
Command Systems RIGOL 22. :MEASure:PPHAse? Command Format: :MEASure:PPHAse? [,] Function: The command measures the phase difference between and relative to the rising edge. The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns as <-1.000 e-004, and the unit is s. 23.
Command Systems RIGOL Example: :MEAS:TOT ON :MEAS:TOT? Set the total measurement function on. Return 1. 25. :MEASure:SOURce Command Format: :MEASure:SOURce :MEASure:SOURce? Functions: The command selects the measurement channel. The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns CH1 or CH2, CH3, CH4. Example: :MEAS:SOUR CHAN1 :MEAS:SOUR? Measure the signal from CH1. Return CH1. 26.
Command Systems :MEAS:DELASOUR? RIGOL Return CH1, CH2. 27. :MEASure:PHAseSOURce Command Format: :MEASure:PHAseSOURce , :MEASure:PHAseSOURce? Functions: The command selects the channel for measuring the phase delay. The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Returned Format: The query returns CH1, CH2 or CH1, CH3, CH1, CH4, CH2, CH3, CH2, CH4, CH3, CH4. Example: :MEAS:PHASOUR CHAN1 CHAN2 Measure the phase delay. :MEAS:PHASOUR? Return CH1, CH2. 28.
RIGOL Command Systems 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.
Command Systems RIGOL WAVeform Commands WAVeform Commands are used to read the data and parameters of waveform 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.
Command Systems RIGOL 1. :WAVeform:FORMat Command Format: :WAVeform:FORMat :WAVeform:FORMat? Function: The command sets the format of waveform data. The may be WORD, BYTE or ASCii. Difference of WORD, BYTE and ASCii: ASCii: Returns ASCII values when data ware transformed into character. Eg: Waveform data is 1000, returns ’1’,’0’,’0’,’0’, a point correspond many bytes. BYTE and WORD: They will returns 8 bit and 16 bit values to use datum.
Command Systems RIGOL 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 may be contained in data returned under the circumstances.
Command Systems RIGOL For details about storage format of waveform points, please refer to Page 2-76: Peak Detect 4. :WAVeform:POINts:MODE Command Format: :WAVeform:POINts:MODE :WAVeform:POINts:MODE? Function: This command sets the mode of waveform points. 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).
Command Systems 5. RIGOL :WAVeform:SOURce Command Format: :WAVeform:SOURce :WAVeform:SOURce? Function: The command sets the source of waveform data which is going to check. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Returned Format: The query returns Channel1 or Channel2, Channel3, Channel4, MATH. Example: :WAV:SOUR CHAN2 :WAV:SOUR? 6. Set the data source as channel 2. Return Channel2.
Command Systems RIGOL 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 Format: :WAVeform:YINCrement? [] Function: This command queries the Y unit voltage of the specified 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.
Command Systems 9. RIGOL :WAVeform:XINCrement? Command Format: :WAVeform:XINCrement? [] Function: The command queries the interval time between two points of the specified source. The 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.
Command Systems RIGOL 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 Format: :WAVeform:YREFrence? Function: The command queries the vertical reference axis. YREFrence is fixed at the verticel middle of the screen (100). Returned Format: The query returns the value of reference axis. Example: :WAV:YREF? 2-76 Return 100.
Command Systems RIGOL 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.
Command Systems RIGOL contains two waveform 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.
Command Systems RIGOL KEY Commands KEY Commands are used to control the keys and knobs on the operation panel of DS1000B.
Command Systems RIGOL :KEY:FUNC_Z :KEY:FUNC_INC :KEY:FUNC_DEC :KEY:TRIG_LEVEL_INC :KEY:TRIG_LEVEL_DEC :KEY:TRIG_LEVEL_Z We will give detailed introductions for each command in the following parts.
Command Systems 1. RIGOL :KEY:LOCK Command Format: :KEY:LOCK { ENABle | DISable } :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 :KEY:LOCK? 2. Enable remote control on the keys of front panel . Return ENABLE. :KEY:STORage Command Format: :KEY:STORage Function: The command sets storage menu on or off. 3.
Command Systems RIGOL Function: The command sets measurement function and its menu on or off. 5. :KEY:CURSor Command Format: :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 Format: :KEY:ACQuire Function: The command sets acquire menu on or off. 7. :KEY:DISPlay Command Format: :KEY:DISPLAY Function: The command sets display menu on or off. 8.
Command Systems 9. RIGOL :KEY:QUICKMEASure Command Format: :KEY:QUICKMEASure Function: The command sets quick-measurement function on or off. And it could be set in Measurement menu. 10. :KEY:QUICKPRINt Command Format: :KEY:QUICKPRINt Function: The command prints and saves the screen. 11. :KEY:AUTO Command Format: :KEY:AUTO Function: The command sets oscilloscope automatically to display the waveform to be optimal condition. 12.
Command Systems RIGOL Command Format: :KEY:SINGLe Function: The command sets the trigger mode as Single trigger. 14. :KEY:MNUTIME Command Format: :KEY:MNUTIME Function: The command sets horizontal system and its menu on or off. 15. :KEY:MNUoff Command Format: :KEY:MNUoff Function: The command sets menu display function on or off. 16. :KEY:F1 Command Format: :KEY:F1 Function: The command selects the first option in current menu.
Command Systems RIGOL Function: The command selects the second 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. 18. :KEY:F3 Command Format: :KEY:F3 Function: The command selects the third 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. 19.
Command Systems RIGOL 21. :KEY:CH1 Command Format: :KEY:CH1 Function: The command sets channel 1 and its menu on or off. 22. :KEY:CH2 Command Format: :KEY:CH2 Function: The command sets channel 2 and its menu on or off. 23. :KEY:CH3 Command Format: :KEY:CH3 Function: The command sets channel 3 and its menu on or off. 24. :KEY:CH4 Command Format: :KEY:CH4 Function: The command sets channel 4 and its menu on or off. 25.
Command Systems RIGOL Function: The command sets Math function and its menu on or off. 26. :KEY:REF Command Format: :KEY:REF Function: The command sets reference waveform function and its menu on or off. 27. :KEY:TrigMODE Command Format: :KEY:TrigMODE Function: The command shifts the trigger mode among AUTO, NORMAL and SINGLE. 28. :KEY:TrigMENU Command Format: :KEY:TrigMENU Function: The command sets trigger menu on or off. 29.
Command Systems RIGOL 30. :KEY:Trig%50 Command Format: :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 Format: :KEY:FUNC_Z Function: The command selects the multifunction knob. 32. :KEY:FUNC_INC Command Format: :KEY:FUNC_INC Function: The command increases the offset of multifunction knob. 33. :KEY:FUNC_DEC Command Format: :KEY:FUNC_DEC Function: The command decreases the offset of multifunction knob. 34.
Command Systems RIGOL :KEY:CH1_VOLT_INC Function: The command decreases the vertical scale of channel 1. 35. :KEY:CH1_VOLT_DEC Command Format: :KEY:CH1_VOLT_DEC Function: The command increases the vertical scale of channel 1. 36. :KEY:CH1_VOLT_Z Command Format: :KEY:CH1_VOLT_Z Function: The command sets the adjustment mode of vertical scale of channel 1 as Fine or Coarse. The vertical scale steps by 1-2-5 in Coarse; and by equality in Fine. 37.
Command Systems RIGOL The command decreases the vertical offset of channel 1 evenly. 39. :KEY:CH1_POS_Z Command Format: :KEY: CH1_POS_Z Function: The command adjusts the vertical offset of channel 1 to zero. 40. :KEY:CH2_VOLT_INC Command Format: :KEY:CH2_VOLT_INC Function: The command decreases the vertical scale of channel 2. 41. :KEY:CH2_VOLT_DEC Command Format: :KEY:CH2_VOLT_DEC Function: The command increases the vertical scale of channel 2. 42.
Command Systems RIGOL 43. :KEY:CH2_POS_INC Command Format: :KEY:CH2_POS_INC Function: The command increases the vertical position of channel 2 evenly. 44. :KEY:CH2_POS_DEC Command Format: :KEY:CH2_POS_DEC Function: The command decreases the vertical position of channel 2 evenly. 45. :KEY:CH2_POS_Z Command Format: :KEY:CH2_POS_Z Function: The command adjusts the vertical offset of channel 2 to zero. 46.
Command Systems RIGOL Function: The command increases the vertical scale of channel 3. 48. :KEY:CH3_VOLT_Z Command Format: :KEY:CH3_VOLT_Z Function: The command sets the adjustment mode of vertical scaling of channel 3 as Fine or Coarse. The vertical scale steps by 1-2-5 in Coarse; and by equality in Fine. 49. :KEY:CH3_POS_INC Command Format: :KEY:CH3_POS_INC Function: The command increases the vertical offset of channel 3 evenly. 50.
Command Systems RIGOL 52. :KEY:CH4_VOLT_INC Command Format: :KEY:CH4_VOLT_INC Function: The command decreases the vertical scale of channel 4. 53. :KEY:CH4_VOLT_DEC Command Format: :KEY:CH4_VOLT_DEC Function: The command increases the vertical scale of channel 4. 54. :KEY:CH4_VLOT_Z Command Format: :KEY:CH4_VOLT_Z Function: The command sets the adjustment mode of vertical scale of channel 4 as Fine or Coarse. The vertical scale steps by 1-2-5 in Coarse; and by equality in Fine. 55.
Command Systems RIGOL :KEY:CH4_POS_DEC Function: The command decreases the vertical offset of channel 4 evenly. 57. :KEY:CH4_POS_Z Command Format: :KEY:CH4_POS_Z Function: The command adjusts the vertical offset of channel 4 to zero. 58. :KEY:TIME_INC Command Format: :KEY:TIME_INC Function: The command decreases the time base by 1-2-5 step. 59. :KEY:TIME_DEC Command Format: :KEY:TIME_DEC Function: The command increases time base by 1-2-5 step. 60.
Command Systems RIGOL 61. :KEY:TIME_POS_INC Command Format: :KEY:TIME_POS_INC Function: The command decreases the trigger offset to the horizontal zero point evenly. 62. :KEY:TIME_POS_DEC Command Format: :KEY:TIME_POS_DEC Function: The command increases the trigger offset to the horizontal zero point evenly. 63. :KEY:TIME_POS_Z Command Format: :KEY:TIME_POS_Z Function: The command adjusts the trigger offset to the horizontal zero point evenly. 64.
Command Systems RIGOL Function: The command decreases the trigger level evenly. 66. :KEY:TRIG_LEVEL_Z Command Format: :KEY:TRIG_LEVEL_Z Function: The command adjusts the trigger level to zero.
Command Systems RIGOL SAVe/RECall Commands SAVe/RECall Commands are used to save and recall the waveform data and image on the screen. SAVe/RECall Commands include: :SAVERECALL:TYPE :SAVERECALL:LOCation :SAVERECALL:LOAD :SAVERECALL:SAVe :SAVe:IMAGe:STARt :SAVe:IMAGe:FACTors :SAVe:IMAGe:FORMat :SAVe:WAVeform:STARt :SAVe:SETup:STARt :SAVe:CSV:STARt :RECall:WAVeform:STARt :RECall:SETup:STARt We will give detailed introductions for each command in the following parts.
Command Systems RIGOL 1. :SAVERECALL:TYPE Command Format: :SAVERECALL:TYPE :SAVERECALL:TYPE? Function: The command sets the data type for storage. The may be WAVeform (waveform data) or SETups (data settings). Returned Format: The query returns WAVEFORMS or SETUPS. Example: :SAVERECALL:TYPE WAV :SAVERECALL:TYPE? 2. Set the storage type as waveform data. Return WAVEFORM.
Command Systems RIGOL Function: The command recalls the waveform or setup data from internal flash according to storage type. 4. :SAVERECALL:SAVe Command Format: :SAVERECALL:SAVE Function: The command saves the waveform or setup to internal flash according to storage type. 5. :SAVe:IMAGe:STARt Command Format: :SAVE:IMAGe:STARt Function: The command saves the image.
Command Systems RIGOL Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :SAVE:IMAG:FACT ON :SAVE:IMAG:FACT? 7. Save the system parameters. Return 1. :SAVe:IMAGe:FORMat Command Format: :SAVE:IMAGe:FORMat :SAVE:IMAGe:FORMat? Function: The command sets the format of saved image. The may be 24bit real color (BMP|BMP24bit), 8bit bitmap (BMP8bit) or PNG (PNG). Returned Format: The query returns BMP24bit, BMP8bit or PNG.
Command Systems 9. RIGOL :SAVe:SETup:STARt Command Format: :SAVE:SETup:STARt Function: The command starts the saving setup function. If the waveforms are in internal flash, the is composed of integers among 0~9; if in external storage medium, the will be the file name, which is composed of double quotation marks and ASCII characters, also, the file name length within the double quotation marks must less than 26 characters.
RIGOL Command Systems length within the double quotation marks must less than 26 characters. NOTE: The system will add the file format suffix with 4 characters automatically, which are not included in 26 characters. 12. :RECall:SETup:STARt Command Format: :RECAll:SETup:STARt Function: The command sets the recalling setup function on.
Command Systems RIGOL MASK Commands MASK Commands are used to create and modify the rules for pass/fail test function. MASK Commands include: :MASK:CREate :MASK:ENABle :MASK:X :MASK:Y :MASK:SOURce :MASK:OPERate :MASK:OUTPut :MASK:STOPonoutput :MASK:SAVE :MASK:LOAD :MASK:DOWNload :MASK:Upload :MASK:MSG We will give detailed introductions for each command in the following parts.
Command Systems RIGOL 1. :MASK:CREate Command Format: :MASK:CREate Function: The command creates the rule of passing test. 2. :MASK:ENABle Command Format: :MASK:ENABle {{1|ON}|{0|OFF}} :MASK:ENABle? Function: The command sets the state of passing test as ON or OFF. Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :MASK:ENAB ON :MASK:ENAB? 3. Set passing test on. Return 1.
Command Systems :MASK:X 1 :MASK:X? 4. RIGOL Set the X direction rule as 1div. Return 1.000e000. :MASK:Y Command Format: :MASK:Y :MASK:Y? Function: The command sets the rule of testing Y direction. The is 0.04div~4div. Returned Format: The query returns the y value, and the unit is div. Example: :MASK:Y 1 :MASK:Y? 5. Set the Y direction rule as 1div. Return 1.000e000. :MASK:SOURce Command Format: :MASK:SOURce :MASK:SOURce? Function: The command sets the passing test source.
Command Systems RIGOL 6. :MASK:OPERate Command Format: :MASK:OPERate :MASK:OPERate? Function: The command sets the function of passing test run or stop. The may be RUN or STOP. Returned Format: The query returns RUN or STOP. Example: :MASK:OPER RUN :MASK:OPER? 7. Set the operation of passing test run. Return RUN. :MASK:OUTPut Command Format: :MASK:OUTPut
Command Systems RIGOL Command Format: :MASK:STOPonoutput {{1|ON}|{0|OFF}} :MASK:STOPonoutput? Function: The command sets the output stop mode of passing test ON or OFF. Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :MASK:STOP ON :MASK:STOP? 9. Set the output stop mode of passing test on. Return 1. :MASK:SAVE Command Format: :MASK:SAVE Function: The command saves the rule of passing test. 10.
Command Systems RIGOL The command download the test rule to the external storage equipment, and the is the file name, which is composed of double quotation marks and ASCII characters, also, the file name length within the double quotation marks must less than 26 characters. NOTE: The system will add the file format suffix with 4 characters automatically, which are not included in 26 characters. 12.
Command Systems RIGOL CURSor Commands CURSor Commands are used to set cursor parameters to measure manually and automatically and track the waveform data. CURSor Commands include: :CURSor:MODE :CURSor:MANUal:TYPE :CURSor:MANUal:SOURce :CURSor:MANUal:CURAX :CURSor:MANUal:CURAY :CURSor:MANUal:CURBX :CURSor:MANUal:CURBY :CURSor:TRACk:SOURceA :CURSor:TRACk:SOURceB :CURSor:TRACk:CURA :CURSor:TRACk:CURB We will give detailed introductions for each command in the following parts.
Command Systems RIGOL 1. :CURSor:MODE Command Format: :CURSor:MODE :CURSor:MODE? Function: The command sets the cursor mode. The may be CLOSe, MANUal, TRACk or MEASure (measure automatically). Returned Format: The query returns CLOSE or MANUAL, TRACK, MEASURE. Example: :CURS:MODE TRAC :CURS:MODE? 2. Set the cursor mode as track. Return TRACK. :CURSor:MANUal:TYPE Command Format :CURSor:MANUal:TYPE :CURSor:MANUal:TYPE? Function: The command sets the cursor type of manual cursor.
Command Systems RIGOL :CURSor:MANUal:SOURce :CURSor:MANUal:SOURce? Function: The command sets the cursor source of manual cursor. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Returned Format: The query returns Channel1 or Channel2, Channel3, Channel4, Math. Example: :CURS:MANU:SOUR CHAN1 :CURS:MANU:SOUR? 4. Set the cursor source of manual cursor. Return Channel1.
Command Systems RIGOL Function: The command sets the AY position of manual cursor. The range is 4~194. Returned Format: The query returns the value of AY position. Example: :CURS:MANU:CURAY 100 :CURS:MANU:CURAY? 6. Set the AY position of manual cursor as 100. Return 100. :CURSor:MANUal:CURBX Command Format: :CURSor:MANUal:CURBX :CURSor:MANUal:CURBX? Function: The command sets the BX position of manual cursor. The range is 4~297.
Command Systems RIGOL Query Format: :CURSor:MANUal:CURBY? Returned Format: The query returns the value of BY position. Example: :CURS:MANU:CURBY 100 :CURS:MANU:CURBY? 8. Set the BY position of manual cursor as 100. Return 100. :CURSor:TRACk:SOURceA Command Format: :CURSor:TRACk:SOURceA :CURSor:TRACk:SOURceA? Function: The command sets the signal source A of track cursor. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4, MATH or NONE.
Command Systems RIGOL Returned Format: The query returns Channel1 or Channel2, Channel3, Channel4, Math, None. Example: :CURS:TRAC:SOURB CHAN1 :CURS:TRAC:SOURB? Set the signal source B of track cursor. Return Channel1. 10. :CURSor:TRACk:CURA Command Format: :CURSor:TRACk:CURA :CURSor:TRACk:CURA? Function: The command sets the position of track cursor A. The range is 4~297. Returned Format: The query returns the position of cursor A.
Command Systems :CURS:TRAC:CURB? Programming Guide for DS1000B Series RIGOL Return 100.
RIGOL Command Systems Other Commands The following commands are used to set some additional functions: counter, beeper, system language, real-time clock and the state of AUTO key. Other Commands include: :COUNter:ENABle :BEEP:ENABle :BEEP:ACTion :INFO:LANGuage :RTC :AUToscale:DISable :AUToscale:ENable :AUToscale? We will give detailed introductions for each command in the following parts.
Command Systems 1. RIGOL :COUNter:ENABle Command Format: :COUNter:ENABle {{1|ON}|{0|OFF}} :COUNter:ENABle? Function: The command sets the counter ON or OFF. Returned Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :COUN:ENAB ON :COUN:ENAB? 2. Set the counter on. Return 1. :BEEP:ENABle Command Format: :BEEP:ENABle {{1|ON}|{0|OFF}} :BEEP:ENABle? Function: The command sets the system beeper ON or OFF.
Command Systems RIGOL Function: The command tests the system beeper. 4. :INFO:LANGuage Command Format: :INFO:LANGuage :INFO:LANGuage? Function: The command sets the system language. The may be SIMPlifiedchinese, TRADitionalchinese, KORean, JAPanese, ENGLish, FRENch, GERMan, ITALian, RUSSian, PORTuguese or SPANish. Returned Format: The query returns Simplified Chinese or Traditional Chinese, Korean, Japanese, English, German, French, Italian, Russian, Portuguese, Spanish.
Command Systems RIGOL Returned Format: The query returns the Year, the Month, the day, the hour, the minutes, and the second. Example: :RTC 2008,8,8,20,08,08 :RTC? 6. Set the system time as 08, 08, 08, 08, 08, 08pm. Return 2008, 8, 8, 20, 8, 8. :AUToscale:DISable Command Format: :AUToscale:DISable Function: The command disables the AUTO key, and forbids users setting automatically. 7.
Programming Examples RIGOL Chapter 3 Programming Examples This chapter lists some programming examples in the development environments of Visual C++ 6.0, Visual Basic 6.0 and LabVIEW 8.6. All the examples are based on VISA (Virtual Instrument Software Architecture). VISA is an API (Application Programming Interface) used for controlling instruments. It is convenient for users to develop testing applications which are independent of the types of instrument and interface.
Programming Examples RIGOL Prepare for Programming First affirm your computer has installed VISA library of NI (see http://www.ni.com). Here we install it in the default path: C:\Program Files\IVI Foundation\VISA. In this text, we use USB interface to achieve the communication between the oscilloscope and PC. See the figure below. 40 US C Digital Oscilloscope 100-127V, 45-440Hz 100-240V, 45-65Hz LINE60W MAX Fuse: 250V, T2A RIGOL Technologies, Inc.
Programming Examples RIGOL Program in Visual C++ 6.0 Open Visual C++ 6.0, take the following steps: 1. 2. Create a project based on MFC. Choose Project → Settings → C/C++; select “Code Generation” in Category and “Debug Multithreaded DLL” in Use run-time library; click OK. 3. Choose Project→ Settings → Link, add the file “visa32.lib” manually in Object/library modules.
Programming Examples RIGOL 4. Choose Tools → Options → Directories; select “Include files” in Show directories for, and then dblclick the blank in Directories to add the path of “Include”: C:\Program Files\IVI Foundation\VISA\WinNT\include. Select “Library files” in Show directories for, and then dblclick the blank in Directories to add the path of “Lib”: C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc. The blank Note: At present, VISA library has been added successfully. 5.
Programming Examples RIGOL 6. Modify the properties of the controls. 1) Name the Text to be “Command”. 2) Choose Data in the property of Com box, input three commands manually: *IDN? *OPC? :ACQuire:TYPE? 3) Choose General in the property of Edit and select Disable. 4) Modify the name of Button such as: Send and Read. 7. Respectively add two variables m_combox and m_receive for the controls of Com box and Edit.
Programming Examples RIGOL 8. Add the codes. Dblclick the Button, enter the programming environment. First of all, declare “#include
Programming Examples RIGOL // send the receiving commands m_combox.GetLBText(m_combox.GetCurSel(),strTemp); strTemp = strTemp + "\n"; stringTemp = (char *)(LPCTSTR)strTemp; viPrintf (vi,stringTemp); // read the result viScanf (vi, "%t\n", &buf); // display the results UpdateData (TRUE); m_receive = buf; UpdateData (FALSE); viClose (vi); viClose (defaultRM); 9. Save, build and run the project, you will get an EXE file.
Programming Examples RIGOL Program in Visual Basic 6.0 Open Visual Basic 6.0, take the following steps: 1. Create a Standard EXE project. 2. Choose Project→Add Module→Existing; find the “visa.bas” file in the filefolder of include under the path of NI-VISA and add; 3. Add four Command Buttons and Lables to the demo, each button denotes each channel (CH1~CH4).
Programming Examples 5. RIGOL Dblclick CH1 button to enter the programming environment, add the following codes to achieve the control to it. (for CH2, CH3 and CH4, the methods are similar) Dim defrm As Long Dim vi As Long Dim strRes As String * 200 Dim list As Long Dim nmatches As Long Dim matches As String * 200 ' reserve to acquire the equipment ID.
RIGOL Programming Examples Program in LabVIEW 8.6 Open LabVIEW 8.6, take the following steps: 1. Open Block Diagram; choose Instrument I/O→VISA; then separately add four functions: “VISA Open”, “VISA Read”, “VISA Write” and “VISA Close”. See the figure below. 2. Move the mouse to the item of “VISA resource name” on the control of “VISA Open”; right-click the mouse to choose Create→Control. See the figure below.
Programming Examples RIGOL 3. Separately connect “VISA resource name” with “VISA resource name out” and “error out” with “error in” of all the functions. See the figure below. 4. Add a textbox written with “:WAV:FORM\sBYTE\n” to “write buffer” on one of the “VISA Write” control, and “:WAV:DATA?\n” on the other one. The former is to set the format of waveform reading to be “BYTE”, while the latter reads the waveform data shown on the screen. 5.
RIGOL Programming Examples String/Array/Path and select “String To Byte Array”; then, use this function to connect “read buffer” on “VISA Read” function with the Waveform Graph. See the figure below. 7. Add an Event Structure and a While Loop as well as two buttons, one of the buttons is used to control the start of waveform fetching, and the other one is to stop capturing. See the figure below. 8.
Programming Examples RIGOL After you set the “Start” event, see the result below. 9.
RIGOL Programming Examples the “Stop” button to While and exit. 10. Change the input tunnel of VISA resource name and errors into “Shift Register” to finish creating program. 11. Adjust the style of Front Panel and click “Fetch Waveform” to get following interface.
Programming Examples Programming Guide for DS1000B Series RIGOL 3-15
Appendix: Command Quick Reference A-Z RIGOL Appendix: Command Quick Reference A-Z *IDN? 2-3 :CURSor:MANUal:SOURce 2-110 *RST 2-3 :CURSor:MANUal:CURAX 2-111 *LRN? 2-3 :CURSor:MANUal:CURAY *OPC? 2-4 :CURSor:MANUal:CURBX 2-112 2-111 :CURSor:MANUal:CURBY 2-112 A :CURSor:TRACk:SOURceA 2-113 :ACQuire:TYPE 2-13 :CURSor:TRACk:SOURceB 2-113 :ACQuire:MODE 2-13 :CURSor:TRACk:CURA 2-114 :ACQuire:AVERages 2-13 :CURSor:TRACk:CURB 2-114 :ACQuire:SRATe? 2-14 :AUTO 2-6 D :AUToscale:DISable 2-119 :DISP
Appendix: Command Quick Reference A-Z RIGOL :KEY:ACQuire 2-82 :KEY:CH2_POS_DEC 2-91 :KEY:DISPlay 2-82 :KEY:CH2_POS_Z 2-91 :KEY:HELP 2-82 :KEY:CH3_VOLT_INC 2-91 :KEY:QUICKMEASure 2-83 :KEY:CH3_VOLT_DEC 2-91 :KEY:QUICKPRINt 2-83 :KEY:CH3_VOLT_Z 2-92 :KEY:AUTO 2-83 :KEY:CH3_POS_INC 2-92 :KEY:RUN 2-83 :KEY:CH3_POS_DEC 2-92 :KEY:SINGLe 2-83 :KEY:CH3_POS_Z 2-92 :KEY:MNUTIME 2-84 :KEY:CH4_VOLT_INC 2-93 :KEY:MNUoff 2-84 :KEY:CH4_VOLT_DEC 2-93 :KEY:F1 2-84 :KEY:CH4_VLOT_Z 2-93 :KEY:F2 2-84 :K
Appendix: Command Quick Reference A-Z RIGOL :MATH:DISPlay 2-49 S :MEASure:CLEar 2-58 :SAVERECALL:TYPE 2-98 :MEASure:VPP? 2-58 :SAVERECALL:LOCation 2-98 :MEASure:VMAX? 2-58 :SAVERECALL:LOAD 2-98 :MEASure:VMIN? 2-59 :SAVERECALL:SAVe 2-99 :MEASure:VAMPlitude? 2-59 :SAVe:IMAGe:STARt 2-99 :MEASure:VTOP? 2-59 :SAVe:IMAGe:FACTors 2-99 :MEASure:VBASe? 2-60 :SAVe:IMAGe:FORMat 2-100 :MEASure:VAVerage? 2-60 :SAVe:WAVeform:STARt 2-100 :MEASure:VRMS? 2-60 :SAVe:SETup:STARt 2-101 :MEASure:OVERshoot?
Appendix: Command Quick Reference A-Z RIGOL :TRIGger:VIDEO:STANdard 2-37 :TRIGger:ALTernation:COUPling 2-45 :TRIGger:VIDEO:LINE 2-37 :TRIGger:ALTernation:HFREject 2-46 :TRIGger:PATTern:PATTern 2-38 :TRIGger:ALTernation:HOLDoff 2-46 :TRIGger:ALTernation:SOURce 2-39 :TRIGger:ALTernation:SENSitivity 2-47 :TRIGger:ALTernation:CURRentSOURce 2-39 W :TRIGger:ALTernation:TYPE 2-40 :WAVeform:FORMat 2-70 :TRIGger:ALTernation:TimeSCALe 2-40 :WAVeform:DATA? 2-70 :TRIGger:ALTernation:TimeOFFSet 2-41 :WAV