Uni-t Utd2000cex-digital Oscilloscope Voltage Meter User Manual

Uni-t Utd2000cex-digital Oscilloscope Voltage Meter User Manual

UNI-T UTD2000CEX-Digital Oscilloscope Voltage Meter

Version

VersionModified Item
V1.0Official version
V1.1Add table definitions for each code in the appendix;
Add the description of typical case
V1.2Improved the description of capture waveform command
V1.3Improved the description of channel switch and trigger level

Statement

  1. All the command of file must issue by interface UCI of uci.dll, the detailed description refer to UCI Help Document.pdf
  2. All the character instruction is not case-sensitive
  3. UCI interface
    [C:DSO][D:DSO-X][T:USB][PID:0x5537][VID:0x4348][EI:0x82][EO:0x2][CFG:1][I:0] Or use UCI interface to query device address
  4. Connect with several similar devices, use UCI interface to query the unique device address.

Instruction Set

IDN?

Query device name
Data format :display name %internal information #SN serial number
Data size : 50Bytes

For example:
UTG2102CEX%**#SN005

Communication Protocol Version

Query the version number of system information, to check whether the protocol interface is support.

Command NameCommand ParameterCommand Parameter Type
CVer?;nonenone

Example:
“CVer?;”
Interface:
Use interface uci_Read to read data。
Data size is 50bytes.
Data:
1,BG, 100M,1GS,2CH

Keypad
Command NameCommand ParameterCommand Parameter Type
KEYKey valueString : the abbreviation of keypad name
Keypad NameMeaning
ATAUTO
RSRUN/STOP
TM*MENU(trigger menu)
FCFORCE
HPHELP
VM*MENU(window setting menu)
STZSET TO ZERO
MTMATH
C1CH1
C2CH2
F1F1
F2F2
F3F3
F4F4
F5F5
PSPrScrn(screenshot)
MEAMeasure
CSRCursor
ACQAcquire
DISPDisplay
STGStorage
UTILUtility
FKNFunction Knob
FKNLFunction Knob Left Rotation
FKNRFunction Knob Right Rotation
VKNLVertical Position Knob Left Rotation
VKNRVertical Position Knob Right Rotation
HKNLHorizontal Position      Knob Left Rotation
HKNRHorizontal Position Knob Right Rotation
TGKNLTrigger Position Knob Left Rotation
TGKNRTrigger Position Knob Right Rotation
VBKNLVoltage Base Knob Left Rotation
VBKNRVoltage Base Knob Right Rotation
TBKNLTime Base Knob Left Rotation
TBKNRTime Base Knob Right Rotation
Attribute NameMeaningIOData
LockLock the keyWNo data
UnlockUnlock the keyWNo data
Lock?Query key statusRInteger(4B): 0 – unlock; 1 – locked

Example

“KEY:AT;”
“KEY:C1;”
“KEY:MATH;”
“KEY:FKN;” -> push
“KEY:FKNL;” -> functional knob increase
“KEY:FKNR;” -> functional knob decrease
“KEY:FKNL@lock;” -> functional knob increase - locked

Due to different device has different key name, the abbreviation is to avoid the difference!
Use local command to lock/unlock full qwerty(the same as UPO2000CS).
Command with question mark should read by interface uci_Read.

Screenshot

Command NameCommand ParameterCommand Parameter Type
PrtScnImage data formatString: bmp {BMP file}

For Example:
BMP file: “PrtScn:bmp;”
Notes:
PrtScn:bmp;” use interface uci_Readbuffer area size can set to 387072,read 8 bits BMP file.

Configuration Data of Read and Write

Command NameCommand ParameterCommand Parameter Type
dconfignonenone

For Example:
“dconfig;”
Description:
Please save the file by yourself. If time-out, it can set the long timing of overtime.
Interface:
Use interface uci_Read to read data,Use interface uci_Write to write data. Read data size can set to 1024,the actual size get from returned value.

Running Status

Command NameCommand ParameterData
ProcRunning status setupEnum<string> : STOP/RUN/AUTO
Proc?Query running statusEnum<string> : STOP/RUN/ARMD/READY/TRIGD/AUTO/SCAN/OVER/RESET
{ STOP/RUN/ARMED/READY/TRIGED/AUTO/SCAN/OVER/RESET }

