You are on page 1of 9

How to use E-XD++ with .

NET
1. Please remember to rebuild HMIBuilder +
HMIPlayer + UCCTouch project correctly. You can
find them within UCC_HMI file folder. As below:

2. Please remember to rebuild UCCHMI OCX


correctly, it is placed within HMI_OCX file folder, as
below:
3. And follow the below steps to Create HMI Project
with .net.
1). Run HMIBuilder.exe, you can find it within Bin
file folder of UCC_HMI file folder, as below:
2). Create new project with HMIBuilder, as a
sample, you can open processdemo.dcp for
checking, this project is placed within the following
file folder:
3). Within HMIBuilder, you can define new tag (Real
time or global), and create any screens. You can
also create new animate or connect a shape with a
math expression. As below:
For how to use HMIBuilder, please take a review
with the document (HMIBuilder.chm) this document
is attached, or downloaded with the following link:
http://www.ucancode.net/22/HMISolution.zip
4). Once your project with HMIBuilder is created,
please run Visual Studio 2010.net, and create a
new C# Project (For example ProcessDemo).
5). Open Form1.cs, and open ToolBox window of
Visual Studio 2010, and right click mouse to choose
“Choose items...” menu item, as below:
6) Then the following dialog will appear, switch to
“Com Components” property page, please choose
“UCanCode HMI Control”, then click OK button, as
below:

7) Please drag this new HMI Control to the form1.cs


of processdemo project in Visual Studio 2010.
8) Make this new control’s name with m_Draw, as
below:
9) Then switch to the codes of Form1, and call the
following codes:
10) Please remember SetAppPath is the project
path that you created with HMIBuilder before.
Then you should call InitAppData();
Then you should call SetPagePosition(...), to
change the screen size of your form.
11) If you need to send data to the screen, please
call:
SetDRTag(..) -- Send double real time tag value.
SetSRTag(..) -- send text real time tag value.
SetDGTag(..) -- Send double global tag value.
SetSGTag(..) -- send text global tag value.
...
 void SetDRTag(LPCTSTR strTag, double dValue); // 传 Double 型
数据给实时变量,strTag 是 HMIBuilder 对应的变量名,dValue 为值
 void SetDRTagExt(long nID, double dValue);// 传 Double 型数据给
实时变量,nID 是 HMIBuilder 对应的变量的 ID,dValue 为值
 void SetSRTag(LPCTSTR strTag, LPCTSTR strText);// 传 Text 型数
据给实时变量,strTag 是 HMIBuilder 对应的变量名,strText 为值
 void SetSRTagExt(long nID, LPCTSTR strText);// 传 Text 型数据给
实时变量,nID 是 HMIBuilder 对应的变量的 ID,strText 为值
 v

12) Please open ProcessDemo.sln for checking.


That’s all, please enjoy it!!

You might also like