Go Down

Topic: Arduino with advancedHMI (Read 26905 times) previous topic - next topic


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.
The art of getting good answers lies in asking good questions.


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.
The art of getting good answers lies in asking good questions.


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.
The art of getting good answers lies in asking good questions.


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 'support@advancedhmi.com' 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 http://code.google.com/p/arduino-modbus-slave/ 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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131