Arduino with advancedHMI

Hi guys, I'm toying around with getting my Uno to communicate with advancedHMI on my Windows 7 pc. I'm interested in sending some temperature readings to the HMI which have been processed by the arduino. I know people have done it, but there is no doccumentation out there for a very basic setup. If I figure it out, I'll make a quick write-up to post.

There isn't much info on on google and I'm somewhat of a beginner at programming compared to many of you. How do I get the HMI to read my data on the USB com port from the Arduino?

A link that describes what advancedHMI is would be good. I'm too lazy to do even that little research. If you go that far, I'd be happy to look at whether what you want to do is even possible, and, if so, provide some details as to how.

Sorry, I should have done that. advancedHMI is a free Human Machine Interface which is compiled with Microsoft Visual Studio Express. On their page they have a quick tutorial to get it up and running easily. I installed VS Express 2012 and have it running great.

I'm not familiar with how to call to com ports in an IDE or windows. And once I can access the correct port, how do I send/receive data on it in VS Express? Is serial communication even possible with the arduino this way?

Since all VB remains accessible, no need to try to accomplish complex things with a crippled scripting language. This gives the most flexible and expandable HMI software available.

So, take a look at the Playground. There is a section on Interfacing with software. On that page, there are links defining how to interface with a variety of languages, including Visual Basic.

I might be able to modify the code of each object to interact using Firmata. I like this Firmata interface. It seems really easy to use.

It seems really easy to use.

Sure, if you like straight-jackets. They've never been my favorite style, though.


It seems really easy to use.

Sure, if you like straight-jackets. They've never been my favorite style, though.

Good point. Can anyone point me in a good direction for some VERY basic firmata implementations on visual studio/arduino. Their examples are a little hard to follow from their website.

So far this excellent product only seems to work with a couple of PLC drivers including Allen Bradley and systems with ModBus protocol.

I've sent an email to '' to test the water to see if they have/intend releasing a basic RS232 driver of some form suitable for microcontrollers like PICAXE & Arduino. Let's see how/if they respond otherwise I suppose someone needs to do a PLC driver which is well beyond my ability.

Does anyone see any other options?


I'm in the same boat. I don't have a ton of skill in programming drivers, etc..

What about arduino to rs485 converter? What does modbus entail?

Check out this post it has been done to some extent...

Following is part of the uploaders comments from a year ago (Read posts below in reverse order...............

Is very simple, send u the value of the ADC's serial Arduino, and read the value in visual stdio, use the advanced HMI project? components in source forge.

Arlindo Astyzem 9 months ago hello, thank you for comment, was simple! I send a string and read the form. example for arduino : ======================== float temp void setup(){ Serial.begin(9600);} void loop(){ temp = (analogRead(0)*0.004887586)*10­0; Serial.print(temp); Serial.print(";"); Serial.print(mini); Serial.write(10); Serial.write(13);} on VB you can use something like: dim rx as string rx =? serialport1.readline inside of a timer you will put: gauge1.value = rx if you have doubts, I am available.

Arlindo Astyzem 1 year ago

hallo any chance for a example of turning on and? off output on this microcontroller thx in advance

grunftz 2 years ago

I saw that. It is nice of the OP to put some code in there. I was a little confused by the "Serial.write(10); Serial.write(13);" commands and the term "mini".

gauge1.value = rx: can this be done with advancedHMI? It seems like it wants to point to some ethernet or serial connection and then a plc ram location for the value, not internally.

Is it really as easy as a few lines of code?

As per a previous post, I have been communication with AdvancedHMI Support Team, gave them the link to our forum post and they responded as follows:

"I read the forum posts and I see the last question was whether the controls could be written to directly. The answer to that is yes. If you add a control and removed the value from the CommDriver property, you can then set the Value property in code.

Essentially the component request values from the drivers to fill in the properties with values. It is not necessary to do it that way."

end of quote - Nice to see such a pro-active support team.

Regards all

I was able to get it to work using the Mudbus.h library and the AdvancedHMI Modbus driver. Just remember when the sketch refers to Mb.R[0] that means the Modbus PLC address is 40001.

GWManning great to hear of your success. As there seems to be no complete examples or tutorials specifically on how to set this up and especially for a newbee like myself I have a couple of questions as follows which will also help others following this topic:

  1. I've found the site and also found slave mode driver code. A related site has the ModBus Master as well. My question is to get Arduino working with AdvanceHMI should I set up the Arduino as a ModBus Slave which will then be connected to the PC serial bus (e.g. Com1) even through a USB/232 adapter?

  2. If so then do I then download the Slave Driver and copy the downloaded Modbus folder into the Arduino\libraries folder.

  3. Could you upload an example for all to see or even do a YouTube tutorial. Hope I'm not asking too much as I'm sure there is others like myself who would like the guidance.

Thanks in antisipation

Thank you all for your input. This is excellent info for a noob like myself.

Yes, an example of how to do this would be like gold. My weakness is in the PC side and modifying the visual studio express components.

GWManning: I was able to get it to work using the Mudbus.h library and the AdvancedHMI Modbus driver. Just remember when the sketch refers to Mb.R[0] that means the Modbus PLC address is 40001.

Would you be so kind as to post a link to your arduino sketch (or sample code) and advancedHMI solution? I really need something working to study.

Also, how do you get VB all setup to talk to the com port that the arduino is on? (COM4 in my case)

While we all wait for further guidance from GWManning : Under topic area "Networking, Protocols, and Devices" of this forum a post today may be of help as we delve into modbus

MAX 485 & ModbusMaster - Basic Guide,132177.0.html

Problem with such an active forum like this is there are so many topic areas with info happening.


The Modbus library that I used was this one for Modbus over ethernet:

This does require the use of the Ethernet shield.

I used the "Mb" sketch in the example that came with the Mudbus library.

Avoid using pins 4,10,11,12,and 13 when using the Ethernet shield

Modbus has a weird addressing scheme. It stores values in memory locations referred to as registers. These registers are designated in the example as "Mb.R[0], Mb.R[1]" and so on.

// Section of Code from Example Sketch Mb.R[0] = analogRead(A0); //pin A0 to Mb.R[0]

Here, a value will be read from the analog pin A0 and stored in Register 0

To access register zero in Advanced HMI the PLC address is 40001 To access register one the address would be 40002 and so on.

I hope this helps!

Thanks GWManning, I kept on thinking "mudbus" was a typo until I tried the link.

kanurys (& others) I also found some further Modbus interfacing info in following site

Sounds like I need to order an Ethernet Shield to go further, thanks again GWM

Ok I took the quickstart guide from Advanced HMI and modified to be tailored to Arduino communication via Mudbus!183&authkey=!AKZlYO_EiLJ0s38