Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

"Advanced HMI" open source HMI development


  • Please log in to reply
6 replies to this topic

#1 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 04 June 2012 - 06:28 PM

I recently came across this open source HMI project for VB:

http://advancedhmi.com/default.html

I just wondered if anyone here is familiar with it and, more specifically, has anyone tried to use this as an interface to their Netduino or N+?

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 07 June 2012 - 05:21 AM

Hello Bryan.
Here the answers:
  • no, I'm not familiar with *that* project, although we're developing our own, which is similar;
  • yes, you should able to interface easily with a Netduino just leveraging my Modbus library.
Hope it helps.
Cheers
Biggest fault of Netduino? It runs by electricity.

#3 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 07 June 2012 - 02:12 PM

Hello Bryan.
Here the answers:

  • no, I'm not familiar with *that* project, although we're developing our own, which is similar;
  • yes, you should able to interface easily with a Netduino just leveraging my Modbus library.
Hope it helps.
Cheers


Thanks for the reply. I've actually been trying to do just that, but so far I have been unsuccessful. I've not used modbus before. An example of doing that would be really helpful. That is why I posted this originally. I was hoping to find someone who had already implemented the HMI so I could take a look at their code.

#4 Coding Smackdown

Coding Smackdown

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts
  • LocationLewisville, TX USA

Posted 07 June 2012 - 06:06 PM

After checking out the sourceforge project and Mario's ModBus library, I'm thinking of replacing the web based app on my brew controller with this. Should be great for an example on how to use both together.
Brewing Award Winning Beer with a Netduino!
http://diybrewery.com

#5 Bryan T

Bryan T

    Member

  • Members
  • PipPip
  • 25 posts

Posted 07 June 2012 - 08:01 PM

After checking out the sourceforge project and Mario's ModBus library, I'm thinking of replacing the web based app on my brew controller with this.

Should be great for an example on how to use both together.


I await your example with bated breath... :)

#6 Coding Smackdown

Coding Smackdown

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts
  • LocationLewisville, TX USA

Posted 13 June 2012 - 09:03 PM

Hello Bryan.
Here the answers:

  • no, I'm not familiar with *that* project, although we're developing our own, which is similar;
  • yes, you should able to interface easily with a Netduino just leveraging my Modbus library.
Hope it helps.
Cheers


Mario,

I have a couple of questions for you about your Modbus library. Being new to the whole world of Modbus, let me give you a little background as to what I want to do with it and maybe you can steer me in the right direction.

I'd like to use it to control my Electric Brew Kettle's heating element by setting the target temperature I want to reach and then read back the current temperature and whether the element is on or off.

As for setting the target temperature and reading the current temperature and if the element is on or off, I'm thinking I could use the ReadRegisters and SetRegister methods.

I've also been working on porting over the Arduino PID Library to provide a better control algorithm and would love to be able to set the PID settings, however they are all doubles and I didn't see anything in the Modbus spec that talked about sending doubles to a device, everything looks like integer values.

Any ideas on the best way to go about setting this up?

Thanks
Brewing Award Winning Beer with a Netduino!
http://diybrewery.com

#7 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 14 June 2012 - 04:24 AM

HA!...You are touching the pain!
The Modbus protocol is rather old: it has been developed in 1970, where most of us were regulating the temperature of our "brewery" with knobs...
Just kidding, but indeed that protocol was sooooo simple to implement, that had an huge success worldwide. You know, the big Co. had a big "inertia" on applying changes on something "works well". So, happened the *evil* thing: those parts not yet standardized were implemented "custom" by a certain manufaturer.
In other words: the protocol is trivial, thus you can easily trasfer floats, doubles, and a whole structure, if you want. The problem is that is your *own* serialization way, and no 3rd party device can understand it.
For instance, many many manufacturers of Modbus devices to trasfer a decimal value, instead of creating their own format, prefer to serialize it as "fixed point" over a word. Suppose that you want to transfer the temperature hysteresys, which has to be an integer followed by a decimal digit. Instead of considering it as "float" (which is 4 bytes), you could serialize it as an pure integer, scaled by 10. Again, my lab mate saw a crazy implementation of a floating-point numer over two bytes only!

Really, the Modbus is very old compared to the modern resources we have, but it's still often used (especially in USA), because its simplicity.
Think to an STM MCU (the one used for the Go! modules) which has very few resources. In which way could you implement a protocol to transfer data with other (bigger) devices?
You can create your own, but it's always better to follow some standard: it will open the road for expansions, and yields more flexibility.

Another great limitation of this protocol is the max length of a message. Moreover, this limitation is not compensated by any way to transfer "big-blocks" of data.

Have a look here for some tip: http://www.digi.com/...Floating_Points

In Europe the Modbus is less used than the Profibus, created by Siemens. You know: everyone is master in its own home...
The Profibus is much better than the Modbus, but also more complex. In a professional scenario, where the reliability and certain features are constraints, a rock-solid protocol like Profibus is surely preferred, despite the hardware/software cost. Instead, in any home-automation scenario, where a "1 Euro MCU is far better than a 2 Euro MCU", no matter the quality, and any quick-and-dirty solution is good. That's because Modbus is still living.

Probably, in years, also a such trivial protocol will die in favor of some TCP-based protocol. Maybe within 10 years, any one-Dollar MCU will embed a TCP-ready hardware so that obviously there's no reason for avoiding it.

Cheers
Biggest fault of Netduino? It runs by electricity.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.