Noob Guide for OPC: How to Write a C # Hello World Client?

here is my situation:

We have software that is used to monitor solar power plants under development. I have to introduce OPC as a new way to receive data from the physical devices themselves, which is why I tried to find out about opc, which is still frustrating.

I installed the Matrikon simulator and using the Matrikon analyzer, I see that the data is being modeled. now I need to create a very basic proof of concept that I can connect to it and print something using C #. As far as I understand, I should use some proprietary API / SDK. Im only experiencing things so I don’t want to commit to my own way of doing everything right now. Isn't OPC created to precisely avoid this?

Is there a simple Opensource DLL that I can use to connect to an OPC server that supports DA, HDA, and AE, which allows me to work without worrying about / sdks?

To add to the confusion, I found OPC Xi and OPC UA .... and I did not find the tutorial from zero zero, and this is what I am looking for.

+4
source share
5 answers

First you need to know which OPC you want to use.

  • Classic OPC DA / HDA and A & E Windows COM / DCOM
  • OPC XML / DA, DA as a web service, but with some limited execution.
  • OPC UA, the latest specification to implement it on a platform without Windows and the merger of DA, HDA and A & E.

After that, you can choose the language you want to use, and therefore use any SDK for free or not.

One good site for OPC: http://www.opcconnect.com/source.php contains lists of tools that you could use.

+2
source

I recommend that you use the latest fragrance OPC, OPC UA.

You can create a simple HMI application in C # using these free tools:

1.Microsoft Visual Studio Express 2013 for Windows Desktop is available using http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop .

2. The latest source from this site: https://github.com/convertersystems/opc-ua-samples

With this kit, you can: view OPC UA servers directly from within Visual Studio. Drag the variable nodes to subscribe to the data. Use bindings to animate the properties of your user interface from subscription data values.

Check out the sample workstation application.

+7
source

You can download all OPC materials from the OPC Foundation , in particular, you are looking for the source code for OPC.NET API 2.00 Download Link . It contains a solution that has OPC DLLs and client samples (AE, DA, DX, HDA) to give you an idea of ​​how OPC works. This source and DLLs are the foundation of OPC standards. With their help, you can call any proprietary OPC server that meets OPC standards.

0
source

Providing you with a tutorial ... but first, some information:

OPC is everything but open source (open source) ... The OPC Foundation has defined many things to standardize the way communications are automated - on top of which you could create your own stack. Be careful, stuf HUGE (!). Therefore, in order to lighten the workload a bit, there is a hand full of companies providing you with stacks for different programming languages. Matrikon, Prosys, Unified Automation, to name a few.

However, to connect to a demo server, you need to implement a provider and still need a stack that provides you basic functions and loading such a stack, your company must register with the provider. I'm not afraid. However, there were OpenSource projects: http://www.openopcua.org/ never tried the code.

BUT just to prove usefulness check out this tutorial http://doc.unifiedautomation.com/

And a book written by the owner of UA (maybe your company has access to Springerlink?) Http://www.springer.com/computer/information+systems+and+applications/book/978-3-540-68898- 3

0
source

I suggest you take a look at the OpenOpcUa initiative. The full code for the client and OPC UA server is available for download. This code runs Windows, Linux, and WVWorks. Further information at www.openopcua.org

0
source

Source: https://habr.com/ru/post/1497446/


All Articles