UTD2000CM Programming Manual
UTD2000CM Programming Manual
Programming Manual
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、the device address of UCI interface:
[C:DSO][D:DSO-C][T:USB][PID:0x834][VID:0x5656][EI:0x82][EO:0x4][CFG:1][I:0]
or
[C:DSO][D:DSO-C2][T:USB][PID:0x834][VID:0x5656][EI:0x82][EO:0x4][CFG:1][I:0]
use UCI interface to query device address
Keypad
Command Name Command Parameter Command Parameter Type
KEY Key value String : the abbreviation of keypad name
Example:
2 / 18
Uni-Trend Technology (China) Co., Ltd.
“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
Notes:
Due to different device has different key name, the abbreviation is to avoid the difference!
Command with question mark should read by interface uci_Read.
Use local command to lock/unlock full qwerty:
Screenshot
Command Name Command Parameter Command Parameter Type
PrtScn Image data format String: bmp { BMP file }
Example:
BMP file: “PrtScn:bmp;”
Notes:
1、 “PrtScn:bmp;” use interface uci_Read,buffer area size can set to 768512 bytes,read 16 bits BMP file.
3 / 18
Uni-Trend Technology (China) Co., Ltd.
the actual size get from returned value.
Automatic Reconnect
Command Name Command Parameter Command Parameter Type
Reconnect; none none
Example:
“Reconnect;”
Notes:
Use uci_SendCommand to send command.
If detected device is break in connect condition, it can send this command to reconnect.
Running Status
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
The Basic(Common)Attribute:
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.
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
5 / 18
Uni-Trend Technology (China) Co., Ltd.
“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
Frequency Meter
6 / 18
Uni-Trend Technology (China) Co., Ltd.
Attribute Name Meaning IO Data
EN Enable(on/off) WR Enum(Integer<2Bytes>): 0/1
Freq? Frequency value R Double<8Bytes>,in Hz unit. If value is -1,it presents
<2Hz.
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
7 / 18
Uni-Trend Technology (China) Co., Ltd.
Attribute Name Meaning IO Data
src Measurement WR Enum(Integer<2Bytes>): 0/1 {CH1/CH2}
source
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;
Notes:
When read parameter alone if return:
#define FLT_MAX 3.402823466e+38F /* max value */
It presents this parameter is invalid.
Code Example:
void Test_MeasureParams_DSO() {
comAPICommon::MeaValue params[50];
PrintMeasureParams(params);
};
PrintMeaParam(_p[cb::MP_NDUTY], "NDUTY");
PrintMeaParam(_p[cb::MP_PDUTY], "PDUTY");
8 / 18
Uni-Trend Technology (China) Co., Ltd.
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----------------------------------------------------");
}
9 / 18
Uni-Trend Technology (China) Co., Ltd.
Attribute Name Meaning IO Data
CH Channel(output channel W Enum(Integer) : 0/1/2/3{ CH1/ CH2/CH3/CH4}
ID)
DT Data Type(data format) W Enum(String) : ad/vol{ ADC initial data / voltage value }
Example:
“capture wave:.bin@CH:0@DT:AD;” -- read waveform data of CH1, AD value,keep in internal buffer area
“capture wave:.bin@CH:0@DT:vol;” -- read waveform data of CH1, voltage value,keep in internal buffer area
“capture wave:.csv@CH:0@DT:vol;” -- read waveform data of CH1, voltage value, keep in CSV 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、 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
10 / 18
Uni-Trend Technology (China) Co., Ltd.
【Basic】 Write Parameter
Parameter address in this command is digital coding; it need refer to the command coding definition in file
include\CMD_COMVer2.h.
This command is to compatible the old protocol.
Case
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.
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.
12 / 18
Uni-Trend Technology (China) Co., Ltd.
Appendix
ParaMeasureDataPacket:
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
};
Each parameter takes 8 bits, 50 parameter space, and 400 bytes in total.
In-memory model of each parameter:
Fields Value Unit.Type Unit.Scale Is Valid Is Exist
Byte 4Bytes 1Byte 1Byte 1Byte 1Byte
Meaning Physical value Unit type coding Unit quantity Whether is valid Whether is
(decimal) coding existence
Data Value Value 0:invalid;1:valid 0:absent; 1:
existence
13 / 18
Uni-Trend Technology (China) Co., Ltd.
Encoding Physical Unit
Code Definition
14 / 18
Uni-Trend Technology (China) Co., Ltd.
Coding table
Unit Coding:
Unit Coding
p -4
n -3
μ -2
m -1
Standard unit 0
K 1
M 2
G 3
T 4
Unit Coding
Invalid type -1
frequency(Hz) 0
time(s) 1
area(Vs) 2
sampling rate(Sa/s) 3
count(Sa , pkts) 4
peak-to-peak value(VPP) 5
voltage(V) 6
current(A) 7
power(DB) 8
VV 9
percentage(%) 10
degree(°) 11
Watt(W) 12
unknown unit(U) 13
15 / 18
Uni-Trend Technology (China) Co., Ltd.
Parameter Coding
Coding Definition
MP_PERIOD, // period
MP_FREQ, // frequency
MP_RISE_TIME,// rise time
MP_FALL_TIME,// fall time
MP_PWIDTH, // positive pulse width
MP_PHASE, // phase
MP_FRR, //
MP_FRF,
MP_FFR,
MP_FFF,
16 / 18
Uni-Trend Technology (China) Co., Ltd.
MP_LRF,
MP_LRR,
MP_LFR,
MP_LFF,
MP_BURST_WIDTH, // burst
//
//reserve section
//
// fixed 50 parameters
MP_MAX_COUNT = 50,
};
Coding Table
Parameter Coding
Maximum value 0
Minimum value 1
High level/ top value (High/Top) 2
Middle value 3
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
Overshoot 13
Preshoot 14
Cycle 15
Frequency(Freq) 16
Rise Time 17
Fall Time 18
Positive pulse width(PWidth) 19
Negative pulse width(NWidth) 20
Positive duty ratio(PDuty) 21
Negative duty ratio(NDuty) 22
Rise delay 23
17 / 18
Uni-Trend Technology (China) Co., Ltd.
Fall delay 24
Phase 25
FRR 26
FRF 27
FFR 28
FFF 29
LRF 30
LRR 31
LFR 32
LFF 33
Burst(Burst Width) 34
Reserved 35~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.
18 / 18
Uni-Trend Technology (China) Co., Ltd.