Wednesday, 15 August 2012

sockets - C#.Net Application to communicate with PLC -


I am developing an application in C #. It communicates with PLC. I want to communicate through TCP / IP application I have a good experience at C #. Net but I'm very new in this area.

The application's features

  1. The application writes / writes PLC variable.
  2. There are approximately 2000/3000 PLC variables to read / write. / Li>
  3. App UI to show the current status of each variable

Before writing here, I found many articles for Google and PLC communications about this topic.

The use of static addresses of PAC data varies widely depending on the whole article and its various PLCs.

I have also read about SCADA which provides a bridge between application and PLC but it is paid.

After a lot of surfing I decided to make the POC for the system.

>

How POC works below:

  1. PLC defines different variables in user.
  2. PLC defined IP sends all the variables to the end point All variables are sent as a string, variable value is divided separately.
  3. To read these variable values, I have created a TCP server (using the TCP listener class) who listened IP at the end point. It reads the incoming data, parses the full message and returns different variable values ​​in the string array. After that code, update the further process and any variable variables on these values, if necessary and then return all the variable values ​​for PLC in a string.
  4. Above the reading / writing cycle at every 10 milliseconds.
  5. Currently only one customer (PLC) communication

I have tested above POC and above its functioning (100 variables), but future is future. And the increase in subscribers (PLC) is not sure about communication and performance.

Is this a good way to communicate?

Can you provide your valuable suggestions in the creation of scalable and high performance applications?

As I understand your method involves many programming in PLC. And we do not like it so much that I think you should use one of OPC servers and connect your app with it. Other solutions will use the 'Freedaw' library for Siemens family PLC.


No comments:

Post a Comment