For Example:

query:“Proc?;”
setup:“Proc:Stop;”           “Proc:AUTO;”
Notes:
The difference of “Proc:Stop”, “Proc:Run” and button “RUN/STOP”:

It is different from button function of “RUN/STOP”. Hereon “RUN” put DSO at RUN status whatever the current condition is. “STOP” is the same.

Channel Control

Command NameMeaningIODataRemark
CHSel?query the current selected channelRChannel number:0/1/2/3/4
{CH1/ CH2/ MATH/ REF-A/ REF-B }
selected     channel      setup

use:“CH:0@SEL;”

The Basic(Common)Attribute
Command NameCommand ParameterCommand Parameter TypeRemark
 CHChannel numberStart from 0 to number channel, integer value. 0:CH1;1:CH2Channel number is for the command to point out which channel to process
Attribute NameMeaningIOData
ENON/OFFWREnum(Integer): 0/1{OFF/ON }
SELSelect (set or query select status of the current channel)WRW:none {command type} R:Enum(Integer): 0/1{ON/OFF}
VPVertical position of channelWRInteger : position value,the middle of screen is 128,up to plus down to minus, one grid is 25.
HPPre-trigger position (horizontal adjustment)WRInteger : position value,the middle of screen is 350,left to plus right to minus, one grid is 50.
TBTime Base(time base)WRW: Enum(String) : +/- {plus/minus one grid } or current value
R : Double(8Bytes), current value in US unit
VBVoltage BaseWRW: Enum(String) : +/- { plus/minus one grid } or voltage value
R : Double(8Bytes), power source in V unit
STZVPOS and HPos set to zeroWnone {command type}
Support Voltage Base
1mV10mV100mV1V10V
2mV20mV200mV2V20V
5mV50mV500mV5V
10ns100ns1us10us100us1ms10ms100ms1s10s
2ns20ns200ns2us20us200us2ms20ms200ms2s20s
5ns50ns500ns5us50us500us5ms50ms500ms5s50s

Voltage base and the current base command written numeric value and unit directly, for example 100mv:
“CH:0@VB:100MV”,“CH:0@TB:500US;”,unit is not case-sensitive.

For Example:
Channel number:0/1/2/3/4{CH1/ CH2/ MATH/ REF-A/ REF-B }
setup:
“CH:0@EN:1@VP:128@HP:350@VB:100MV@TB:500US;”
“CH:2@EN:1;” — open MATH channel
“CH:2@VP:128;” — adjust the vertical position of MATH channel to 128
“CH:2@SEL;” — select MATH channel
query:
“CH:0@VP;”
“CH:0@TB;”
“CH:0@TBV;”

Notes:

  1. The command protocol of basic command and physical channel:
    The command name of basic command and physical channel both use “CH”, format is “CH: channel id@Attribute:Value;” the basic command is suitable for physical channel, MATH,REF, distinguish by channel ID;
  2. CH command and channel number should be command parameter, otherwise it be the wrong command format;
  3. If selected channel does not open when executing command “@SEL;” return error “channel doesn’t open”;
  4. If it is a physical channel(CH1/ CH2),“@VB” in fine tuning(set by “@ VD”) can only set by the way of “Enum(String) : +/- {plus/minus one grid }”, get the actual voltage base information from command “@VB”.

Physical Channel

Command NameCommand ParameterCommand Parameter TypeRemark
CHChannel numberStart    from     0     to    number channel, integer valueChannel number is for the command to point out which channel to process
Attribute NameMeaningIOData
CPCoupling(channel coupling)WREnum(String): D/A/G{DC/AC/GND}
BWBW limit(bandwidth limit)WREnum(String): Enum(Integer): 0/1{ON/OFF}
VDVolts/Div(coarse/fine tuning of amplitude)WREnum(String): C/F{Coarse/Fine}
ProbeProbe(probe ratio)WREnum(Decimals): 1/10/100/1000
InvertInvert(inverse)WREnum(Integer): 0/1{ON/OFF}

For Example:

“CH:0@CP:D@BW:0@VD:C@Probe:1@invert:0;”

