Arduino Advance HMI Guide

download Arduino Advance HMI Guide

If you can't read please download the document

description

Arduino Advance HMI Guide

Transcript of Arduino Advance HMI Guide

AdvancedHMI and Arduino Via Mudbus.h

AdvancedHMIA different approach to HMI development

Quick Start GuideAdvancedHMI

Quick Start

1) Visual Studio 2008 (or higher) or Visual Basic Express will need to be installed on thedevelopment PC. If you do not already have one installed, you can get Visual Basic Express from Microsoft at the following link:http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express

2) You will now need the AdvancedHMI project, this can be downloaded from:http://sourceforge.net/projects/advancedhmi/

3) After downloading AdvancedHMI, extract the files from the zip file

4) Open the solution file (AdvancedHMI.sln) by either double-clicking or starting Visual Basic and going to File->Open Project and browsing to the AdvancedHMI.sln fileNote : If you are using Visual Basic 2010 or higher, you will see an upgrade wizard. Just click the Finish button to proceed

5) Open the MainForm by double-clicking the name in the Solution Explorer

6) The project will now need to be compiled in order to add the components to the ToolboxNote : If you do not see the Build menu option, Enable the Expert settings:

7) From the ToolBox, add a Comm driver by dragging and dropping to the form.

8) Set the appropriate properties for the comm driver you selected, e.g. IPAddress.

9) Add a visual control to the form by dragging and dropping from the Toolbox.

10) Set the PLC address that you want displayed on the selected control. Here I used 40001 to reference Mb.R[0] in the Arduino Sketch witch is Analog pin 1. (more on that later)

11) Now open the Put the Mudbus library in Arduino IDE.

12. Open the Mb example sketch

13. Edit the Ethernet information - mac, ip, gateway, subnet to suit your needs.

14. We already set the Panel meter to display the value in A0 so as a test just plug in a value.

As you can se here i Just plugged in a value of 7 to be stored in Mb.R[0] for testing. Now Upload to the arduino.And then press the start button in visual studio. Your panel meter should read 7.

If that all works then you can hook up an analog device and put the analogRead statement back in and upload one again. Make sure to stop the HMI before you upload. It may cause the program to crash otherwise.

Hope this helps!