DGUS User Guide V3.4
DGUS User Guide V3.4
Contents
1. DGUS_SDK Instruction
1.1 Operation of DGUS_SDK
1. DGUS (DWIN Graphical User Software) is an intelligent GUI design software for DWIN DGUS
LCM with K600+. By using DGUS, magnificent display effect can be achieved easily and rapidly,
with much less programming than ever before. Variables are defined by DGUS_SDK and users
can feel free to design the visualize GUI. All parameters and images can be downloaded via SD
card which stores related .bin files to make your design into real application.
2. Install DGUS_SDK_V3.4:
Unzip DGUS_SDK_V34.rar, and click DGUS ToolV3.4.exe to run it.
(.net Framework 2.0 is required to run the software).
3. VP (Variable Pointer): The addresses of variables in variable SRAM (56KB). Users can set
buttons with defined VP, to change the value in this address and display contents corresponding
with the value in VP address.
SP (Stack Pointer): the address of definitions, starting address of description data of variables.
Change the value in particular address to modify variable properties. Take <WordArt> function as
example.
Data
Add. Definition Description
Length
0x00 0x5A03 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF.
0x04 0x0007 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 X,Y 4 Top-left coordinate of text, left aligned.
0x0C 0x03 Icon0 2 Icon ID corresponding to 0, the sequence is “0123456789-.”.
0x0E 0x04:H Icon_Lib 1 Address of icon file.
ICON display mode.
0x0F 0x04:L Icon_Mode 1
0x00: transparent, others: opaque.
0x10 0x05:H Int_Num 1 Length of integer digits.
0x11 0x05:L Dec_Num 1 Length of decimal digits.
0x12 0x06:H VP_Data_Mode 1 0x00: integer (2 bytes), 0x01: long integer (4 bytes).
If SP is set at 0x5000 for WordArt variable,
VP parameter will be saved in 0x5000 address,
Variable position parameters will be saved in 0x5001-0x5002 address.
And so on.
4. When you need to handle with icons, please copy icon files into <DWIN_SET> folder to
operate them in DGUS_SDK_V3.4.
or
B. Drag the button/variable with mouse.
Navigation Bar:
New: Create a new project.
Open: Open an existing project (.hmi file).
Save: Save the current project.
Save As: Save the current project in a new folder.
Close: Close the current project.
Resolution: Modify resolution of project.
System Properties: Modify system properties and save the settings in config.txt. Refer to
illustration below:
Inputted data will be sent via serial port only when both <TPSAUTO> in System Config. Window and
<Data Auto Upload> settings in buttons properties are ticked.
Add VAR: users can use DGUS_SDK to add variables on screen, including Variable Icon,
Animation Icon, Slider, WordArt, Image Animation, Icon Rotation, Data Variable, Text Display,
RTC Display, Analog Clock Display, Dynamic Trend Curve Display, Table Display, and Basic
Graphic Display, Bit Icon, Timer Variable. Variables are shown as light-blue rectangles in
DGUS_SDK_V3.4.
Parameter settings: users can use <System Properties> to adjust parameter settings of DGUS
module. Parameter with “0x” in front should be filled with hex numbers.
Ignore decimal point while setting range restriction for return value. E.g.: the setting is 3 integer
bits and 2 decimal bits, and then the top limit is 10000, rather than 100.
This function is only for making touching area for slider. To display it, please use <Slider display>
function.
Hold the button over 0.5 second and slide the slider to modify number in the right, the value will also be changed.
2.1.5 RTC
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to
serial port.
Button Effect: set picture ID for touching effect, -1: null.
Display Position: data position when typing.
Font Color: data color when typing.
Font Lib_ID: address of ASCII font file.
Font Size: horizontal pixel numbers.
Cursor Color: white/black cursor.
Keyboard setting:
Set the keyboard picture ID and the keyboard area.
Image ID: image ID of keyboard area.
Cut Area: cut area in image ID.
Paste Position: position of the keyboard on current screen.
Click <RTC> button - Keyboard Pops Up - Clock Sets Up the Current Time.
Set a <Return Key Code> button, of which VP is 0x000A, key value is 0x0005.
Setup Mode
Mode Data Pack Description Function
Transmit data from register to variable SRAM in 0x6F00 to 0x6FFF
0x00 No No
(low bytes).
Transmit data from address 0x6F00 to 0x6FFF in variable SRAM (low
0x01 No No bytes) to register and reset module parameters including R1-R3, R5-
RA.
Coordinates of top-left Convert designated area to monochrome bitmap (vertical mode) and
Tran_Area
and bottom-right of area. save the data to designated VP address.
VP address for restoring A. Width (Xe-Xs+1) should be even.
*VP
bitmap data. B. Height (Ye-Ys+1) should be multiple of 8.
C. VP data format shown as below:
VP: status indicator, refreshed to 0x5555 after operation.
0x02
VP+1: horizontal length, by word. (Xe-Xs+1) &0xFFFE/2
VP+2: numbers of data segment. (Ye-Ys+1) &0xFFF8/8
VP+3: bitmap data, with MSB priority.
If the key code automatically upload is enabled (R2.3=1), module will
upload message (value in VP address upload to 0x5555) to serial port.
The command is mainly for printing of current screen.
*VP Variable pointer. Upload data in designated VP address to serial port.
0x03
Tx_LEN Length of data to be sent. Range of Tx_LEN: 0x0001-0xFFFF.
0x04 Same function with 0x03, uploading data to COM2 (reserved port).
Coordinates of top-left Convert designated area to monochrome bitmap (horizontal mode) and
Tran_Area
and bottom-right of area. save the data to designated VP address.
A. Width (Xe-Xs+1) should be multiple of 16.
B. VP data format as shown below:
VP: status indicator, refreshed to 0x5555 after operation.
0x05 VP+1: horizontal length, by word. (Xe-Xs+1) &0xFFF0/16
VP address for restoring
*VP VP+2: numbers of data segment. (Ye-Ys+1)
bitmap data.
VP+3: bitmap data, with MSB priority.
If the key code automatically upload is enabled (R2.3=1), module will
upload message (value in VP address upload to 0x5555) to serial port.
The command is mainly for printing of current screen.
Frame_He Send the current touched position to COM2 (serial port for reserving
Frame header (2byte)
ad the system), the format is:
0x06 Frame_Head + X + Y + Check (The cumulative Sum for 1 byte of X, Y)
Frame_En
Frame end (2byte) + Frame_end.
d
...... ......
2.2.3 Slider
Selected Area: (X, Y) are the top-left coordinates of icons.
X, W is start/end point of horizontal slider.
Y, H is start/end point of vertical slider.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Start/End Value: value corresponding to start/end point.
Slider Mode: horizontal/vertical.
ICON File: address of icon file.
ICON ID: icon address in icon file.
Display Mode: transparent/background.
Coordinate Offset:
Offset to the left/top.
VAR Type:
Integer (whole VP address).
High byte in VP address.
Low byte in VP address.
Note: Set same VP address for <Slider> button and <Slider display>
variable to combine them.
2.2.4 WordArt
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
ICON File: address of icon file.
ICON 0: icon address corresponding to number 0.
ICON Display Mode: transparent/background.
VAR Type: integer/long integer.
Number of INT/DEC bit: length of integer/decimal digits.
If the length of data is shorter than designated, please use 0xFFFF as end mark of data in this cell.
For oversized table, users can use slider to pull the table.
String Format
Address Definition Description
VP CMD Command
VP+1 Data_Pack_Num_Max Data Pack Number
VP+2 DATA_Pack
String Format
Address Definition Description
VP CMD Command
VP+1 Data_Pack_Num_Max Data Pack Number
VP+2 DATA_Pack
Display
0x00
0x01Mode ICON0S 0 Value of bit
ICON1S
Null. 1
0x02
0x03
0x04 ICON0S
Null. Animation:
ICON1S
Animation: ICON1S
ICON1S ICON1E.
0x05
0x06
0x07 Animation:
Animation: ICON0S
ICON0S ICON0E.
ICON0E. ICON1S
Null.
Animation: ICON1S ICON1E.
ICON1E.
Encoded separators string, used to define the format of Timer. Every time a Timer data (BCD
code) is read, one ASCII char will be added after as separator.
Some special chars: 0x00: none, Timer data will be concatenated; 0x0D: new line.
3. Commands
3.1 Data Frame
Serial data frame is constituted with 5 parts as shown in chart below:
Data Block 1 2 3 4 5
Command Data
Definition Frame header Data length CRC checksum
type string
Data Length 2 1 1 N 2
Defined by R3 Including
and RA command type, Enabled by R2
Description 0x80-0x84
parameter in data string and parameter in config.txt
config.txt CRC checksum
3.3 Register
Register, 256 bytes, is used for hardware operation and process control.
Register Length
Address
Definition
(Byte)
Description
0x00 Version 1 DGUS version number, BCD code, 0x10 indicates V1.0.
0x01 LED_NOW 1 LED brightness, 0x00-0x40.
Variable SRAM
Variable SRAM, 28K words, is for storing real-time data. Variable SRAM is divided into 28K
address, ranging from 0x0000 to 0x6FFF.
Variable SRAM is read and written by word.
Variable SRAM is accessed by command 0x82/0x83.
Trend Curve Buffer
Trend curve buffer is for storing real-time trend curve data, supporting 8 trend curves
simultaneously. Trend curve buffer is written by word, each dot of trend curve occupies 2 bytes.
Trend curve buffer is accessed by command 0x84, write only.