As explained in prior sections of the website, it is possible to make your own HMI forms with all the benefits of the standard debugger. An example of a very detailed DIY form is the fishtank project (under the project section). Making your own HMI form is easy and is described in this article. 

 

 

NOTE: When writing your own scada, it is preferable to use the "empty" VBA solution as a basic template. The template contains all functions. Use the below description to get the I/O tags on your DIY form. The communication to the sketch is based on Textbox controls. If you wish, you can program events on the Textbox (do something with color or update other controls... all up to you). Easy learning by doing in VBA. When starting your application, don't forget to add and set the right parameters for your shortcut: /comport=<used comport> /baudrate=<used baudrate> /monitor=NO. Use NO for the monitor, otherwise the application will paint all tags on your fresh created form and will set the form width automatic.

 

The same procedure applies for all datatypes. 
First of all, open the standard Visual Studio solution, the Solution explorer and open the Master.vb design form. 

SolutionExplorerMaster

Open the toolbox from the Visual studio View tab (or use the Ctrl_Alt_X key) and place a new TextBox control on the VBA form for the given tag(s). When placed on the form, right click the control and chose "properties" from the pull down menu.  Then give the TextBox control the same name as the tagname known in the sketch.  The next step is different for all datatypes.  Because of the fact that digital inputs can be "masked" and digital outputs can be "forced", a specific ContextMenuStrip must be connected to the control for all types of data. Below an overview for all different datatypes and matchin ContextMenuStrip names.

Select a textbox control from the toolbox and drag and drop it to the Master form. 
 

Toolbox

 

When drag/dropped TextBox control to the form, edit the properties of the Textbox control

PlaceTextBox 


Open the properties list of the control, by a right click on the textbox.

S1

Change the name to the tagname (is this case S1) and set the right contextmenustrip for the given datatype. 
In the table below the name of the ContextMenuStrip per I/O type. 

I/O type

ContextMenuStrip

DO

DigOutForce

DI

DigInMask

AI

AnaInMask

AO

AnaOutForce

TT

TTMask

DM

UltrasonicMask

SO

ServoForce

Digital

marker

DigOutForce

Analogue

Marker

AnaOutForce

TEXT

marker

TextForce

 

Runtime

When running the HMI, you now have all the benefits of the AFSM standard application. With a right click on the control you get all possibilities for controlling your I/O. This is all you have to do. Runtime example of HMI:

runtime

 

 

0
0
0
s2smodern