Notes:

  1. “CH:0;” this is an invalid command,selected channel should use command “CH:0@SEL;”
  2. Read attribute, buffer area is 10 bytes at least, return character string, coding format of character string is based on compiler. If it is UNICODE, return character string of UNICODE coding.

Frequency Meter

Command NameCommand ParameterCommand Parameter TypeRemark
cmeter
Attribute NameMeaningIOData
ENEnable(on/off)WREnum(Integer<2Bytes>): 0/1
Freq?Frequency valueRDouble<8Bytes>, in Hz unit

For Example:
“cmeter@en:1;”
“cmeter@freq?;” – read frequency value

Notes:

  1. Frequency meter measure the channel frequency that is corresponding to trigger source.
  2.  Frequency meter is hardware measurement; the accuracy is higher than frequency parameter measurement in parameter measurement.

Parameter Measurement

Command NameCommand ParameterCommand Parameter TypeRemark
MeaSee the follow tableCharacter string
Command ParameterMeaningIOData
allPackaging read measured

parameter

RData see MeasureParamPacket_UTD2000CEX, or use the way below, read measured parameter alone
All?Packaging read

measured parameter

RRead     united     data MeasureDataPacket

Structure of all oscilloscope.  Data   See

freqFreqRDouble<8Bytes>
CycleCycleRDouble<8Bytes>
rtimeRiseRDouble<8Bytes>
ftimeFallRDouble<8Bytes>
pwidth+WidthRDouble<8Bytes>
nwidth-WidthRDouble<8Bytes>
oshootOvershootRDouble<8Bytes>
pshootPreshootRDouble<8Bytes>
pduty+DutyRDouble<8Bytes>
nduty-DutyRDouble<8Bytes>
avgAverageRDouble<8Bytes>
vppPeakRDouble<8Bytes>
rmsRMSRDouble<8Bytes>
highHighRDouble<8Bytes>
lowLowRDouble<8Bytes>
midMiddleRDouble<8Bytes>
maxMaxRDouble<8Bytes>
minMinRDouble<8Bytes>
ampAmplitudeRDouble<8Bytes>
Attribute NameMeaningIOData
srcMeasurement sourceWREnum(Integer<2Bytes>): 0/1 {CH1/CH2}

For Example:
“mea:freq;”               — read frequency value;
“mea:all;”                  — packaging read measured parameter
“mea:all?;”                 — packaging read all measured parameters(common)
“mea@src:0;”           — set measurement source as CH1;

Code Example:

Read parameter alone:

double dv = 0.0;
r = uci_ReadX(m_session, _T(“mea:freq”), 1000, (byte*)&dv, sizeof(dv));
if (UCISUCCESS(r)) {
printf(“Freq = %f”, dv);
}

Packaging read all parameters:

namespace cb = comAPICommon;//comAPICommon alias

