C# Communication to Industrial Automation Systems

mbrockley

Member
Join Date
Jul 2015
Location
Alberta
Posts
7
Looking for any advice out there in regards to a communication strategy between Visual Studio 2013 C# windows application and either an HMI builder such as National Instruments Lookout or my Do-More PLC. The tags/values I want to communicate include bits, integers and strings.

I have a few possible ideas, each pose their own complications.

My first thought is to go with a TCP Modbus communication, but with some light researching I am finding that it would require a possible untrustworthy 3rd party library/namespace and would require some unnecessary complication in regards to read buffering and asyncronous communication.
Has anyone played around with the NModbus library enough to stand-by it? https://www.nuget.org/packages/NModbus/

My second thought is to rely on a data table or something similar that exports on command to a CSV file or similar format. I could then import this file as needed into my HMI builder to update tags. It would then need a secondary method to export tag data from my HMI builder back into my C# application. My worry is that there may be unnecessary delay between the applications.

I have also been looking into the option of reading/writing to an access database. I believe this would solve the issue with delay as communication would be instantaneous, but I haven't worked a lot with access in the past so it would be new territory.

Any thoughts, advice or criticism, on the topic as well as links to similar topics that I hadn't spotted would be appreciated.🍺
 
AdvancedHMI may be what you're looking for. It allows you to build your HMI within VB.NET or C# and has built in drivers that do the heavy lifting of the communications to your PLC or field device for you. Plus it's (with some catches) free.
 
I do not have time to go into the details right now, but I do quite a bit of C#.NET to Do-more comms.
I mostly use a web api on a webserver, and then let the Do-more call it and pass in the variables. You can also use C# to open a connection to Do-more using TcpClient() to initiate a transaction in the other direction.

Also, I would not recommend using Access unless your database will be a small one.

See forum.hosteng.com for more info and examples of using the Do-more's advanced string functions and TCP connections.

If you get stuck on anything then just ask. Maybe I can help you figure it out.
 
As an update to my first comment/question, I have since come across OAS (Open Automation Software) which will act as a hub for all data communication and provides full Visual Studio WPF toolkit for easy integration from our PLC through to a C# WPF interface. There are other ways to do the same I have discovered since, but this is the method I ended up going with.
 

Similar Topics

Dear all, The idea is I want to simulate 2 PLCs with the simulator and see if the runtime in the indus.PC changes. I have a PLC and SIS program...
Replies
0
Views
725
Where does the industry stand with bluetooth or wireless communications? Is it reliable for data collection to a server? Our production area is...
Replies
16
Views
6,735
I learned I need to learn about communication. I need a recommendation on a good book on serial communication, and specifically, Ethernet (I...
Replies
8
Views
2,689
Hey guys, I'm deep into learning comms, Modbus, Ethernet, DH+ Modbus etc. I was thinking of trying to put together a small Modbus Network and was...
Replies
0
Views
1,650
Hello, I'm interested in standard ways of connecting PLCs from different manufacturers. For example, I know there are examples of communications...
Replies
4
Views
3,999
Back
Top Bottom