Programming Guide RIGOL Publication Number: PGA04105-1110 Oct. 2008 DS1000B Series Digital Oscilloscope DS1204B/DS1104B/DS1064B © 2008 RIGOL Technologies, Inc.
RIGOL © 2008 RIGOL Technologies, Inc. All Rights Reserved RIGOL products are protected by patent law in and outside of P.R. China. Information in this publication replaces all previously corresponding material. RIGOL Technologies, Inc. reserves the right to modify or change part of or all the specifications and pricing policies at company’s sole decision. NOTE: RIGOL is registered trademark of RIGOL Technologies, Inc.
RIGOL Content Chapter 1 Programming Introduction................................................... 1-1 Communication Ports ................................................................................. 1-2 Symbol Instruction .................................................................................... 1-3 Command Abbreviation.............................................................................. 1-4 Chapter 2 DS1000B Command Systems ...............................................
RIGOL Chapter 1 Programming Introduction This book provides guidance to the remote control programming of the DS1000B series digital oscilloscopes. It includes the necessary conceptual information, the command structure for the subsystems and the application cases. Users can carry out the remote control to the oscilloscope or do the further development according to this manual. NOTE: The Programming Guide is applicable to the firmware version of the Oscilloscope above 00.02.04.
RIGOL Communication Ports Computers can communicate with the oscilloscope by sending and receiving messages over USB and LAN interface. Commands in the form of ASCII character strings are embedded in your computer to make control easier. The input commands of the host language are used to read responses from the oscilloscope.
RIGOL Symbol Instruction 1. Command Sperator : Commands usually begin with a colon (:), in special case, such as IEEE commands will begin with (*), it represents operations the oscilloscope will take. Queries are formed by adding a question mark (?) at the end of the commands. The return values of the queries are mostly expressed in scientific notation. Forms of commands and inquiries have different programme datum usually. But some others are not need to input the programme datum. 2.
RIGOL Command Abbreviation Owing to some of the commands are too long to memory and spell, the commands system of DS1000B especially setup the Commands Abbreviation in order to reduce your workload and the difficulty to memory. The abbreviation rule is all the small letters in the command header are omitted.
RIGOL Chapter 2 DS1000B Command Systems DS1000B Commands System includes the following command subsystems: System Commands Keyboard Commands Measurement Commands Acquire Commands Display Commands Vertical Commands Horizontal Commands Trigger Commands Math Commands Waveform Commands Utility Commands Storage Commands Mask Commands Cursor Commands Other Commands Programming Guide for DS1000B Series 2-1
RIGOL System Commands System Commands are used for the basic operations of an oscilloscope. They can not only be used as an individual command but also in conjunction with other commands to form instructions.
RIGOL 1. *IDN? Command Format: *IDN? Function: The command queries the company name, the oscilloscope model, the product serial and the software version. Return Format: Company name,, , , . Example: *IDN? Return Rigol Technologies, DS1204B, DS10000000, 00.02.04. 2. :RUN Command Format: :RUN Function: Execute this command, the oscilloscope will start waveform sampling working ,if to stop working, execute :STOP command again. 3.
RIGOL Function: The command makes the oscilloscope tests all input waveforms and set the waveforms automatically to get the optimum conditions to display. 5. :FORCetrig Command Format: :FORCetrig Function: The command wil produce a trigger signal to force the oscilloscope trigger and to display a waveform when there is no suitable trigger condition. It is mainly applicable to the “Normal” and “Single” trigger modes. 6.
RIGOL 9. *OPC? Command Format: *OPC? Function: The command queries whether the command operation has been completed. Return Format: The query returns 0 or 1. 1 means operation has been completed, 0 means not. 10. :SINGLE 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.
RIGOL Keyboard Commands Keyboard Commands are used to control the keys and knobs on the operation panel of DS1000B.
RIGOL :KEY:TIME_POS_INC :KEY:TRIG_LEVEL_INC :KEY:TIME_POS_DEC :KEY:TRIG_LEVEL_DEC :KEY:TIME_POS_Z :KEY:TRIG_LEVEL_Z Programming Guide for DS1000B Series 2-7
RIGOL 1. :KEY:LOCK Command Format: :KEY:LOCK□{ ENABle | DISable } Function: The command enables and disables the function of Remote control on the keys of front panel. Query Format: :KEY:LOCK? Return Format: The query returns ENABLE or DISABLE. 2. Example: :KEY:LOCK□ENABle Enable remote control on the keys of front panel . :KEY:LOCK? Return ENABLE. :KEY:RUN Command Format: :KEY:RUN Function: This command controls the running state of the oscilloscope.
RIGOL Function: The command sets the trigger mode as Single trigger. 5. :KEY:CH1 Command Format: :KEY:CH1 Function: The command sets channel 1 and its menu on or off. 6. :KEY:CH2 Command Format: :KEY:CH2 Function: The command sets channel 2 and its menu on or off. 7. :KEY:CH3 Command Format: :KEY:CH3 Function: The command sets channel 3 and its menu on or off. 8. :KEY:CH4 Command Format: :KEY:CH4 Function: The command sets channel 4 and its menu on or off. 9.
RIGOL Function: The command sets Math function amd its menu on or off. 10. :KEY:REF Command Format: :KEY:REF Function: The command sets reference waveform function and its menu on or off. 11. :KEY:F1 Command Format: :KEY:F1 Function: The command selects the first option in current menu. If the subordinate menu existing and its options are available, then these options could be selected circularly when send repeatly the command. 12.
RIGOL 14. :KEY:F4 Command Format: :KEY:F4 Function: The command selects the fourth 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 15. :KEY:F5 Command Format: :KEY:F5 Function: The command selects the fifth 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 16.
RIGOL Function: The command sets cursor measurement function and its menu on or off. The cursor mode can be set by sending the command continually. 19. :KEY:ACQuire Command Format: :KEY:ACQuire Function: The command sets acquire menu on or off. 20. :KEY:DISPlay Command Format: :KEY:DISPLAY Function: The command sets display menu on or off. 21. :KEY:STORage Command Format: :KEY:STORage Function: The command sets storage menu on or off. 22.
RIGOL Function: The command sets horizontal system and its menu on or off. 24. :KEY:TrigMENU Command Format: :KEY:TrigMENU Function: The command sets trigger menu on or off. 25. :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. 26. :KEY:TrigMODE Command Format: :KEY:TrigMODE Function: The command shifts the trigger mode among AUTO, NORMAL and SINGLE. 27.
RIGOL Function: The command sets the bulit-in help system on or off. 29. :KEY:QUICKMEASure Command Format: :KEY:QUICKMEASure Function: The command sets quick-measurement function on or off. And it could be set in Measurement menu. 30. :KEY:QUICKPRINt Command Format: :KEY:QUICKPRINt Function: The command prints and saves the screen. 31. :KEY:FUNC_Z Command Format: :KEY:FUNC_Z Function: The command selects the multifunction knob. 32.
RIGOL Function: The command decreases the offset of multifunction knob. 34. :KEY:CH1_VOLT_INC Command Format: :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.
RIGOL Function: 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.
RIGOL 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. :KEY:CH3_VOLT_INC Command Format: :KEY:CH3_VOLT_INC Function: The command decreases the vertical scale of channel 3. 47.
RIGOL 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. :KEY:CH3_POS_DEC Command Format: :KEY:CH3_POS_DEC Function: The command decreases the vertical offset of channel 3 evenly. 51.
RIGOL 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. :KEY:CH4_POS_INC Command Format: :KEY:CH4_POS_INC Function: The command increases the vertical offset of channel 4 evenly. 56.
RIGOL 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. :KEY:TIME_Z Command Format: :KEY:TIME_Z Function: The command sets delayed scan function on or off. 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.
RIGOL Function: The command adjusts the trigger offset to the horizontal zero point evenly. 64. :KEY:TRIG_LEVEL_INC Command Format: :KEY:TRIG_LEVEL_INC Function: The command increases the trigger level evenly. 65. :KEY:TRIG_LEVEL_DEC Command Format: :KEY:TRIG_LEVEL_DEC 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.
RIGOL Measurement Commands Measurement Commands are used for the fundamental measurement operations, and the measurement results are expressed by scientific notation.
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 paramter that must be set in the commond; and “[]” indicates the parameter can be set or not set according to your demand.
RIGOL Function: The command measures the minimum of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Return Format: The query returns -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. Return Format: The query returns 5.280e000, and the unit is V. 6.
RIGOL Return Format: The query returns -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. Return Format: The query returns -4.200e-003, and the unit is V. 9. :MEASure:VRMS? Command Format: :MEASure:VRMS?□[] Function: The command measures the root mean square of signal from .
RIGOL 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. Return Format: The query returns 8.000e-003, and the unit is V. 12. :MEASure:FREQuency? Command Format: :MEASure:FREQuency?□[] Function: The command measures the frequency of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4.
RIGOL Function: The command measures the fall time of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Return Format: The query returns 4.000e-005, and the unit is s. 15. :MEASure:PERiod? Command Format: :MEASure:PERiod?□[] Function: The command measures the period of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Return Format: The query returns 1.000e-003, and the unit is s. 16.
RIGOL Return Format: The query returns 5.000e-004, and the unit is s. 18. :MEASure:PDUTycycle? Command Format: :MEASure:PDUTycycle?□[] Function: The command measures the positive duty cycle of signal from . The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Return Format: The query returns 5.000e001, and the unit is %. 19. :MEASure:NDUTycycle? Command Format: :MEASure:NDUTycycle?□[] Function: The command measures the negative duty cycle of signal from .
RIGOL 21. :MEASure:NDELay? Command Format: :MEASure:NDELay?□[,] Function: The command measures the delay between and relative to the falling edge. The may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Return Format: The query returns <-1.000 e-004, and the unit is s. 22. :MEASure:PPHAse? Command Format: :MEASure:PPHAse?□[,] Function: The command measures the phase difference between and relative to the rising edge.
RIGOL 24. :MEASure:TOTal Command Format: :MEASure:TOTal□{{1|ON}|{0|OFF}} Function: The command sets all the measurement functions on or off. Query Format: :MEASure:TOTal? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :MEASure:TOTal□ON Set the total measurement function on. :MEASure:TOTal? Return 1. 25. :MEASure:SOURce Command Format: :MEASure:SOURce□ Functions: The command selects the measurement channel.
RIGOL Command Format: :MEASure:DELAYSOURce□, Functions: The command selects the channel for measuring the time delay. The< source> may be CHANnel1, CHANnel2, CHANnel3 or CHANnel4. Query Format: :MEASure:DELAYSOURce? Return Format: The query returns CH1, CH2 or CH1, CH3, CH1, CH4, CH2, CH3, CH2, CH4, CH3, CH4. Example: :MEASure:DELAYSOURce□CHANnel1□CHANnel2 Seleclt measuring the time delay between CH1 and CH2. :MEASure:DELAYSOURce? Return CH1, CH2. 27.
RIGOL 28. :MEASure:ENABle Command Format: :MEASure:ENAble Functions: This command is open the locked MEASURE button and allow user to open Auto Measure. NOTE: Only corresponding unlock command can open AUTO and Auto Measure once they are locked, neither restart nor update is available. 29. :MEASure:DISable Command Format: :MEASure:DISable Function: This command is lock MEASURE button and forbid user opening Auto Measure. 30.
RIGOL Acquire Commands Acquire Commands are used to set the acquisition mode for oscilloscope.
RIGOL 1. :ACQuire:TYPE Command Format: :ACQuire:TYPE□ Function: The command sets the acquisition type. The may be NORMal(common sample), AVERage(average sample) or PEAKdetect(peak detection). Query Format: :ACQuire:TYPE? Return Format: The query returns Normal or AVERAGE, PEAKDETECT. 2. Example: :ACQuire:TYPE□AVERage Set the acquisition type as average acquisition. :ACQuire:TYPE? Return AVERAGE.
RIGOL 3. :ACQuire:AVERages Command Format: :ACQuire:AVERages□ Function: The command sets the average acquisition time. The range is 2~256, and the count increases by the multiples of 2. Query Format: :ACQuire:AVERages? Return Format: The query returns 2 or 4, 8, 16, 32, 64, 128, 256. 4. Example: :ACQuire:AVERages□16 Set the average acquisition time as 16. :ACQuire:AVERages? Return 16.
RIGOL Display Commands Diaplay Commands are used to set the display system.
RIGOL 1. :DISPlay:TYPE Command Format: :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). Query Format: :DISPlay:TYPE? Return Format: The query returns VECTORS or DOTS. 2. Example: :DISPlay:TYPE□VECTors Set the display type as vectors. :DISPlay:TYPE? Return VECTORS.
RIGOL 3. :DISPlay:PERSist Command Format: :DISPlay:PERSist□{{1|ON }|{0|OFF}} 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). Query Format: :DISPlay:PERSist? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 4. Example: :DISPlay:PERSist□ON Set waveform persist function on. :DISPlay:PERSist? Return 1.
RIGOL 5. :DISPlay:MNUStatus Command Format: :DISPlay:MNUStatus□{{1|ON}|{0| OFF}} Function: The command sets menu display function ON (Performing menu operation) or OFF (viewing the waveform). Query Format: :DISPlay:MNUStaus? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 6. Example: :DISPlay:MNUStatus□ON Set menu display function on. :DISPlay:MNUStaus? Return 1. :DISPlay:SCReen Command Format: :DISPlay:SCReen□ Function: The command sets the display mode of screen.
RIGOL Function: The command clears the last waveform on the screen. 8. :DISPlay:BRIGhtness Command Format: :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. Query Format: :DISPlay:BRIGhtness? Return Format: The query returns 0 or 1, 2 ……100 . 9. Example: :DISPlay:BRIGhtness□10 Set the grid bightness as 10. :DISPlay:BRIGhtness? Return 10.
RIGOL 10. :DISPlay:DATA? Command Format: :DISPlay:DATA? Function: The command queries image data on the current screen, and the data format accords with IEEE488.2 standard. The data structure is: #800078788+the data of 8 bit bitmap.
RIGOL Vertical Commands Vertical Commands are used to set the vertical system from every channel separately.
RIGOL 1. :CHANnel:BWLimit Command Format: :CHANnel:BWLimit□{{1|ON}|{0|OFF}} 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. Query Format: :CHANnel:BWLimit? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 2. Example: :CHANnel2:BWLimi□OFF Set BW limit function of channel 2 off. :CHANnel2:BWLimit? Return 0.
RIGOL 3. :CHANnel:DISPlay Command Format: :CHANnel:DISPlay□{{1|ON}|{0|OFF}} Function: The command sets the channel ON or OFF. The may be 1, 2, 3 or 4. Query Format: :CHANnel:DISPlay? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 4. Examples: :CHANnel2:DISPlay□ON Set channel 2 on. :CHANnel2:DISPlay? Return 1.
RIGOL Function: The command sets the vertical offset. The may be 1, 2, 3 or 4. Scale >200mV, : -40V~ +40V; Scale ≤200mV, : -2V ~ +2V. Query Format: :CHANnel:OFFSet? Return Format: The query returns the value of offset, and the unit is V. 6. Example: :CHANnel2:OFFSet□20 Set the vertical offset of channel 2 as 20V. :CHANnel2:OFFSet? Return 2.000e+01. :CHANnel:PROBe Command Format: :CHANnel:PROBe□ Function: The command sets the attenuation factor of probe.
RIGOL Function: 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.
RIGOL Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 9. Example: :CHANnel2:FILTer□OFF Set the digital filter of channel 2 off. :CHANnel2:FILTer? 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).
RIGOL Example: :CHANnel1:UNITs VOLTs :CHANnel1:UNITs? Set the unit of channel 1 as V. Return VOLTs. 11. :CHANnel:VERNier Command Format: :CHANnel:VERNier□{{1|ON}|{0|OFF}} Function: The command sets the adjustment mode of vertical scale as ON (Fine) or OFF (Coarse). The vertical scale steps by 1-2-5 in Coarse mode; and by equality in Fine mode.The may be 1, 2, 3, 4. Query Format: :CHANnel:VERNier? Return Format: The query returns 1 or 0, respectively indicates ON or OFF.
RIGOL Horizontal Commands Horizontal 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.
RIGOL 1. :TIMebase:MODE Command Format: :TIMebase:MODE□ Function: The command sets the scan mode of horizontal timebase as MAIN (main time base) or DELayed (delayed scan time base). Query Format: :TIMebase:MODE? Return Format: The query returns MAIN or DELAYED. 2. Example: :TIMebase:MODE□MAIN Set the scan mode as main time base. :TIMebase:MODE? Return MAIN.
RIGOL Return Format: The query reutrns the value of offset, and the unit is s. Example: :TIMebase:MODE□DELayed 3. Set the scan mode as delayed scan. :TIMebase:DELayed:OFFSet□1 Set the timebase offset as 1s. :TIMebase:DELayed:OFFSet? Return 1.000e+00. :TIMebase:DELayed:SCALe Command Format: :TIMebase:DELayed:SCALe□ Function: The command sets the timebase scale of delayed scan, and the unit is s/div.
RIGOL Function: The command sets the timebase offset of main mode, that is the offset of the waveform position relative to center screen. In NORMAL mode, : 1s ~ memory capacitance; In STOP mode, : -500s ~ +500s; In SCAN mode,: (-6 *MainScale + 6 DelayedScale①) ~(6 *MainScale - 6 DelayedScale) Scale is the current horizontal scale, and the unit is s/div.
RIGOL Query Format: :TIMebase[:MAIN]:SCALe? Return Format: The query returns the value of timebase scale, and the unit is s. 6. Example: :TIMebase:MODE□MAIN :TIMebase:SCALe□2 Set the scan mode as main. Set the timebase scale as 2s. :TIMebase:SCALe? Return 2.000e+00.
RIGOL Trigger Commands Trigger Control 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.
RIGOL 1. :TRIGger:MODE Command Format: :TRIGger:MODE□ Function: The command sets the trigger mode as Edge, Pulse, Video, Alternation or Pattern trigger. Query Format: :TRIGger:MODE? Return Format: The query returns EDGE or PULSE, VIDEO, ALTERNATION, PATTERN. 2. Example: :TRIGger:MODE□EDGE Set the trigger mode as edge trigger. :TRIGger:MODE? Return EDGE.
RIGOL Example: :TRIGGER:EDGE:SOURce□CHANnel1 Set the edge trigger source as channel 1. :TRIGGER:EDGE:SOURce? Return CH1. 3. :TRIGger:LEVel Command Format: :TRIGger:LEVel□ Function: The command sets the voltage level of Edge, Pulse or Video trigger. The 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. If choose PATTern mode, it needs SOURce parameter.
RIGOL Query Format: :TRIGger:SWEep? Return Format: The query returns AUTO or NORMAL, SINGLE. 5. Example: :TRIGger:EDGE :SWEep□AUTO Set the trigger type as AUTO. :TRIGger:EDGE :SWEep? Return AUTO. :TRIGger:COUPling Command Format: :TRIGger:COUPling□{ DC | AC | LF } Function: The command sets the coupling mode. DC (Allow all signals pass); AC (Reject DC signals and attenuate the signal below 10Hz); LF (Reject DC signals and attenuate the signals below 8kHz).
RIGOL oscilloscope will not trigger until Holdoff ends. The range is 100ns~1.5s. Query Format: :TRIGger:HOLDoff? Return Format: The query returns the value of holdoff time, and the unit is s. 7. Example: :TRIGger:HOLDoff□0.0001 Set the holdoff time as 100μs. :TRIGger:HOLDoff? Return 1.000e-04. :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.
RIGOL 9. Example: :TRIGger:SENSitivity□0.2 Set the trigger sensitivity as 0.2div. :TRIGger:SENSitivity? Return 2.00e-01. :TRIGger:HFREject Command Format: :TRIGger:HFREject□{{1|ON}|{0|OFF}} Function: The command sets high frequency reject function on or off. Query Format: :TRIGger:HFREject? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. Example: :TRIGger:HFREject□ON Set HFR on. :TRIGger:HFREject? Return 1.
RIGOL Trigger Mode Commands Trgger Mode includes: Edge, Pulse, Video, Alternation, and Pattern trigger.
RIGOL 1. Edge Trigger Edge trigger occurs when the trigger input meets a specified level along the specified slope direction. (1) :TRIGger:EDGE:SLOPe Command Format: :TRIGger:EDGE:SLOPe□{ POSitive | NEGative | ALTernation } Function: The command sets the trigger edge as Positive (rising edge), Negative (falling edge) or ALTernation (rising and falling edge). Query Format: :TRIGger:EDGE:SLOPe? Return Format: The query returns POSITIVE or NEGATIVE, ALTERNATION.
RIGOL 2. Pulse Trigger Setup a certain trigger condition to capture specified pulse. Pulse tigger occurs when pulse width meets the condition.
RIGOL Example: :TRIGger:PULSe:WIDTh□0.001 Set the pulse width as 1ms. :TRIGger:PULSe:WIDTh? Return 1.000e-03.
RIGOL 3. Video Trigger In video trigger, the standard video signal (NTSC, PAL/SECAM) is triggered in field or line. The trigger coupling mode is DC. (1) :TRIGger:VIDEO:MODE Command Format: :TRIGger:VIDEO:MODE□ Function: The command sets the trigger sync mode as ODDFIELD, EVENFIELD, LINE or ALLLINES. Query Format: :TRIGger:VIDEO:MODE? Return Format: The query returns ODD FIELD ro EVEN FIELD, LINE, ALL LINES. Example: :TRIGger:VIDEO:MODE□EVENFIELD Set the trigger sync mode as even field.
RIGOL :TRIGger:VIDEO:POLarity□POSitive Set the video polarity as positive. :TRIGger:VIDEO:POLarity? Return POSITIVE. (3) :TRIGger:VIDEO:STANdard Command Format: :TRIGger:VIDEO:STANdard□{ NTSC | PALSecam } Function: The command sets the video standard as NTSC or PAL/SECAM. Query Format: :TRIGger:VIDEO:STANdard? Return Format: The query returns NTSC or PAL/SECAM. Example: :TRIGger:VIDEO:STANdard□PALSECAM Set the video standard as PAL/SECAM. :TRIGger:VIDEO:STANdard? Return PAL/SECAM.
RIGOL 4. Alternation Trigger In alternation trigger, different signals can be triggered at the same time. And the trigger signals are from two vertical channels. Alternation trigger is applicable for viewing two non-relative signals. The trigger mode of two vertical channels can be set as EDGE, PULSe, or VIDEO trigger. (1) :TRIGger:ALTernation:SOURce Command Format: :TRIGger:ALTernation:SOURce□ Function: The command selects the alternation trigger channel.
RIGOL Return Format: The query returns SOURceA or SOURceB. Example: :TRIGger:ALTernation:SOURce□CH1CH2 Set the alternation channel as CH1CH2. :TRIGger:ALTernation:CURRentSOURce SOURceB Set the current channel as source B. :TRIGger:ALTernation:CURRentSOURce? Return SOURceB. (3) :TRIGger:ALTernation:TYPE Command Format: :TRIGger:ALTernation:TYPE□[,] Function: The command sets the trigger type.
RIGOL In NoRMAL mode, different types of instruments have different sweep ranges: DS1204B instrument, range:1ns/div~50s/div. DS1104B instrument,range:2ns/div~50s/div. DS1064B instrument,range:5ns/div~50s/div. In SCAN mode, range: 50ms ~ 50s. Query Format: :TRIGger:ALTernation:TimeSCALe?□[] Return Format: The query returns the value of time scale, and the unit is s. Example: :TRIGger:ALTernation:TimeSCALe□0.
RIGOL (6) :TRIGger:ALTernation:LEVel Command Format: :TRIGger:ALTernation:LEVel□[,] Function: The command sets the trigger level of current channel. The range range: (- 6*Scale-Offset①) ~(+6*Scale+Offset①).Scale is the current vertical scale, and the unit is V/div. the may be SOURceA or SOURceB, and the source A and B is different according to the current alternation channel.
RIGOL Example: :TRIGger:ALTernation:EDGE:SLOPe□POSitive, SOURceB Set the edge type as rising edge. :TRIGger:ALTernation:EDGE:SLOPe?□SOURceB Return POSITIVE. (8) :TRIGger:ALTernation:PULSe:MODE Command Format: :TRIGger:ALTernation:PULSE:MODE□[,] Function: The command sets the trigger condition of pulse trigger. The may be +GREaterthan, +LESSthan, + EQUal, -GREaterthan, -LESSthan or –EQUal.
RIGOL Query Format: :TRIGger:ALTernation:PULSe:TIME?□[] Return Format: The query returns the value of pulse width, and the unit is s. Example: :TRIGGER:ALTERNATION:PULSe:TIME□0.002, SOURceB Set the pulse width as 2ms. :TRIGGER:ALTERNATION:PULSeE:TIME?□SOURCeB Return 2.000e-03. (10) :TRIGger:ALTernation:VIDEO:POLarity Command Format: :TRIGger:ALTernation:VIDEO:POLarity□{POSitive | NEGative }[,] Function: The command sets the video polarity as Positive or Negative.
RIGOL 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. Query Format: :TRIGger:ALTernation:VIDEO:STANdard?□[] Return Format: The query returns NTSC or PAL/SECAM. Example: :TRIGger:ALTernation:VIDEO:STANdard□NTSC, SOURceB Set the video standard as NTSC. :TRIGger:ALTernation:VIDEO:STANdard?□SOURceB Return NTSC.
RIGOL (13) :TRIGger:ALTernation:HOLDoff Command Format: :TRIGger:ALTernation:HOLDoff□[,] Function: The command sets the holdoff time to trigger the specified source alternately. Holdoff time is the waiting time of oscilloscope before starting a new trigger. During Holdoff, oscilloscope will not trigger until Holdoff ends. The range is 100ns~1.5s. The may be SOURceA or SOURceB.
RIGOL Example: :TRIGGER:ALTERNATION:VIDEO:LINE□100, SOURceB Set the specified line number as 100. :TRIGger:ALTernation:VIDEO:LINE?□SOURceB Return 100. (15) :TRIGger:ALTernation:COUPling Command Format: :TRIGger:ALTernation:COUPling□{DC | AC | HF | LF}[,] Function: The command sets the coupling mode. DC (Allow all signals pass); AC (Reject DC signals and attenuate AC signals below 10Hz). HF (Reject high frequency signals above 150 kHz).
RIGOL Query Format: :TRIGger:ALTernation:SENSitivity?□[] Return Format: The query returns the value of trigger sensitivity, and the unit is div. Example: :TRIGger:ALTernation:SENSitivity□0.1, SOURceB Set the trigger sensitivity as 01. :TRIGger:ALTernation:SENSitivity?□SOURceB Programming Guide for DS1000B Series Return 1.00e-01.
RIGOL 5. Pattern Trigger Pattern trigger identifies the trigger conditions by checking the specified code. The code is the logical combination of all the channels, each channel has three logical values: high (H), low (L) and ignore(X). (1) :TRIGger:PATTern:PATTern Command Format: :TRIGger:PATTern:PATTern□,,[,,] Function: The command sets the code pattern of signals. : Code pattern values of 5 channels.
RIGOL 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.
RIGOL 1. :MATH:DISPlay Command Format: :MATH:DISPlay□{{1|ON}|{0|OFF}} Function: The command sets Math waveform on or off. Query Format: :MATH:DISPlay? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 2-78 Example: :MATH:DISPlay□ON Set Math waveform on. :MATH:DISPlay? Return 1.
RIGOL Waveform Commands Waveform Commands are used to read the datum and parameters of waveform on the screen.
RIGOL 1. :WAVeform:DATA? Command Format: :WAVeform:DATA?□[] Function: The command is used to read the data of waveform on EMS memory. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Return Format: The query returns 1024 waveform datum. Example: :WAVeform:DATA?□CHANnel1 Read the data from CH1, return: 5.240000e+02, 4.760000e+02,……. 2. :WAVeform:FORMat Command Format: :WAVeform:FORMat□ Function: The command sets the format of waveform data.
RIGOL 3. :WAVeform:SOURce Command Format: :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. Query Format: :WAVeform:SOURce? Return Format: The query returns Channel1 or Channel2, Channel3, Channel4, MATH. 4. Example: :WAVeform:SOURce□CHANnel2 Set the data source as channel 2. :WAVeform:SOURce? Return Channel2.
RIGOL The command queries the vertical scale of specified soucce. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. NOTE: returned value=scale value/25. Return Format: The query returns the value of vertical scale, and the unit is V. Example: :WAVeform:YINCrement?□CHANnel2 6. Return 4.00e+00. :WAVeform:YORigin? Command Format: :WAVeform:YORigin?□[] Function: The command queries the vertical offset of specified soucce.
RIGOL 8. :WAVeform:XORigin? Command Format: :WAVeform:XORigin?□[] Function: The command queries the time from origin to start of EMS memory of specified soucce. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Return Format: The query returns the value of time and the unit is s. Example: :WAVeform:XORigin?□CHANnel2 9. Return 2.00e-02. :WAVeform:STARtofroll? Command Format: :WAVeform:STARtofroll? Function: The command queries the start point of roll display.
RIGOL Example: :WAVeform:ERASeofroll? Return 3. 11. :WAVeform:WINDowzoom? Command Format: :WAVeform:WINDowzoom? Function: The command queries the window width. Return Format: The query returns the value of window width, and the unit is pels. Example: :WAVeform:WINDowzoom? Return 300. 12. :WAVeform:SYSMemsize? Command Format: :WAVeform:SYSMemsize? Function: The command queries the system memory depth. Return Format: The query returns the value of memory depth.
RIGOL Return Format: The query returns the value of screen, and the unit is V. Example: :WAVeform:SCREENDATA?□CHANNEL1 Query the screen data of channel1, return: 4.000000e+02, ……. 14. :WAVeform:MEMorydata? Command Format: :WAVeform:MEMorydata?□[] Function: The command queries the memory data of specified source. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Return Format: The query returns the value of memory data, and the unit is V.
RIGOL Function: The command queries the position that the left of screen reaches the start point of memory. Return Format: The query returns the coordinate of position. Example: :WAVeform:WPOSition? Return 1696. 17. :WAVeform:PARAmeter? Command Format: :WAVeform:PARAmeter? Function: The command queries the system draw parameters. Return Format: The query returns the system draw parameters, which is composed of the header of TMC (#800000xxx) and DSO_WAVE_PARAMETER. 18.
RIGOL Function: The command queries the vertical reference axis. Return Format: The query returns the value of reference axis. Example: :WAVeform:YREFerence? Return 99. 20. :WAVeform:DATA? XY Command Format; :WAVeform:DATA? XY Function: Request the waveform in XY mode. 2K, 1K in front is channel1, 1K in back is channel2.
RIGOL Utility Commands Utility Commands are used to set other system function, such as counter, system language, system beep and real-time clock.
RIGOL 1. :COUNter:ENABle Command Format: :COUNter:ENABle□{{1|ON}|{0|OFF}} Function: The command sets the counter ON or OFF. Query Format: :COUNter:ENABle? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 2. Example: :COUNter:ENABle□ON Set the counter on. :COUNter:ENABle? Return 1. :BEEP:ENABle Command Format: :BEEP:ENABle□{{1|ON}|{0|OFF}} Function: The command sets the system beeper ON or OFF.
RIGOL Function: The command tests the system beeper. 4. :RTC Command Format: :RTC□,,,,, Function: The command sets the system time. Query Format: :RTC? Return Format: The query returns the Year, the Month, the day, the hour, the minite, and the second. 5. Example: :RTC□2008,8,8,20,08,08 Set the system time as 08, 08, 08, 08, 08, 08pm. :RTC? Return 2008, 8, 8, 20, 8, 8.
RIGOL Storage Commands Storage Commands are used to save and recall the waveform data and screen image.
RIGOL 1. :SAVERECALL:TYPE Command Format: :SAVERECALL:TYPE□ Function: The command sets the data type for storage. The may be WAVeform (waveform data) or SETups (data settings). Query Format: :SAVERECALL:TYPE? Return Format: The query returns WAVEFORMS or SETUPS. Example: :SAVERECALL:TYPE□WAVeforms Set the storage type as waveform data. :SAVERECALL:TYPE? Return WAVEFORM. 2. :SAVERECALL:LOCation Command Format: :SAVERECALL:LOCation□ Function: The command sets the storage location.
RIGOL Command Format: :SAVERECALL:LOAD 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 NOTE: In commands, the file name must add double quotation marks. Function: The command saves the image.
RIGOL 7. Example: :SAVE:IMAGe:FACTors□ON Save the system parameters. :SAVE:IMAGe:FACTors? Return 1. :SAVE:IMAGe:FORMat Command 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). Query Format: :SAVE:IMAGe:FORMat? Return Format: The query returns BMP24bit, BMP8bit or PNG. 8. Example: :SAVE:IMAGe:FORMat□BMP Set the format as 24 bit real color.
RIGOL 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 is composed of ASCII characters. 10. :SAVE:CSV:STARt Command Format: :SAVE:CSV:STARt ] NOTE: In external save, the file name must add double quotation marks. Function: The command sets the saving function of CSV file on. CSV file can be saved in external storage medium.
RIGOL Mask Commands Mask Commad are used to create and modify the rules for pass/fail test function.
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}} Function: The command sets the state of passing test as ON or OFF. Query Format: :MASK:ENABle? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 3. Example: :MASK:ENABle□ON Set passing test on. :MASK:ENABle? Return 1.
RIGOL 4. Example: :MASK:X□1 Set the X direction rule as 1div. :MASK:X? Return 1.000000. :MASK:Y Command Format: :MASK:Y□ Function: The command sets the rule of testing Y direction. The is 0.04div~4div. Query Format: :MASK:Y? Return Format: The query returns the y value, and the unit is div. 5. Example: :MASK:Y□1 Set the Y direction rule as 1div. :MASK:Y? Return 1.000000. :MASK:SOURce Command Format: :MASK:SOURce□ Function: The command sets the passing test source.
RIGOL 6. :MASK:OPERate Command Format: :MASK:OPERate□ Function: The command sets the function of passing test run or stop. The may be RUN or STOP. Query Format: :MASK:OPERate? Return Format: The query returns RUN or STOP. 7. Example: :MASK:OPERate□RUN Set the operation of passing test run. :MASK:OPERate? Return RUN. :MASK:OUTPut Command Format: :MASK:OUTPut□
RIGOL 8. :MASK:STOPonoutput Command Format: :MASK:STOPonoutput□{{1|ON}|{0|OFF}} Function: The command sets the output stop mode of passing test ON or OFF. Query Format: :MASK:STOPonoutput? Return Format: The query returns 1 or 0, respectively indicates ON or OFF. 9. Example: :MASK:STOPonoutput□ON Set the output stop mode of passing test on. :MASK:STOPonoutput? Return 1. :MASK:SAVE Command Format: :MASK:SAVE Function: The command saves the rule of passing test. 10.
RIGOL NOTE: In commands, the file name must add double quotation marks. 12. :MASK:Upload Command Format: :MASK:Upload□ Function: The command uploads the test rule from the external storage equipment, and the must be ASCII character. NOTE: In commands, the file name must add double quotation marks. 13. :MASK:MSG Command Format: :MASK:MSG□{{1|ON}|{0|OFF}} Function: The command sets the prompt information function of passing test ON or OFF.
RIGOL Cursor Commands Cursor Commands are used to set cursor parameters to measure manually and automatically and track the waveform data.
RIGOL 1. :CURSor:MODE Command Format: :CURSor:MODE□ Function: The command sets the cursor mode. The may be CLOSe, MANUal, TRACk or MEASure (measure automatically). Query Format: :CURSor:MODE? Return Format: The query returns CLOSE or MANUAL, TRACK, MEASURE. 2. Example: :CURSor:MODE□TRACK Set the cursor mode as track. :CURSor:MODE? Return TRACK. :CURSor:MANUal:TYPE Command Format :CURSor:MANUal:TYPE□ Function: The commad sets the cursor type of manual cursor.
RIGOL Command Format: :CURSor:MANUal:SOURce□ Function: The command sets the cursor source of manual cursor. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4 or MATH. Query Format: :CURSor:MANUal:SOURce? Return Format: The query returns Channel1 or Channel2, Channel3, Channel4, Math. Example: :CURSor:MANUal:SOURce□CHANnel1 Set the curosor source of manual cursor as channel 1. :CURSor:MANUal:SOURce? Return Channel1. 4.
RIGOL Command Format: :CURSor:MANUal:CURAY□ Function: The command sets the AY position of manual cursor. The range is 4~194. Query Format: :CURSor:MANUal:CURAY? Return Format: The query returns the value of AY position. 6. Example: :CURSor:MANUal:CURAY□100 Set the AY position of manual cursor as 100. :CURSor:MANUal:CURAY? Return 100. :CURSor:MANUal:CURBX Command Format: :CURSor:MANUal:CURBX□ Function: The command sets the BX position of manual cursor. The range is 4~297.
RIGOL Function: The command sets the BY position of manual cursor. The range is 4~194. Query Format: :CURSor:MANUal:CURBY? Return Format: The query returns the value of BY position. 8. Example: :CURSor:MANUal:CURBY□100 Set the BY position of manual cursor as 100. :CURSor:MANUal:CURBY? Return 100. :CURSor:TRACk:SOURceA Command Format: :CURSor:TRACk:SOURceA□ Function: The command sets the signal source A of track cursor.
RIGOL Function: The command sets the signal source B of track cursor. The may be CHANnel1, CHANnel2, CHANnel3, CHANnel4, MATH or NONE. Query Format: :CURSor:TRACk:SOURceB? Return Format: The query returns Channel1 or Channel2, Channel3, Channel4, Math, None. Example: :CURSor:TRACk:SOURceB□CHANnel1 Set the signal source B of track cursor as channel 1. :CURSor:TRACk:SOURceB? Return Channel1. 10.
RIGOL Query Format: :CURSor:TRACk:CURB? Return Format: The query returns the position of cursor B. Example: :CURSor:TRACk:CURB□100 Set the position of track cursor B as 100. :CURSor:TRACk:CURB? Return 100.
RIGOL Other Commands There are some other commands except for above commands: clear the system error information, download the system setup data, enable and disable the AUTO key and enable and disable the Measure key.
RIGOL 1. :SYSTem:ERRor Command Format: :SYSTem:ERRor Function: The command clears the queue of error information. Query Format: :SYSTem:ERRor? Return Format: If there are errors, return 0, No error; or else return Undefine header. Example: :SYSTem:ERRor? 2. Return 0, No error. :SYSTem:ERRor? Command Format: :SYSTem:ERRor? Function: Return the last error message. Return Format: 0,No error 3. :SYSTem:SETup Command Format: :SYSTem:SETup□ Function: The command downloads the system setup data.
RIGOL 4. :SYSTem:SETup? Command Format: :SYSTem:SETup? Function: Return the data of system SETUP. 5. :AUToscale:DISable Command Format: :AUTOscale:DISable Function: The command disables the AUTO key, and forbids users setting automatically. 6. :AUToscale:ENable Command Format: :AUToscale:ENable Function: The command enables the AUTO key, and allows users to set automatically. 7. :AUToscale? Command Format: :AUToscale? Function: Return the AUTOSCALE state.
RIGOL Chapter 3 Programming Examples This chapter lists some application examples of RIGOL DS1000B commands (C language). Users can compare or refer to them to get further understanding for the usage of commands. The contents between “/*”and “*/” before every command are explanations which intends to help users understand instead of the contents of command. Before operating, please make sure that the related test equipment and the device under test have been already connected correctly.
RIGOL Example 1 The Preparation for Programming #include #include /*Define the equipmant address*/ /*LAN*/ #define RESOURCE "TCPIP0::172.16.3.73::inst0::INSTR" /*USB*/ #define RESOURCE "USB0::6833::1160::DS1BA103700043:0:INSTR" /*Define the equipment ID*/ ViSession g_viDefault; ViSession g_vi; void main { /*Open the equipment ID*/ viOpenDefaultRM(&g_viDefault); viOpen(g_viDefault,RESOURCE,VI_NULL,VI_NULL,&vi); /*Clear the interface*/ viClear(g_vi); /*Implement functions*/ .......
RIGOL Example 2 Setting the basic measurement /*Save the character string of equipment identifier the *IDN command returned*/ char s8IDNString[256]; void BasicSetup(void) { /*Firstly acquire the equipment identifier*/ viQueryf(g_vi,"*IDN?\n","%t",s8IDNString); /*Send the command :AUTO, and the equipment sets automatically according to the current signal to display best*/ viPrintf(g_vi,":AUTO\n"); /*Send the command :CHANnel:PROBe to set the probe attenuation factor*/ viPrintf(g_vi,":CHAN1:PROB 10X\n");
RIGOL Example 3 Storaging and Setting the File #define BUFFER_SETUP_SIZE 1636 void SetupUpload() { BYTE *bufSetup = new BYTE[BUFFER_SETUP_SIZE]; FILE *fp; /*Judge the buffer validity */ if (bufSetup == NULL) { return; } /*Make a statement for the VISA status*/ ViStatus sta; /*Send the command :SYSTEM:SETUP? to save the file to buffer*/ sta=viQueryf(g_vi,":SYSTEM:SETUP?\n","%#b\n",BUFFER_SETUP_SIZE, bufSetup); /*Judge whether the command is sent successfully*/ if(sta != VI_SUCCESS) { return; } /*Save the
RIGOL void SetupDownLoad() { BYTE *bufSetup = new BYTE[BUFFER_SETUP_SIZE]; FILE *fp; /*Judge the buffer validity */ if (bufSetup == NULL) { return; } /*Open the setup file*/ fp = fopen("C:\\scope\\setup.
RIGOL Example 4 Reading the Data of Screen Image #define BUFFER_IMAGE_SIZE 320*240+256*4+54+1; void ImageUpload() { BYTE *bufImage = new BYTE[BUFFER_IMAGE_SIZE]; FILE *fp; long headLen = 10; long sizeImage = BUFFER_IMAGE_SIZE; /*Judge the buffer validity*/ if (bufImage == NULL) { return; } /*Make a statement for the VISA status*/ ViStatus staDISP; ViStatus sta488; ViStatus staImage; /*Make a statement for IEEE488.
RIGOL fclose(fp); return ; } fclose(fp); } } Programming Guide for DS1000B Series 3-7
RIGOL Command Quick Reference *IDN? 2-3 :CURSor:MANUal:SOURce 2-103 *RST 2-4 :CURSor:MANUal:CURAX 2-104 *LRN? 2-4 :CURSor:MANUal:CURAY 2-104 *OPC? 2-5 :CURSor:MANUal:CURBX 2-105 :CURSor:MANUal:CURBY 2-105 A :CURSor:TRACk:SOURceA 2-106 :ACQuire:TYPE 2-34 :CURSor:TRACk:SOURceB 2-106 :ACQuire:MODE 2-34 :CURSor:TRACk:CURA 2-107 :ACQuire:AVERages2-35 :CURSor:TRACk:CURB 2-107 :ACQuire:SRATe? 2-35 :AUTO 2-3 D :AUToscale:DISable2-111 :DISPlay:DATA? 2-41 :AUToscale:ENable 2-111 :DISPlay:TYPE 2-
RIGOL :KEY:CH2 2-9 :KEY:CH3_VOLT_INC 2-17 :KEY:CH3 2-9 :KEY:CH3_VOLT_DEC 2-17 :KEY:CH4 2-9 :KEY:CH3_VOLT_Z 2-17 :KEY:MATH 2-9 :KEY:CH3_POS_INC 2-18 :KEY:REF 2-10 :KEY:CH3_POS_DEC 2-18 :KEY:F1 2-10 :KEY:CH3_POS_Z 2-18 :KEY:F2 2-10 :KEY:CH4_VOLT_INC 2-18 :KEY:F3 2-10 :KEY:CH4_VOLT_DEC 2-18 :KEY:F4 2-11 :KEY:CH4_VLOT_Z 2-19 :KEY:F5 2-11 :KEY:CH4_POS_INC 2-19 :KEY:MNU 2-11 :KEY:CH4_POS_DEC 2-19 :KEY:MEASure 2-11 :KEY:CH4_POS_Z 2-19 :KEY:CURSor 2-11 :KEY:TIME_INC 2-19 :KEY:ACQuire 2-12
RIGOL :MEASure:VMIN? 2-23 :SAVERECALL:SAVE 2-93 :MEASure:VAMPlitude? 2-24 :SAVE:IMAGe:STARt 2-93 :MEASure:ENABle2-24 :SAVE:IMAGe:FACTors 2-93 :MEASure:DISable2-24 :SAVE:IMAGe:FORMat 2-94 :MEASure? 2-24 :SAVE:WAVeform:STARt 2-94 :MEASure:VTOP? 2-24 :SAVE:SETup:STARt 2-94 :MEASure:VBASe? 2-24 :SAVE:CSV:STARt 2-95 :MEASure:VAVerage? 2-25 :STOP 2-3 :MEASure:VRMS? 2-25 :SYSTem:ERRor2-110 :MEASure:OVERshoot? 2-25 :SYSTem:ERRor?2-110 :MEASure:PREShoot? 2-26 :SYSTem:SETup2-110 :MEASure:FREQuen
RIGOL :TRIGger:ALTernation:TimeSCALe 2-67 :WAVeform:WINMemsize? 2-81 :TRIGger:ALTernation:TimeOFFSet :WAVeform:YINCrement? 2-81 2-68 :WAVeform:YORigin? 2-82 :TRIGger:ALTernation:LEVel 2-69 :WAVeform:XINCrement? 2-82 :TRIGger:ALTernation:EDGE:SLOPe 2-69 :WAVeform:YINCrement? 2-81 :TRIGger:ALTernation:PULSe:MODE 2-70 :WAVeform:YORigin? 2-82 :TRIGger:ALTernation:PULSe:TIME 2-70 :WAVeform:XINCrement? 2-82 :TRIGger:ALTernation:VIDEO:POLarity 2-71 :WAVeform:XORigin? 2-83 :TRIGger:ALTernation:VIDEO