void Test_MeasureParams_DSO() {
comAPICommon::MeaValue params[50];

auto r = uci_ReadX(m_session, _T(“mea:all?;”), 2000, (byte*)params, sizeof(params));
ASSERT(r >= 0);
PrintMeasureParams(params);
};
void PrintMeasureParams(comAPICommon::MeaValue* _p) {

void PrintMeasureParams(comAPICommon::MeaValue* _p) {
printf(“\n+++++++++++++++++++++++++++++++++++++++++++++++++++\n”);
PrintMeaParam(_p[cb::MP_FREQ], “freq”);
PrintMeaParam(_p[cb::MP_PERIOD], “period”);

PrintMeaParam(_p[cb::MP_NDUTY], “NDUTY”);
PrintMeaParam(_p[cb::MP_PDUTY], “PDUTY”);

PrintMeaParam(_p[cb::MP_MAX], “MAX”);
PrintMeaParam(_p[cb::MP_MIN], “MIN”);

PrintMeaParam(_p[cb::MP_PKPK], “VPP”);
PrintMeaParam(_p[cb::MP_RMS], “RMS”);

PrintMeaParam(_p[cb::MP_OVERSHOOT], “OVERSHOOT”);
PrintMeaParam(_p[cb::MP_PRESHOOT], “PRESHOOT”);

PrintMeaParam(_p[cb::MP_AMP], “AMP”);

PrintMeaParam(_p[cb::MP_RISE_TIME], “RISE_TIME”);
PrintMeaParam(_p[cb::MP_FALL_TIME], “FALL_TIME”);
printf(“\n—————————————————-“);
}

void PrintMeaParam(const comAPICommon::MeaValue& _p, const char * _name) {
printf(“%s = “, _name);
if (_p.IsExist) {
if (_p.IsValid) {
printf(“%f “, _p.Value);
} else {
printf(“–“);
}
} else {
printf(“NotExit”);
}
printf(” %s%s\n”, unit::uci_UnitFindScaleName(_p.Unit.Scale),

unit::uci_UnitFindTypeName(_p.Unit.Type));
}
The structure and description of MeaValue see: MeasureDataPacket

Capture Waveform Data

Command NameCommand ParameterCommand Parameter Type
Capture waveWaveform formatString:.bin /.csv/.sav {binary system data/CSV file/built-in waveform file in oscilloscope}
Command NameCommand ParameterCommand Parameter Type
Capture waveWaveform formatString:.bin /.csv/.sav {binary system data/CSV file/built-in waveform file in oscilloscope}

For Example:

“capture wave:.bin@CH:0@DT:AD;” — read waveform data of CH1, AD value
“capture wave:.bin@CH:0@DT:vol;” — read waveform data of CH1, voltage value
“capture wave:.csv@CH:0@DT:vol;” — read waveform data of CH1, voltage value, keep in CSV file
(only use uci_ReadToFileX)
“capture wave:.sav@CH:0;” — read waveform data of CH1 (.sav file)

Description:

  1. “.bin” and ”.csv“ file must include:@CH:0” and“@DT:”attribute,and ”.sav” file must include @CH:0 attribute;
  2. This waveform data is the initial data, not display data((there are only a few hundred points),it can use in
    waveform analysis task;
  3. It can use read parameter interface{uci_Read or uci_ReadX}or read file interface{uci_ReadToFile or uci_ReadToFileX},
    the former keep data in buffer are of in-memory, the latter keep data in hard disk file(if it is UCI_DEMO.EXE
    program,please correct the corresponding suffix name.)
  4. When use read interface uci_ReadX:
    “capture wave:.bin@CH:0@DT:AD;” received the buffer area size of data:≥64000Bytes
    “capture wave:.bin@CH:0@DT:vol;” received the buffer area size of data:≥128000Bytes
    “capture wave:.sav@CH:0;” received the buffer area size of data:≥64000Bytes
    Notes:the final actual valid data size, it confirmed by interface uci_ReadX returned value.
  5. sav file is belong to internal format; it can open by waveform analysis of upper computer or parse by protocol.
  6. Waveform data format:
    a) AD value : 16 bits short type, a waveform point of waveform data;
    b) VOL value,that is voltage value, zero point based on channel base line

Trigger System

Command NameCommand ParameterCommand Parameter TypeRemark
trig
Attribute NameMeaningIOData
tTypeWEnum(String) : E/V /P{ EDGE/VIDEO/PLUSE WIDTH }
srcTrigger sourceWEnum(String) : c1/c2 /ext/ac/alt{ CH1/CH2/EXT/AC LINE/ALTER }
modeTrigger modeWEnum(String) : A/ N /S{ AUTO/NORMAL/SINGLE }
cpTrigger couplingWEnum(String) : D/A/H/L { DCl / AC /H Restrain /L H Restrain }
posTrigger modeWIngeger<2Bytes>: zero point based on channel base line,up to

positive down to negative, each grid is 25;

stEdge trigger slope typeWEnum(String) : F / R /A{ Fall / Rise/Rise and Fall }

For Example:
“trig@t:e;” — set trigger type as edge trigger;
“trig@pos:25;” — set trigger level higher one grid than base line, if voltage base is 1V, then trigger voltage is
1V;
(If need to set voltage value of trigger level, convert it as the above-mentioned by yourself)

【Basic】 Written Parameter

Parameter address in this command is digital coding; it need refer to the command coding definition in file comApiDef.h This command is to compatible the old protocol.

