Rigol DP900 Series Programming Manual

Rigol DP900 Series Programming Manual

Programmable linear dc power supply
Hide thumbs Also See for DP900 Series:
Table of Contents

Advertisement

Quick Links

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DP900 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Rigol DP900 Series

  • Page 2 • RIGOL products are covered by P.R.C. and foreign patents, issued and pending. • RIGOL reserves the right to modify or change parts of or all the specifications and pricing policies at the company's sole decision. • Information in this publication replaces all previously released materials.
  • Page 3: Table Of Contents

    4.2.1 :APPLy..........................IEEE488.2 Commands....................... 4.3.1 *CLS..........................4.3.2 *ESR?..........................4.3.3 *ESE..........................22 4.3.4 *IDN?..........................23 4.3.5 *OPC..........................23 4.3.6 *OPT?..........................4.3.7 *PSC..........................25 4.3.8 *RCL..........................26 4.3.9 *RST..........................4.3.10 *SAV..........................27 4.3.11 *SRE..........................4.3.12 *STB?..........................4.3.13 *TRG..........................4.3.14 *TST?..........................Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 4 4.7.8 :MEMory:STORe......................44 4.7.9 :MEMory:VALid?......................:OUTPut Commands......................4.8.1 :OUTPut:CVCC?......................46 4.8.2 :OUTPut:MODE?......................4.8.3 :OUTPut:OCP:ALAR?....................4.8.4 :OUTPut:OCP:QUES?....................4.8.5 :OUTPut:OCP:CLEar....................4.8.6 :OUTPut:OCP:DELay....................4.8.7 :OUTPut:OCP[:STATe]....................4.8.8 :OUTPut:OCP:VALue....................51 4.8.9 :OUTPut:OVP:ALAR?....................4.8.10 :OUTPut:OVP:QUES?....................4.8.11 :OUTPut:OVP:CLEar....................4.8.12 :OUTPut:OVP[:STATe]....................4.8.13 :OUTPut:OVP:VALue....................55 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 5 :STATus:OPERation[:EVENt]?...................71 4.10.4 :STATus:PRESet......................4.10.5 :STATus:QUEStionable:ENABle................72 4.10.6 :STATus:QUEStionable[:EVENt]?................73 4.10.7 :STATus:QUEStionable:INSTrument:ENABle............73 4.10.8 :STATus:QUEStionable:INSTrument[:EVENt]?............ 4.10.9 :STATus:QUEStionable:INSTrument:ISUMmary[<n>]:CONDition?.... 4.10.10 :STATus:QUEStionable:INSTrument:ISUMmary[<n>]:ENABle..... 4.10.11 :STATus:QUEStionable:INSTrument:ISUMmary[<n>][:EVENt]?....77 4.11 :SYSTem Commands......................4.11.1 :SYSTem:BEEPer:IMMediate..................78 4.11.2 :SYSTem:BEEPer[:STATe]................... 4.11.3 :SYSTem:BRIGhtness....................79 4.11.4 :SYSTem:COMMunicate:LAN..................79 4.11.4.1 :SYSTem:COMMunicate:LAN:APPLy............4.11.4.2 :SYSTem:COMMunicate:LAN:AUTOip[:STATe].......... Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 6 :TIMEr Commands......................4.12.1 :TIMEr:CYCLEs......................4.12.2 :TIMEr:CHANNel......................97 4.12.3 :TIMEr:ENDState......................98 4.12.4 :TIMEr:GROUPs:NUM?..................... 4.12.5 TIMEr:GROUP:INDEx....................99 4.12.6 :TIMEr:GROUP:PARAmeter................... 4.12.7 :TIMEr:GROUP:DELete....................101 4.12.8 :TIMEr:RUN........................ 4.12.9 :TIMEr[:STATe]......................4.12.10 :TIMEr:TEMPlet:CONSTruct.................. 4.12.11 :TIMEr:TEMPlet:FALLRate..................4.12.12 :TIMEr:TEMPlet:INTErval..................104 4.12.13 :TIMEr:TEMPlet:INVErt................... 4.12.14 :TIMEr:TEMPlet:MAXValue..................106 4.12.15 :TIMEr:TEMPlet:MINValue..................107 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 7 :TRIGger Commands...................... 4.13.1 :TRIGger:IN[:ENABle]....................115 4.13.2 :TRIGger:IN:IMMEdiate..................115 4.13.3 :TRIGger:IN:RESPonse....................116 4.13.4 :TRIGger:IN:SOURce....................4.13.5 :TRIGger:IN:TYPE..................... 4.13.6 :TRIGger:OUT:POLArity..................4.13.7 :TRIGger:OUT:SOURce................... 4.13.8 :TRIGger:OUT[:ENABle]..................120 Programming Examples......................121 Programming Preparations..................121 LabVIEW Programming Example................Visual Basic Programming Example................126 VisualC++ Programming Example................Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 8 Table 3.5 Definitions of the bits in the status byte register and the decimal values corresponding to their binary weights ............Table 4.9 Ranges and default values of voltage/current corresponding to each channel of different models of DP900 series ............Table 4.33 Range and default value of overvoltage/overcurrent protection ..45...
  • Page 9: Document Overview

    This manual is your guide to control DP900 series power supply by sending SCPI commands via remote interface. DP900 series can communicate with the PC via the USB or LAN interface. http:// For the latest version of this manual, download it from the official website of RIGOL ( www.rigol.com Publication Number PGH08100-1110 Software Version 00.00.01...
  • Page 10 Output Voltage/Current Channels DP932A 32 V/3 A, 32 V/3 A, 6 V/3 A DP932U 32 V/3 A, 32 V/3 A, 6 V/3 A DP932E 30 V/3 A, 30 V/3 A, 6 V/3 A Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 11: Scpi Introduction

    "|". When using the command, you must select one of the parameters. 2. Vertical Bar | The vertical bar is used to separate multiple parameters. When using the command, you must select one of the parameters. 3. Square Brackets [ ] Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 12 The parameter can be any real number within the effective value range, and this command accepts parameter input in decimal (NR2 format) and scientific notation (NR3 format). For example, time > :TIMEr:TEMPlet:INTErval < Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 13 All the commands are case-insensitive. They can all be in upper case or in lower case. If abbreviation is used, you must input all the capital letters in the command. For example, :STSTem:BRIGhtness? can be abbreviated as :STST:BRIG? Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 14: Scpi Status Register

    (such as :STATus:QUEStionable[:EVENt]? *CLS ) or by sending the clear status command ( *RST The reset command will not clear bits in event registers. Querying an event Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 15 SUMMARY registers report the status of each channel to the channel questionable status register, which in turn reports the channel status to bit13 (ISUM bit) of the Questionable status register. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 16: Questionable Status Register

    (INSTrument summary) summaries the questionable output state of any of the three output channels. :STATus:QUEStionable[:EVENt]? Sending will read the register. To use bit13, you must Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 17: Table 3.1 Definitions Of The Bits In The Questionable Status Register And The

    SUMMARY register. The definitions of the bits in the channel questionable status SUMMARY register and the decimal values corresponding to their binary weights are as shown in the table below. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 18: Table 3.2 Definitions Of The Bits In The Channel Questionable Status Register And

    VOLTage current mode and the voltage is unregulated. The power supply is operating in constant CURRent voltage mode and the current is unregulated. Overvoltage protection occurs. Overcurrent protection occurs. Over-temperature protection occurs. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 19: Standard Event Register

    Device error. A self-test or calibration error occurred. Execution error, including trigger ignore, initialization ignore, setting conflict, data overrange, data too long, and invalid parameter value. Command error. A command syntax error occurred. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 20: Status Byte Register

    (bits must be enabled in the enable register). The power supply is requesting service. One or more bits are set in the operation OPER event register (bits must be enabled in the enable register). Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 21: Command System

    Syntax ch >[,< ch >[,< ch >]] :ANALyzer:COMMon:MEASure:TYPE < :ANALyzer:COMMon:MEASure:TYPE? Description Sets or queries the analysis object of the common analysis function. Parameter Name Type Range Default {CH1_V|CH1_C|CH1_P|CH2_V| <ch> Discrete CH2_C|CH2_P|CH3_V|CH3_C| CH3_P} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 22: Analyzer:current:measure:type

    CH1 and CH2.*/ :ANALyzer:CURRent:MEASure:TYPE? /*Queries the analysis object of pulse current analysis. The query returns CH1,CH2.*/ 4.1.3 :ANALyzer:CURRent:THRE Syntax ch >,< type >,< bool >,< val > :ANALyzer:CURRent:THRE < Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 23: Analyzer:save:route

    1 A for CH1 pulse current analysis.*/ :ANALyzer:CURRent:THRE? CH1,UP /*Queries the positive pulse threshold for CH1 pulse current analysis. The query returns 1,1.000.*/ 4.1.4 :ANALyzer:SAVE:ROUTe Syntax dest > :ANALyzer:SAVE:ROUTe < :ANALyzer:SAVE:ROUTe? Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 24: Analyzer:save:state

    The query returns C:/RA.ROF.*/ 4.1.5 :ANALyzer:SAVE:STATe Syntax bool > :ANALyzer:SAVE:STATe < :ANALyzer:SAVE:STATe? Description Sets or queries whether to save the logged data. Parameter Name Type Range Default <bool> Bool {1|0|ON|OFF} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 25: Analyzer:state

    <bool> Bool {0|1|ON|OFF} Remarks None. Return Format The query returns 0 or 1. Examples :ANALyzer:STATe ON /*Turns on the analyzer.*/ :ANALyzer:STATe? /*Queries the on/off state of the analyzer. The query returns 1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 26: Analyzer:type

    The range and default value of voltage/current corresponding to each channel of different models are shown in the table below. Table 4.9 Ranges and default values of voltage/current corresponding to each channel of different models of DP900 series Voltage/Current Voltage/Current...
  • Page 27: Apply

    {CH1|CH2|CH3} Table 4.9 Ranges and default Please refer to values of voltage/current corresponding to each <volt> Real channel of different models of DP900 series Table 4.9 Ranges and default Please refer to values of voltage/current corresponding to each <curr> Real channel of different models of DP900 series <option>...
  • Page 28: Ieee488.2 Commands

    (range) of different models, please refer Table 4.9 Ranges and default values of voltage/current corresponding to each channel of different models of DP900 series • <option> determines the object to be queried, voltage or current of the specified channel.
  • Page 29: Esr

    The query returns a decimal value, which corresponds to the binary-weighted sum of the bits set in the event register of the Standard Event register. For example, the query may return 20. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 30: Ese

    When <enable value> is set to 0, executing this command will clear the enable register of the Standard Event register. *PSC • You can also send (*PSC 1) to clear the enable register of the Standard Event register at the next power-on. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 31: Idn

    Description Queries the instrument’s identification string. Parameter None. Remarks None. Return Format The query returns the ID string in the format of Rigol Technologies,<model>,<serial number>,<software version>. • <model>: the model number. • <serial number>: the serial number. • <software version>: the software version.
  • Page 32: Opt

    Standard Event register after the command is executed.*/ *OPC? /*Queries whether the current operation is complete. The query returns +1.*/ 4.3.6 *OPT? Syntax *OPT? Description Queries the installation status of the options. Parameter None. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 33: Psc

    Enables or disables the function of clearing the enable registers of the Status Byte and Standard Event registers at power-on. Queries the on/off state of the function of clearing the enable registers of the Status Byte and Standard Event registers at power-on. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 34: Rcl

    Default <n> Discrete {0|1|2|3|4|5|6|7|8|9} Remarks • This command recalls a previously stored state from the power supply’s internal memory. Using number from 0 to 9 can recall the states named RIGOL0.RSF~RIGOL9.RSF respectively. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 35: Rst

    Return Format None. 4.3.10 *SAV Syntax n > *SAV < Description Saves the current instrument state to the specified location in the internal memory with the specified filename (RIGOLn.RSF). Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 36: Sre

    Refer to Remarks • The <enable value> is a decimal value, which corresponds to the binary- weighted sum of the bits to be enabled in the enable register of the Status Byte Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 37: Stb

    (QUES) and bit6 (RQS) in the SUMMARY register of the Status Byte register are set and the query returns 72 (2 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 38: Trg

    Return Format None. Examples *TRG /*Generates an event trigger.*/ 4.3.14 *TST? Syntax *TST? Description Queries the self-test result of the instrument. Parameter None. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 39: Wai

    *WAI /*Waits for all the pending operations to complete before executing any other commands.*/ :INSTrument Commands :INSTrument commands are used to select the channel to be programmed or query the channel currently selected. 4.4.1 :INSTrument:NSELect Syntax n > :INSTrument:NSELect < Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 40: Instrument[:Select]

    :INSTrument[:SELect] < :INSTrument[:SELect]? Description Selects the channel to be programmed or queries the channel currently selected. Parameter Name Type Range Default <source> Discrete {CH1|CH2|CH3} Remarks :INSTrument:NSELect INSTrument[:SELEct] This command functions the same as Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 41: Instrument[:Select]

    :INST CH2 /*Selects CH2 as the current channel.*/ :INST? /*Queries the channel currently selected. The query returns CH2:32V/3A.*/ :LIC Commands :LIC commands are used to install options. 4.5.1 :LIC:SET Syntax license > :LIC:SET < Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 42: Lic:install

    To acquire the license, you need to purchase the desired option to get the key and then use the key to generate the option license following the steps below. www.rigol.com Log in to the RIGOL official website ( ), and click SERVICE CENTRE > SERVICE > License Activation to enter the software license registration interface.
  • Page 43: Measure Commands

    To acquire the license, you need to purchase the desired option to get the key and then use the key to generate the option license following the steps below. www.rigol.com Log in to the RIGOL official website ( ), and click SERVICE CENTRE > SERVICE > License Activation to enter the software license registration interface.
  • Page 44: Measure[:Scalar]:All[:Dc]

    :MEAS:ALL? CH1 /*Queries the voltage, current, and power measured at the output terminal of CH1. The query returns 2.0000,0.0500,0.100.*/ 4.6.2 :MEASure[:SCALar]:CURRent[:DC]? Syntax source >] :MEASure[:SCALar]:CURRent[:DC]? [< Description Queries the current measured at the output terminal of the specified channel. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 45: Measure[:Scalar]:Power[:Dc]

    Parameter Name Type Range Default {CH1|CH2|CH3|ALL|SERies| <source> Discrete PARallel} Remarks • SERies: Queries the total power of the present series loop. • PARallel: Queries the total power of the present parallel loop. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 46: Measure[:Scalar][:Voltage][:Dc]

    The query returns the the voltage measured at the output terminal of the specified channel, for example, 2.0000. Examples :MEAS? CH1 /*Queries the voltage measured at the output terminal of CH1. The query returns 2.0000.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 47: Memory Commands

    The query returns the names of all the files and folders (separated by commas). For example, the query may return RIGOL0.BMP,cc.RSF; wherein, RIGOL0.BMP represents bitmap file, and cc.RSF represents state file. Examples :MEMory:CATalog? /*Queries the names of files in the current path. The query returns RIGOL0.BMP,cc.RSF.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 48: Memory:cdirectory

    • The parameter <directory_name> must be valid. • Valid external directories include the external memory (D:/ and E:/) and the folders (such as D:/RIGOL) in the external memory. Return Format The query returns the current directory, for example, C:/. Examples :MEMory:CDIRectory C:/ /*Sets the current directory to C disk.*/...
  • Page 49: Memory:disk

    The query returns the available disk(s), for example, D:/, E:/. If there is no available external disk, the query returns NONE. Examples :MEM:DISK? /*Queries the available external memory disk(s). The query returns D:/, E:/.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 50: Memory:load

    >,< bool > :MEMory:LOCK < :MEMory:LOCK? < filename > Description Locks or unlocks the specified file stored in C disk, or queries whether the specified file in C disk is locked. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 51: Memory:mdirectory

    <folder_name> is the name of the new folder, which can contain 255 characters in maximum. The name can consist of Chinese characters, English letters, and numbers (one Chinese character takes two bytes). Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 52: Memory:store

    You can also send to save the current instrument state to internal memory. Return Format None. Examples :MEM:STOR NEW.RSF /*Saves the state file in the current location and sets the filename to NEW.RSF.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 53: Memory:valid

    CH2 (32 V/3 A) 1 mV to 35.2 V/1 mA to 3.3 A 35.2 V/3.3 A DP932U CH3 (6 V/3 A) 1 mV to 6.6 V/1 mA to 3.3 A 6.6 V/3.3 A Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 54: Output:cvcc

    If <source> is omitted, the command queries the output mode of the current channel. Return Format The query returns CV, CC, or UR. Examples :OUTPut:CVCC? CH1 /*Queries the current output mode of CH1. The query returns CV.*/ 4.8.2 :OUTPut:MODE? Syntax :OUTPut:MODE? [< source >] Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 55: Output:ocp:alar

    Queries whether an overcurrent protection (OCP) event occurred on the specified channel. Parameter Name Type Range Default <source> Discrete {CH1|CH2|CH3} Remarks • Overcurrent protection (OCP) indicates that the output is disabled automatically when the actual output current reaches the OCP level. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 56: Output:ocp:ques

    If <source> is omitted, the command queries the output mode of the current channel. Return Format The query returns 1 or 0. Examples :OUTP:OCP:QUES? CH1 /*Queries whether an OCP event occurred on CH1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 57: Output:ocp:clear

    Syntax source >,]{< value >|< lim >} :OUTPut:OCP:DELay [< source >][,< lim >] :OUTPut:OCP:DELay? [< Description Sets or queries the time in milliseconds (default) that the overcurrent protection (OCP) is temporarily disabled. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 58: Output:ocp[:State]

    <source> Discrete {CH1|CH2|CH3} <bool> Bool {0|1|ON|OFF} Remarks • When OCP is enabled, the output is disabled automatically if the output current :OUTPut:OCP:VALue reaches the OCP level ( ) currently set. You can Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 59: Output:ocp:value

    You can select “MINimum” to set the minimum OCP level or “MAXimum” to set the maximum OCP level. • You can also send [:SOURce[<n>]]:CURRent:PROTection[:LEVel] to set the OCP level for the specified channel. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 60: Output:ovp:alar

    OVP event that occurred on the specified channel. Return Format The query returns 1 or 0. Examples :OUTP:OVP:ALAR? CH1 /*Queries whether an OVP event occurred on CH1.*/ 4.8.10 :OUTPut:OVP:QUES? Syntax source >] :OUTPut:OVP:QUES? [< Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 61: Output:ovp:clear

    Before executing the command, make sure to remove the condition that caused the overvoltage protection on the specified channel (you can either decrease the output voltage to below the OVP level or increase the OVP level to be greater than the output voltage). Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 62: Output:ovp[:State]

    OVP event occurred on the specified channel. • If <source> is omitted, the command executes the corresponding operation on the current channel. Return Format The query returns 1 or 0. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 63: Output:ovp:value

    The query returns the OVP level, for example, 8.800. Examples :OUTP:OVP:VAL CH1,8.8 /*Sets the OVP level of CH1 to 8.8 V.*/ :OUTP:OVP:VAL? CH1 /*Queries the OVP level of CH1. The query returns 8.800.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 64: Output:pair

    4.8.15 :OUTPut[:STATe] Syntax source >,]< bool > :OUTPut[:STATe] [< source >] :OUTPut[:STATe]? [< Description Sets or queries the on/off state for the specified channel. Parameter Name Type Range Default <source> Discrete {CH1|CH2|CH3|ALL} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 65: Output:track[:State]

    • The tracking function only tracks the voltage/current setting value. The actual output voltage/current will not be affected. Return Format The query returns 1 or 0. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 66: Source Commands

    When MINimum, MAXimum, or DEFault is selected, the command sets the minimum, maximum, or default current value within the available range for the specified channel. When UP or DOWN is selected, the Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 67: Source[]]:Current[:Level]

    <numeric value> is the step size specified. DEFault is the default value. The default values of <numeric value> are as shown in the table below. Channel Default 0.001 A DP932A Standard 0.001 A Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 68: Source[]]:Current:protection:clear

    :CURR:STEP? /*Queries the step size for the selected channel. The query returns 0.100.*/ 4.9.3 [:SOURce[<n>]]:CURRent:PROTection:CLEar Syntax n >]]:CURRent:PROTection:CLEar [:SOURce[< Description Clears an OCP event that occurred on the specified channel and enables the output of the corresponding channel. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 69: Source[]]:Current:protection[:Level]

    >]]:CURRent:PROTection[:LEVel] {< current >|< lim >} [:SOURce[< n >]]:CURRent:PROTection[:LEVel]? [< lim >] [:SOURce[< Description Sets or queries the overcurrent protection (OCP) level for the specified channel. Parameter Name Type Range Default <n> Integer {1|2|3} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 70: Source[]]:Current:protection:state

    [:SOURce[< n >]]:CURRent:PROTection:STATe? [:SOURce[< Description Sets or queries the on/off state of the overcurrent protection (OCP) function for the specified channel. Parameter Name Type Range Default <n> Integer {1|2|3} <bool> Bool {ON|OFF|1|0} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 71: Source[]]:Current:protection:tripped

    You can also send to query whether an OCP event has occurred on the specified channel. [:SOURce[<n>]]:CURRent:PROTection:CLEar • You can send to clear an OCP event that occurred on the specified channel. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 72: Source[]]:Voltage[:Level][:Immediate][:Amplitude]

    When UP or DOWN is selected, the command steps up or down the voltage by the step size set in [:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate]:STEP[:INCRement] :APPLy • You can also send to set the voltage and current for the specified channel. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 73: Source[]]:Voltage[:Level]

    <voltage> is the step size specified. DEFault is the default value. The default values of <voltage> are shown in the table below: Channel Default 0.001 V DP932A Standard 0.001 V 0.001 V DP932U/DP932E Standard 0.01 V Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 74: Source[]]:Voltage:protection:clear

    Before executing the command, make sure to remove the condition that caused the overvoltage protection on the specified channel (you can either decrease the output voltage to below the OVP level or increase the OVP level to be greater Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 75: [:Source[]]:Voltage:protection[:Level]

    You can send query whether an OVP event occurred on the specified channel. • If [:SOURce[<n>]] or [<n>] is omitted, the command sets the corresponding parameter of the channel currently selected. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 76: [:Source[]]:Voltage:protection:state

    OVP function of the specified channel. [:SOURce[<n>]]:VOLTage:PROTection[:LEVel] • You can also send to query the OVP level of the specified channel. Return Format The query returns 1 or 0. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 77: [:Source[]]:Voltage:protection:tripped

    :VOLT:PROT:TRIP? /*Queries whether an OVP event occurred on the current channel. The query returns 1.*/ 4.10 :STATus Commands :STATus commands are used to set and query the Questionable Status register and Operation Status register. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 78: Status:operation:condition

    Integer Refer to Remarks • The <value> is a decimal value, which corresponds to the binary-weighted sum of the bits to be enabled in the enable register of the Operation Status register. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 79: Status:operation[:Event]

    Examples :STAT:OPER? /*Queries the value of the event register of the Operation Status register.*/ 4.10.4 :STATus:PRESet Syntax :STATus:PRESet Description Sets the enable registers of the Questionable Status register to their power-on defaults. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 80: Status:questionable:enable

    The query returns a decimal value, which corresponds to the binary-weighted sum of the bits to be enabled in the enable register of the Questionable Status register. For example, the query might return +17. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 81: Status:questionable[:Event]

    > :STATus:QUEStionable:INSTrument:ENABle < :STATus:QUEStionable:INSTrument:ENABle? Description Enables the bits in the enable register of the Questionable Status register. Queries the enabled bits in the enable register of the Questionable Status register. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 82: Status:questionable:instrument[:Event]

    • The bits in the event register of the channel Questionable Status register are *CLS latched and reading the register will clear it. You can also send to clear the register. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 83: Status:questionable:instrument:isummary[]:Condition

    The output is in CV (constant voltage) mode. The output is in UR (unregulated) mode. Return Format The query returns +0, +1, +2, or +3. Examples :STAT:QUES:INST:ISUM1:COND? /*Queries the output mode of CH1. The query returns +1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 84: Status:questionable:instrument:isummary[]:Enable

    Questionable Status SUMMARY register. For example, the query might return +9. Examples :STAT:QUES:INST:ISUM1:ENAB 9 /*Queries bit0 (Voltage, CC mode) and bit3 (OCP, overcurrent protection) in the enable register of the Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 85: Status:questionable:instrument:isummary[][:Event]

    Questionable Status SUMMARY register. For example, the query might return +1. Examples :STAT:QUES:INST:ISUM1? /*Queries the value of the event register of the Questionable Status SUMMARY register for CH1. The query returns +1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 86: System Commands

    Return Format None. Examples None. 4.11.2 :SYSTem:BEEPer[:STATe] Syntax bool > :SYSTem:BEEPer[:STATe] < :SYSTem:BEEPer[:STATe]? Description Sets or queries the on/off state of the beeper. Parameter Name Type Range Default <bool> Bool {ON|OFF|1|0} OFF|0 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 87: System:brightness

    Return Format The query returns an integer, for example, 60. Examples :SYST:BRIG 60 /*Sets the screen brightness to 60%.*/ :SYST:BRIG? /*Queries the screen brightness. The query returns 60.*/ 4.11.4 :SYSTem:COMMunicate:LAN Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 88: System:communicate:lan:apply

    Before using the LAN interface, please use the network cable to connect the instrument to your PC or to the network of the PC. • The instrument provides three IP configuration modes: DHCP, Auto IP, and Manual IP. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 89: System:communicate:lan:dhcp[:State]

    Parameter Name Type Range Default <bool> Bool {0|1|ON|OFF} ON|1 Remarks • In DHCP mode, the DHCP server in the current network assigns network parameters (such as the IP address) to the instrument. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 90: System:communicate:lan:dns

    223 (except 127), and the other three range from 0 to 255. • It is recommended that you acquire a valid address from your network administrator. :SYSTem:COMMunicate:LAN:APPLy • After sending the command, execute apply the network parameters currently set. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 91: System:communicate:lan:ipaddress

    Return Format The query returns the IP address, for example, 172.16.3.128. Examples :SYST:COMM:LAN:DNS 172.16.3.128 /*Sets the IP address to 172.16.3.128.*/ :SYST:COMM:LAN:DNS? /*Queries the current IP address. The query returns 172.16.3.128.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 92: System:communicate:lan:gateway

    The query returns the default gateway, for example, 172.16.3.1. Examples :SYST:COMM:LAN:GATE 172.16.3.1 /*Sets the default gateway to 172.16.3.1.*/ :SYST:COMM:LAN:GATE? /*Queries the current default gateway. The query returns 172.16.3.1.*/ 4.11.4.7 :SYSTem:COMMunicate:LAN:MAC? Syntax :SYSTem:COMMunicate:LAN:MAC? Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 93: System:communicate:lan:manualip[:State]

    • When all the three configuration modes are set to "ON", the priority of parameter configuration is "DHCP", "Auto IP", and "Manual IP". Therefore, to use the Manual IP configuration mode, “DHCP Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 94: System:communicate:lan:smask

    255. • It is recommended that you acquire a valid subnet mask from your network administrator. • After sending the command, you must :SYSTem:COMMunicate:LAN:APPLy execute to apply the network parameters currently set. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 95: System:communicate:rlstate

    Return Format The query returns LOCal, REMote, or RWLock. Examples :SYSTem:COMMunicate:RLSTate REMote /*Sets the power supply to remote mode.*/ :SYSTem:COMMunicate:RLSTate? /*Queries the operation mode. The query returns REMote.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 96: System:error[:Next]

    0,“No error”. Examples None. 4.11.7 :SYSTem:KLOCk:STATe Syntax bool > :SYSTem:KLOCk:STATe < :SYSTem:KLOCk:STATe? Description Sets or queries the on/off state of remote lock. Parameter Name Type Range Default <bool> Bool {0|1|ON|OFF} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 97: System:language:type

    {EN|CH|DE|ES|FR} Remarks None. Return Format The query returns ENGLISH, CHINESE, GERMAN, SPANISH, or FRENCH. Examples :SYST:LANG:TYPE EN /*Sets the system language to English.*/ :SYST:LANG:TYPE? /*Queries the system language. The query returns ENGLISH.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 98: System:local

    You can send to return the power supply from local mode to remote mode. Return Format None. Examples None. 4.11.10 :SYSTem:POWEron Syntax :SYSTem:POWEron < poweron > :SYSTem:POWEron? Description Sets or queries the power-on setting. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 99: System:print

    Queries the byte stream of the current screen image. Parameter None. Remarks None. Return Format The query returns the hexadecimal string of the screen image in bitmap (*.bmp) format. Examples None. 4.11.12 :SYSTem:REMote Syntax :SYSTem:REMote Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 100: System:rwlock

    Bool {1|0|ON|OFF} 0|OFF Remarks • When the instrument operates in remote lock mode, all the keys on the front panel cannot be used except for the output on/off key of each channel Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 101: System:saver

    The query returns 1 or 0. Examples :SYST:SAV ON /*Enables the screen saver function.*/ :SYST:SAV? /*Queries the on/off state of the screen saver function. The query returns 1.*/ 4.11.15 :SYSTem:SYNC[:STATe] Syntax bool > :SYSTem:SYNC[:STATe] < :SYSTem:SYNC[:STATe]? Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 102: System:tmode

    Default <trackmode> Discrete {SYNC|INDE} INDE Remarks The tracking function is available for the specified channels (CH1 and CH2). You can select the track mode as required. This command functions the same :OUTPut:TRACk[:STATe] Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 103: System:tlock

    The touch screen cannot be used. Return Format The query returns 1 or 0. Examples :SYSTem:TLOCk ON /*Locks the touch screen.*/ :SYSTem:TLOCk? /*Queries whether the touch screen is locked. The query returns 1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 104: System:version

    >[,< value >] :TIMEr:CYCLEs < :TIMEr:CYCLEs? Description Sets or queries the repetition cycle for the channel currently selected. Parameter Name Type Range Default <cycle> Discrete {N|I} <value> Integer 1 to 99999 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 105: Timer:channel

    > :TIMEr:CHANNel < :TIMEr:CHANNel? Description Sets or queries the channel currently edited. Parameter Name Type Range Default <ch> Discrete {CH1|CH2|CH3} Remarks None. Return Format The query returns CH1, CH2, or CH3. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 106: Timer:endstate

    :TIME:ENDS LAST /*Sets the end state to “LAST”.*/ :TIME:ENDS? /*Queries the end state. The query returns LAST.*/ 4.12.4 :TIMEr:GROUPs:NUM? Syntax :TIMEr:GROUPs:NUM? Description Queries the number of output groups in the Arb editor. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 107: Timer:group:index

    If there is no data inserted in the current row, it automatically goes to the last group of data in the editor. Return Format The query returns the index number of the group currently edited, for example, 25. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 108: Timer:group:parameter

    Return Format The query returns a string starting with #. For example, the query might return #90000000371,0.500,1.000,1.0;2,5.500,2.000,1.0;; wherein. #9000000037 is the data block header, and 1,0.500,1.000,1.0;2,5.500,2.000,1,0; are the specified Arb parameters. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 109: Timer:group:delete

    <Groupcount> is the number of groups to be deleted. If not specified, it is 1 by default. Return Format None. Examples :TIMEr:GROUP:INDEx 25 /*Sets the index number of the group currently edited to 25./ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 110: Timer:run

    :TIMEr:RUN SINGle /*Sets the run type to single.*/ :TIMEr:RUN? /*Queries the run type. The query returns SINGle.*/ 4.12.9 :TIMEr[:STATe] Syntax bool > :TIMEr[:STATe] < :TIMEr[:STATe]? Description Sets or queries the run/stop state of the generator. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 111: Timer:templet:construct

    :TIME? /*Queries the run/stop state of the generator. The query returns 1.*/ 4.12.10 :TIMEr:TEMPlet:CONSTruct Syntax :TIMEr:TEMPlet:CONSTruct Description Sets the Arb parameters based on the template currently selected and the parameters set. Parameter None. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 112: Timer:templet:fallrate

    Examples :TIME:TEMP:FALLR 5 /*Sets the fall index of ExpFall to 5.*/ :TIME:TEMP:FALLR? /*Queries the fall index of ExpFall currently set. The query returns 5.*/ 4.12.12 :TIMEr:TEMPlet:INTErval Syntax value > :TIMEr:TEMPlet:INTErval < :TIMEr:TEMPlet:INTErval? Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 113: Timer:templet:invert

    4.12.13 :TIMEr:TEMPlet:INVErt Syntax bool > :TIMEr:TEMPlet:INVErt < :TIMEr:TEMPlet:INVErt? Description Sets or queries the on/off state of the invert function of the template currently selected. Parameter Name Type Range Default <bool> Bool {0|1|ON|OFF} Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 114: Timer:templet:maxvalue

    • “MINimum” and “MAXimum” indicate the minimum and maximum current/ voltage available. Return Format The query returns the maximum voltage or current of the template currently selected, for example, 5.000 or 5.300. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 115: Timer:templet:minvalue

    :TIME:TEMP:OBJ C,1.5 /*Sets the object to current and the voltage value to 1.5 V.*/ :TIME:TEMP:MINV 0.1 /*Sets the minimum current to 0.1 A for the selected template.*/ :TIME:TEMP:MINV? /*Queries the minimum current for the template currently selected. The query returns 0.100.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 116: Timer:templet:object

    :TIME:TEMP:OBJ V,2 /*Selects the editing object to voltage and sets the constant current to 2 A.*/ :TIME:TEMP:OBJ? /*Queries the editing object and the corresponding constant current or voltage value. The query returns V,2.000.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 117: Timer:templet:period

    The query returns a real number ranging from 0.1 to 3600, for example, 15.0. Examples :TIME:TEMP:PERI 15 /*Sets the Period to 15 s.*/ :TIME:TEMP:PERI? /*Queries the Period for the selected template. The query returns 15.0.*/ 4.12.18 :TIMEr:TEMPlet:POINTs Syntax value > :TIMEr:TEMPlet:POINTs < Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 118: Timer:templet:riserate

    The query returns 80.*/ 4.12.19 :TIMEr:TEMPlet:RISERate Syntax value > :TIMEr:TEMPlet:RISERate < :TIMEr:TEMPlet:RISERate? Description Sets or queries the rise index of ExpRise. Parameter Name Type Range Default <value> Integer 0 to 10 Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 119: Timer:templet:select

    Return Format The query returns SINE, PULSE, RAMP, UP, DN, UPDN, RISE, or FALL. Examples :TIME:TEMP:SEL UP /*Selects the Stair Up template.*/ :TIME:TEMP:SEL? /*Queries the template currently selected. The query returns UP.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 120: Timer:templet:symmetry

    Sets or queries the Positive Pulse Width of Pulse. Parameter Name Type Range Default <value> Real Up to 3600 s Remarks • Pulse width refers to the duration of high level within a period. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 121: Timer:templet:stair

    :TIMEr:TEMPlet:STAIr 30 /*Sets the number of steps between the maximum and minimum for StairUp to 30.*/ :TIMEr:TEMPlet:STAIr? /*Queries the number of steps between the maximum and minimum for StairUp. The query returns 30.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 122: Timer:trig

    :TRIGger Commands :TRIGger commands are used to enable and disable the trigger, set and query trigger conditions as well as the source under control and control source of the specified data line. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 123: Trigger:in[:Enable]

    :TRIG:IN? D1 /*Queries the on/off state of the trigger input function for D1. The query returns 1.*/ 4.13.2 :TRIGger:IN:IMMEdiate Syntax :TRIGger:IN:IMMEdiate Description As soon as the trigger system is initiated, the analog hardware will send the trigger signal immediately. Parameter None. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 124: Trigger:in:response

    The query returns ON, OFF, or ALTER. Examples :TRIG:IN:RESP D1,ON /*Sets the output response of D1 trigger input to OutOn.*/ :TRIG:IN:RESP? D1 /*Queries the output response of D1 trigger input. The query returns ON.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 125: Trigger:in:source

    The query returns CH1,CH2.*/ 4.13.5 :TRIGger:IN:TYPE Syntax d >,< type > :TRIGger:IN:TYPE < d > :TRIGger:IN:TYPE? < Description Sets or queries the trigger type of the trigger input for the specified data line. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 126: Trigger:out:polarity

    Parameter Name Type Range Default <d> Discrete {D1|D2|D3|D4} <pol> Discrete {POSitive|NEGative} POSitive Remarks • POSitive: The selected data line outputs 3.3 V high level signal when the control source is turned on. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 127: Trigger:out:source

    The query returns the name of the control source selected, for example, CH1. Examples :TRIG:OUT:SOUR D1,CH1 /*Sets the control source of D1 trigger output to CH1.*/ :TRIG:OUT:SOUR? D1 /*Queries the control source of D1 trigger output. The query returns CH1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 128: Trigger:out[:Enable]

    The query returns 0 or 1. Examples :TRIG:OUT D1,ON /*Enables the trigger output function of D1.*/ :TRIG:OUT? D1 /*Queries the on/off state of the D1 trigger output function. The query returns 1.*/ Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 129: Programming Examples

    Programming Preparations Before programming, you need to prepare the following tasks: http://www.rigol.com You can log in to the RIGOL official website ( ) to download the software. Then install the software according to the installation wizard. After Ultra Sigma is installed successfully, NI-VISA library will be completely installed automatically.
  • Page 130 Programming Examples 3. Click Show Block Diagram in the Window menu to create event structure. 4. Add events, including connecting instrument, write operation, read operation, and exit. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 131 Programming Examples a. Connect the instrument (including error processing): b. Write operation (including error judgment): Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 132 Programming Examples c. Read operation (including error processing): Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 133 Programming Examples d. Exit: Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 134: Visual Basic Programming Example

    2. Click Project > Add Module to open the Add Module dialog box. In the dialog box, click the Existing tab to search for the visa32.bas file in the include folder under the NI-VISA installation path and add the file. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 135 Dim list As Long Dim nmatches As Long Dim matches As String * 200 'Reserve the obtained device number Dim s32Disp As Integer ' Obtain the usb resource of visa Call viOpenDefaultRM(defrm) Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 136: Visualc++ Programming Example

    1. Create a MFC project based on a dialog box. 2. Click Project > Settings to open the Project Setting dialog box. In the dialog box, click the C/C++ tab, select Code Generation from the drop-down list under Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 137 C:\Program Files\IVI Foundation\VISA\WinNT\include. Click OK to close the dialog box. Select Library files from the drop-down list under Show directories for. Double click the empty space under Directories to enter the specified path of Library files: Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 138 Open the Data item in the Com box attribute and input the following command manually: *IDN? c. Open the General item in the Edit Box attribute and select Disabled. d. Name Button as Send and Read. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 139 #include <visa.h> of the VISA library in the header file and then add the following codes: ViSession defaultRM, vi; char buf [256] = {0}; CString s,strTemp; char* stringTemp; ViChar buffer [VI_FIND_BUFLEN]; ViRsrc matches="buffer"; Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
  • Page 140 9. Save, compile, and run the project to obtain a single exe file. When the instrument is correctly connected to the PC, enter a command (for example, *IDN?) and click Send and Read to execute the command. Then, the reading results will be returned. Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.

Table of Contents