UNI-T UTG2000B Series Programming Manual
UNI-T UTG2000B Series Programming Manual

UNI-T UTG2000B Series Programming Manual

Programmable signal source
Hide thumbs Also See for UTG2000B Series:

Advertisement

Programming manual
UTG2000B Series
Programming manual
UTG2000B Series programmable signal source
Instruments.uni-trend.com

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for UNI-T UTG2000B Series

  • Page 1 Programming manual UTG2000B Series Programming manual UTG2000B Series programmable signal source Instruments.uni-trend.com...
  • Page 2 Programming manual UTG2000B Series Warranties and representations copyright 2017 Excellent China Technology Co., Ltd. Trademark information UNI-Tis a registered trademark of Uni-Lead China Technology Co., Ltd. Document number 20230619 Software version V2.01.0010 Software upgrades may change or add product features, please pay attentionUNI-TWebsite to obtain the latest version of the manual or contactUNI-TUpgrade software.
  • Page 3: Introduction To Scpi Commands

    Programming manual UTG2000B Series Introduction to SCPI commands SCPI (Standard Commands for Programmable Instruments, Standard Command Set for Programmable Instruments) is based on the existing standards IEEE 488.1 and IEEE 488.2, and follows the floating point arithmetic rules in the IEEE754 standard and the ISO646 information exchange 7-bit encoding symbol (equivalent to ASCII programming) and other standardized instrument programming languages.
  • Page 4: Parameter Description

    Programming manual UTG2000B Series Parameter Description The parameters contained in the commands introduced in this manual can be divided into the following five types: Boolean, integer, real, discrete, and ASCII string. ● boolean The parameter value is "ON" (1) or "OFF" (0). For example: :SYSTem:LOCK {{1 | ON} | {0 | OFF}}.
  • Page 5 ⮚ Return format: Manufacturer name, Product number, Product Serial Number, Software version numbers separated by dots. Notice:The returned model number must be consistent with the nameplate information. ⮚ Example: UNI-T Technologies, UTG2000, 000000001, 00.00.01 *RST ⮚ Command format: *RST ⮚...
  • Page 6 Programming manual UTG2000B Series :SYSTem:CONFigure? The query returns the current configuration file data binary stream of the signal source. :SYSTem:LANGuage ⮚ Command format: :SYSTem:LANGuage {ENGLish|SIMChinese|TRAChinese} :SYSTem:LANGuage? ⮚ Function description: Controls the system display language. ⮚ Return format: The query returns the system display language.
  • Page 7 Programming manual UTG2000B Series :SYSTem:NUMBer:FORMat {COMMa|SPACe|NONe} :SYSTem:NUMBer:FORMat? ⮚ Function description: Delimiter that controls system number format ⮚ Return format: The query returns the delimiter for the system number format. ⮚ Example: :SYSTem:NUMBer:FORMat NONe Set systemless number format :SYSTem:NUMBer:FORMat? The query returns NONe :SYSTem:BRIGhtness ⮚...
  • Page 8 Programming manual UTG2000B Series ⮚ Example: :SYSTem:CYMometer:PERiod? The query returns 2e-3 :SYSTem:CYMometer:DUTY? ⮚ Command format: :SYSTem:CYMometer:DUTY? ⮚ Function description: Gets the currently measured duty cycle of the frequency meter. ⮚ Return format: The query returns the currently measured duty cycle of the frequency meter, returning the data in scientific notation.
  • Page 9 Programming manual UTG2000B Series :CHANnel1:MODE? Query returns MODulation :CHANnel<n>:OUTPut ⮚ Command format: :CHANnel<n>:OUTPut {{1 | ON} | {0 | OFF}} :CHANnel<n>:OUTPut? ⮚ Function description: Set to turn on or off the output of the specified channel. <n>: Channel number, n takes the value 1 or 2.
  • Page 10 Programming manual UTG2000B Series The query returns the output amplitude unit of the specified channel. ⮚ Example: :CHANnel1:AMPLitude:UNIT VPP Set the output amplitude unit of channel 1 to VPP :CHANnel1:AMPLitude:UNIT? Query returns VPP :CHANnel<n>:LOAD ⮚ Command format: :CHANnel<n>:LOAD <resistance> :CHANnel<n>:LOAD? ⮚...
  • Page 11 Programming manual UTG2000B Series The query returns the limiting status of the specified channel. ⮚ Example: :CHANnel1:LIMit:ENABle ON Set up channel 1 limiter :CHANnel1:LIMit:ENABle? The query returns 1 :CHANnel<n>:LIMit:LOWer ⮚ Command format: :CHANnel<n>:LIMit:LOWer {<voltage>} :CHANnel<n>:LIMit:LOWer? ⮚ Function description: Set the specified channel limiting lower limit value.
  • Page 12 Programming manual UTG2000B Series ⮚ Function description: Sets the specified channel coupling type. This command is only valid when the channel coupling switch is turned on. <m>: Channel number, m takes the value 1. 1 means one and two channel coupling ⮚...
  • Page 13 Programming manual UTG2000B Series Query returns channel coupling frequency deviation , returns scientific notation. ⮚ Example: deviation to 100Hz :CHANnel:COUPle1:FREQuency:DEV 100 Set 2-channel to 1-channel coupling :CHANnel:COUPle1:FREQuency:DEV? Return 1e+2 :CHANnel:COUPle<m>:PHASe ⮚ Command format: :CHANnel:COUPle<m>:PHASe {{0 | OFF}} :CHANnel:COUPle<m>:PHASe ⮚ Function description: Set the channel phase coupling to off, and the channel only has channel 1 and 2 coupling.
  • Page 14 Programming manual UTG2000B Series :CHANnel:COUPle<m>:AMPLitude ⮚ Command format: :CHANnel:COUPle<m>:AMPLitude {{0 | OFF}} :CHANnel:COUPle<m>:AMPLitude ⮚ Function description: Set the channel amplitude coupling to off, and the channel only has channel 1 and 2 coupling. This command is only valid when the channel coupling switch is turned on.
  • Page 15 Programming manual UTG2000B Series ⮚ Function description: Set the PN code of the specified channel. This command is valid for the waveforms of the PN code function under biphase shift keying modulation, quadrature phase shift keying modulation and quadrature modulation.
  • Page 16 Programming manual UTG2000B Series ⮚ Return format: The query returns the trigger output status of the specified channel. ⮚ Example: :CHANnel1:TRIGger:OUTPut ON Set channel 1 trigger output to open :CHANnel1:TRIGger:OUTPut? The query returns 1 :CHANnel<n>:TRIGger:OUTEdge ⮚ Command format: OUTEdge { RISe|FALL} :CHANnel<n>:TRIGger:...
  • Page 17 Programming manual UTG2000B Series :CHANnel<n>:BASe:PERiod ⮚ Command format: :CHANnel<n>:BASe:PERiod { <period>} :CHANnel<n>:BASe:PERiod? ⮚ Function description: Set the output period of the specified channel. <period> represents period, unit S. If it is a sine wave: the range is (16.7ns ~ 1000000s) <n>: Channel number, n takes the value 1 or 2.
  • Page 18 Programming manual UTG2000B Series :CHANnel<n>:BASe:OFFSet { <voltage>} :CHANnel<n>:BASe:OFFSet? ⮚ Function description: Set the output DC offset of the specified channel. <voltage> represents voltage, unit V. The range is: 0~±maximum DC under current load. Maximum DC under current load = current load*10/(50+current load) - current AC minimum value/2;...
  • Page 19 Programming manual UTG2000B Series :CHANnel1:BASe:PWIDth 0.0004 Set the pulse width of channel 1 signal output to 400us :CHANnel1:BASe:PWIDth? The query returns 4.000000e-04 :CHANnel<n>:BASe:DUTY ⮚ Command format: :CHANnel<n>:BASe:DUTY { <duty>} :CHANnel<n>:BASe:DUTY? ⮚ Function description: Set the specified channel signal output duty cycle.
  • Page 20 Programming manual UTG2000B Series <n>: Channel number, n takes the value 1 or 2. ⮚ Return format: The query returns the rising edge pulse width of the specified channel signal pulse wave, using scientific notation. ⮚ Example: :CHANnel1:PULSe:RISe 0.002 Set the rising edge pulse width of channel 1 signal to 2ms...
  • Page 21 Programming manual UTG2000B Series :CHANnel<n>: HARMonic:USER:TYPe? ⮚ Command format: :CHANnel<n>:HARMonic:USER:TYPe #H<order> :CHANnel<n>:HARMonic:USER:TYPe? ⮚ Function description: Set the custom harmonic type of the specified channel. < order >: Custom harmonic type, #H represents hexadecimal number. X0111 1111 1111 1111 bits represent harmonic switches respectively.
  • Page 22 Programming manual UTG2000B Series <phase>: Phase value, unit °. <n>: Channel number, n takes the value 1 or 2. <m>: Harmonic order, m ranges from 2 to 16. ⮚ Return format: The query returns the phase value of the specified harmonic order in the specified channel, using scientific notation.
  • Page 23 Programming manual UTG2000B Series <n>: Channel number, n takes the value 1 or 2. ⮚ Return format: The query returns the expression of the specified channel expression signal, returned in string form. ⮚ Example: EXPStr "sin(x)" :CHANnel1:EXP: sets the expression of the channel 1 expression signal to sin(x)
  • Page 24 Programming manual UTG2000B Series :CHANnel<n>:MODulate:SOURce ⮚ Command format: :CHANnel<n>:MODulate:SOURce { INTernal|EXTernal } :CHANnel<n>:MODulate:SOURce? ⮚ Function description: Set the specified channel modulation source, internal and external. <n>: Channel number, n takes the value 1 or 2. ⮚ Return format: The query returns the modulation source of the specified channel.
  • Page 25 Programming manual UTG2000B Series <source>: {LOCal|INTernal|EXTernal}, respectively local, internal and external. <filename>: arbitrary waveform file name. ⮚ Example: :CHANnel1:MODulate:ARB LOCal, "test.bsv" :CHANnel<n>:MODulate:DEPTh ⮚ Command format: :CHANnel<n>:MODulate:DEPTh { <depth>} :CHANnel<n>:MODulate:DEPTh? ⮚ Function description: Sets the modulation depth of the specified channel.
  • Page 26 Programming manual UTG2000B Series :CHANnel<n>:PM:PHASe:DEV? ⮚ Function description: Set the output phase deviation of the specified channel. <phase> represents phase offset, unit °, range 0~360. <n>: Channel number, n takes the value 1 or 2. ⮚ Return format: The query returns the output phase offset of the specified channel, using scientific notation.
  • Page 27 Programming manual UTG2000B Series The query returns the phase shift keying phase value of the specified channel, and the data is returned in scientific notation. ⮚ Example: :CHANnel1:PSK:PHAS1 90 Set channel one output phase to 90° :CHANnel1:PSK:PHAS1? The query returns 9e+1 :CHANnel<n>:OSK:TIMe...
  • Page 28 Programming manual UTG2000B Series :CHANnel<n>:SWEep:FREQuency:STOP ⮚ Command format: : SWEep:FREQuency:STOP <freq> :CHANnel<n> :CHANnel<n>:SWEep:FREQuency:STOP? ⮚ Function description: Sets the cutoff frequency of the specified channel sweep. <freq> represents frequency in Hz. <n>: Channel number, n takes the value 1 or 2.
  • Page 29 Programming manual UTG2000B Series :CHANnel1:BURSt:TYPe NCYC Set channel one channel N period burst :CHANnel1:BURSt:TYPe? Query returns NCYC :CHANnel<n>: BURSt:SOURce ⮚ Command format: BURSt :SOURce {INTernal| EXTernal| MANual} :CHANnel<n>: BURSt :SOURce? :CHANnel<n>: ⮚ Function description: Set the burst source of the specified channel. This command is only valid for frequency sweep and burst functions.
  • Page 30 Programming manual UTG2000B Series <phase> represents phase, unit °. The range is: 0 ~ 360 <n>: Channel number, n takes the value 1 or 2. ⮚ Return format: The query returns the burst phase of the specified channel and returns the data in scientific notation.
  • Page 31 Programming manual UTG2000B Series CHANnel<n> :BURSt:TRIGger ⮚ Function description: Trigger the specified burst output. This parameter is only valid when the trigger mode is set to manual trigger. ⮚ Example: CHANnel1 :BURSt:TRIGger Trigger a burst signal output :CHANnel<n>:BURSt: DELAy ⮚...
  • Page 32 Programming manual UTG2000B Series :DISPlay:DATA? ⮚ Command format: :DISPlay:DATA? ⮚ Function description: Used to query the image data of the current device screen. ⮚ Return format: Query returnsimage data,The returned data conforms to the IEEE 488.2 # format of binary data.
  • Page 33 Programming manual UTG2000B Series Explanation of Programming This chapter is to describe troubleshooting in process of programming. If you meet any of the following problems, please handle them according to the related instructions. Programming Preparation Programming preparation is only applicable for using Visual Studio and LabVIEW development tools to programming under Windows operating system.
  • Page 34 Programming manual UTG2000B Series VISA Programming Example There are some examples in this section. Through these examples, user can know how to use VISA, and it can combine with the command of programming manual to realize the control of the instrument.
  • Page 35 Programming manual UTG2000B Series Select "Linker-General" in attribute dialog on the left side, set the value of "Additional Library Directories" to visa32.lib, as shown in the following figure. Add file visa.h in projectname.cpp file #include <visa.h> Source code USBTMC Example int usbtmc_test() { /** This code demonstrates sending synchronous read &...
  • Page 36 Programming manual UTG2000B Series * Try to Read a Response With viScanf * Close the VISA Session*/ ViSession defaultRM; ViSession instr; ViUInt32 numInstrs; ViFindList findList; ViStatus status; char instrResourceString[VI_FIND_BUFLEN]; unsigned char buffer[100]; int i; status = viOpenDefaultRM(&defaultRM); if (status < VI_SUCCESS) printf("Could not open a session to the VISA Resource Manager!\n");...
  • Page 37 Programming manual UTG2000B Series printf("Error reading a response from the device %d. \n", i + 1); else printf("\nDevice %d: %s\n", i + 1, buffer); status = viClose(instr); /*Now we will close the session to the instrument using viClose. This operation frees all system resources.*/...
  • Page 38 Programming manual UTG2000B Series printf("Please input IP address:"); char ip[256]; fflush(stdin); gets(ip); tcp_ip_test(ip); return 0; C# Example Environment: Window system, Visual Studio  Description: Access the instrument via USBTMC and TCP/IP, and send "*IDN?" command on NI-  VISA to query the device information.
  • Page 39 Programming manual UTG2000B Series System.Console.WriteLine(ex.Message); void Main(string[] args) tcp_ip_test("192.168.20.11"); VB Example Environment: Window system, Microsoft Visual Basic 6.0.  Description: Access the instrument via USBTMC and TCP/IP, and send "*IDN?" command on NI-  VISA to query the device information.
  • Page 40 Programming manual UTG2000B Series Dim retCount AsLong Dim status AsLong Dim instrResourceString AsString *VI_FIND_BUFLEN Dim Buffer AsString * MAX_CNT Dim i AsInteger ' First we must call viOpenDefaultRM to get the manager ' handle. We will store this handle in defaultRM.
  • Page 41 Programming manual UTG2000B Series ' Now we will close the session to the instrument using ' viClose. This operation frees all system resources. status = viClose(defaultRM) usbtmc_test = 0 EndFunction TCP/IP Example PrivateFunction tcp_ip_test(ByVal ip AsString) AsLong Dim outputBuffer AsString * VI_FIND_BUFLEN...
  • Page 42 Programming manual UTG2000B Series Communication with the device via TCP/IP is similar with USBTMC, it need to set VISA write and read function to synchronous I/O, set LabVIEW to asynchronous IO by default. Right click on the node and select "Synchronous I/O Mode>>Synchronous" from shortcut menu to enable synchronous writing or reading of data, as shown in the following figure.
  • Page 43 Programming manual UTG2000B Series %Create a VISA-USB object connected to a USB instrument vu = visa('ni','USB0::0x5345::0x1234::SN20220718::INSTR'); %Open the VISA object created fopen(vu); %Send the string "*IDN?",asking for the device's identification. fprintf(vu,'*IDN?'); %Request the data outputbuffer = fscanf(vu); disp(outputbuffer); %Close the VISA object fclose(vu);...
  • Page 44 Programming manual UTG2000B Series import pyvisa rm = pyvisa.ResourceManager() rm.list_resources() my_instrument = rm.open_resource('TCPIP0::192.168.20.11::inst0::INSTR') print(my_instrument.query('*IDN?')) 44 / 49 Instruments.uni-trend.com...
  • Page 45 Programming manual UTG2000B Series Programming Application Example Configuring Sine Wave This section is to introduce how to configure the sine wave function. Explanation A sine wave has an amplitude, an offset, and a phase relative to a synchronous pulse. It can use high voltage value and low voltage value to set its amplitude and deviation.
  • Page 46 Programming manual UTG2000B Series The following command can generate the square wave as shown above. :CHANnel1:MODe CONTinue :CHANnel1:BASE:WAVe SQUare :CHANnel1:BASE:FREQuency 40000 :CHANnel1:BASE:AMPLitude 2 :CHANnel1:BASE:OFFSet 0 :CHANnel1:BASE:PHAse 90 :CHANnel1:BASE:DUTY 20 :CHANnel1:OUTPut ON Configuring Sawtooth Wave This section is to introduce how to configure the sawtooth wave.
  • Page 47 Programming manual UTG2000B Series :CHANnel1:BASE:WAVe RAMP :CHANnel1:BASE:FREQuency 30000 :CHANnel1:BASE:HIGH 2 :CHANnel1:BASE:LOW 0 :CHANnel1:BASE:PHAse 90 :CHANnel1:RAMP:SYMMetry 20 :CHANnel1:OUTPut ON Configuring Impulse Wave This section is to introduce how to configure the impulse wave. Explanation An impulse wave has an amplitude, an offset, and a phase relative to a synchronous pulse. It also adds slope of edge and duty cycle (or pulse width).
  • Page 48 Programming manual UTG2000B Series :CHANnel1:MODe CONTinue :CHANnel1:BASE:WAVe ARB :CHANnel1:ARB:MODe DDS :CHANnel1:BASE:ARB INTernal,"ACos.bsv" :CHANnel1:BASE:FREQuency 200000 :CHANnel1:BASE:AMPLitude 2 :CHANnel1:BASE:OFFSet 0 :CHANnel1:BASE:PHAse 90 :CHANnel1:OUTPut ON The wave generate by the above command as shown below. 48 / 49 Instruments.uni-trend.com...
  • Page 49: Appendix 1: List

    Programming manual UTG2000B Series Appendix 1: <key> list key command Function description LED light keyword √ Channel one button √ Channel 2 button RIGHT Arrow key right LEFT Arrow key left Enter SYMBOL numeric key symbols NUM0 Numeric key 0...

This manual is also suitable for:

Utg2122b

Table of Contents