Command NameCommand ParameterCommand Parameter TypeRemark
wp
Attribute NameMeaningIOData
CHChannel numberWEnum(Integer<2Bytes>): 0/1     {CH1/CH2}
addrParameter              address(command number)WSee definition CONTROL_CMD in file comApiDef.h

For Example:
“WP@CH:0@ADDR:950:;” — set DISPLAY parameter
Notes:
“@CH” and “@addr” must use at the same time

【Basic】 Read Parameter

Parameter address in this command is digital coding; it need refer to the command coding definition in file comApiDef.h This command is to compatible the old protocol.

Command NameCommand ParameterCommand Parameter TypeRemark
rp
Command NameCommand ParameterCommand Parameter TypeRemark
rp

For Example:
“RP@CH:0@ADDR:951:;” — read DISPLAY parameter
Notes:
“@CH” and “@addr” must use at the same time

Case

Measure signal frequency and amplitude parameter

Method

  1. Use parameter measure function to test signal, including frequency, amplitude, cycle etc. The detailed see Measure function: Parameter measurement
  2. Use UTILITY->frequency meter to test signal frequency:Frequency Meter

Difference:

  1. MEASURE is software measurement, frequency meter is hardware measurement, frequency meter test accuracy is higher;
  2. Frequency meter test the signal source that is the corresponding signal of trigger source; parameter measurement test signal source that is source only can set in parameter measurement.
After the trigger channel is triggered, capture waveform data of the channel that is to be tested, and then deep analysis

For example:CH1 is the signal test channel which to connect with test source. CH2 is the trigger channel which to connect with trigger signal, it is usually user-defined. The aim is to find trigger timing, to capture waveform block in CH1 in corresponding time, subtract data and then analyze it.

Common model:

  1. trigger mode set as single trigger, command:“trig@mode:s;”(use write parameter interface);
  2. running status as RUN,command:“proc:run;” (use write parameter interface);
  3. get running status, check running status whether is STOP, if it is STOP, that is means it’s been triggered, command “proc?”(use read and write interface)
  4. If it has been triggered, subtract waveform data, command:“capture wave:.bin@CH:0@DT:vol;” Repeat 2-4 steps to complete this model.

Appendix

MeasureParamPacket

typedef struct _measure_param {
float value;
int unit;
}MeasureParam;
typedef struct
{
MeasureParam freq;
MeasureParam period;
MeasureParam risetime;
MeasureParam falltime;
MeasureParam pwidth;
MeasureParam nwidth;
MeasureParam overshoot;
MeasureParam preshoot;
MeasureParam pduty;
MeasureParam nduty;
MeasureParam vmean;
MeasureParam vpp;
MeasureParam vrms;
MeasureParam vtop;
MeasureParam vbase;
MeasureParam vmid;
MeasureParam vmax;
MeasureParam vmin;
MeasureParam vamp;
//
char Reserve[24];
}MeasureParamPacket_UTD2000CEX;

MeasureDataPacket

Code Definition

Data packet is MeaValue mp[50] (400Bytes), that is fixed 50 test parameter in one dimensional sequence. EMeaParam
defines the position of each parameter in the sequence.
struct UnitParam {
char Type; //unit type,like Time,Freq etc.,define by EType
char Scale; //magnitude,like k、n,p,M etc.,define by EScale
};
//@brief : physical quantity value
//@remark: 4Byte align -> 8Bytes
struct MeaValue {
float Value;
UnitParam Unit;
char IsValid; //whether is valid. 0 presents invalid; 1 presents valid.
char IsExist; // whether is exist. 0 presents existence; 1 presents absent.
};

Definition of In-memory Table

Each parameter takes 8 bits, 50 parameter space, and 400 bytes in total.
In-memory model of each parameter

Each parameter takes 8 bits, 50 parameter space, and 400 bytes in total.
In-memory model of each parameter:

FieldsValueUnit.TypeUnit.ScaleIs ValidIs Exist
Byte4Bytes1Byte1Byte1Byte1Byte
MeaningPhysical          value(decimal)Unit type codingUnit quantity codingWhether is validWhether  is existence
Data ValueValue0:invalid;1:valid0:absent; 1: existence
Encoding Physical Unit

Code Definition

enum EScale : char {
SCALE_p = -4,

SCALE_n,
SCALE_μ,
SCALE_m,
SCALE_STD = 0,
SCALE_K,
SCALE_M,
SCALE_G,
SCALE_T,
};
enum EType : char {
TYPE_INVALID = -1,
TYPE_FREQ,
TYPE_TIME,
TYPE_AREA, //area (Vs)
TYPE_SAMPLERATE,//sampling rate(Sa/s)
TYPE_POINT, //count(Sa)
TYPE_VPP, //peak-to-peak value
TYPE_VOLTAGE,//voltage
TYPE_CURRENT,//current
TYPE_DB, //DB
TYPE_VV, //
TYPE_PERCENT,//percentage
TYPE_DEGREE, //degree
TYPE_WATT, //watt,power
TYPE_UNKNOWN,// unknown unit
};

Coding table

Unit Coding:

UnitCoding
p-4
n-3
μ-2
m-1
Standard unit0
K1
M2
G3
T4

Unit Type Coding:

UnitCoding
p-4
n-3
μ-2
m-1
Standard unit0
K1
M2
G3
T4
Parameter Coding

Coding Definition

//@brief : the common definition of parameter measurement data packet
//@remark:
enum EMeaParam {
MP_MAX = 0, //maximum value
MP_MIN, //minimum value
MP_HIGH, //High(Top)-high level(top value)
MP_MIDDLE, //Middle value
MP_LOW, //Low(Bottom) – lower level(bottom value)

MP_PKPK, //VPP-peak-to-peak value
MP_AMP, //amplitude
MP_MEAN, //mean value
MP_CYCMEAN, //
MP_RMS, //root mean square

MP_CYCRMS, //cycle root mean square
MP_AREA, //area
MP_CYCAREA, // cycle area
MP_OVERSHOOT,//overshoot
MP_PRESHOOT, //preshoot

MP_PERIOD, //period
MP_FREQ, //frequency
MP_RISE_TIME,//rise time
MP_FALL_TIME,//fall time
MP_PWIDTH, //positive pulse width

MP_NWIDTH, //negative pulse width
MP_PDUTY, //positive duty ratio
MP_NDUTY, //negative duty ratio
MP_RISEDELAY,//rise delay
MP_FALLDELAY,//fall delay
MP_PHASE, //phase
MP_FRR, //
MP_FRF,
MP_FFR,
MP_FFF,
MP_LRF,
MP_LRR,
MP_LFR,
MP_LFF,
MP_BURST_WIDTH, //burst
//
//reserve section
//
//fixed 50 parameters
MP_MAX_COUNT = 50,
};

Coding Table

ParameterCoding
Maximum value0
Minimum value1
High level/ top value (High/Top)2
Middle value3
High level/bottom value(Low)4
Peak-to-peak value(PKPK)5
Amplitude(AMP)6
Mean value(MEAN)7
Cycle mean(Cycmean)8
Root mean square(RMS)9
Cycle root mean square(Cycrms)10
Area(AREA)11
Cycle area(Cycarea)12
Overshoot13
Preshoot14
Cycle15
Frequency(Freq)16
Rise Time17
Fall Time18
Positive pulse width(PWidth)19
Negative pulse width(NWidth)20
Positive duty ratio(PDuty)21
Negative duty ratio(NDuty)22
Rise delay23
Fall delay24
Phase25
FRR26
FRF27
FFR28
FFF29
LRF30
LRR31
LFR32
LFF33
Burst(Burst Width)34
Reserved35~39

Notes:

  1. This model only support a part of parameter in the above table;
  2. Different definition name in C#Interface,put it in the name space ucics.unit and ucics.mea.
Data Unit Table
UnitCoding
null0
ps1
ns2
μs3
ms4
ks5
nVs7
μVs8
mVs9
μV11
mV12
V13
kV14
pHz18
nHz19
μHz20
mHz21
Hz22
KHz23
MHz24
GHz25
mVV52
VV53
KVV54
mDB80
DB81
KDB82

Uni-Trend Technology (China) Co., Ltd.
UNI-Logo.png

Documents / Resouces

Download manual
Here you can download full pdf version of manual, it may contain additional safety instructions, warranty information, FCC rules, etc.


Related Manuals