Reputation: 73
I want to make a reporting program using C# and .NETFramework technologies. We have PLCs and our PLC tags are coming to Kepware's OPC server.
According to my research, it seems reasonable to use OPC UA, but I couldn't find any useful(uncomplicated) documentation. I just want to get the tree list from the OPC server and transfer it to treeview, which is a .NETFramework component.
Later, I want to log the tags I have determined by reading 1 per minute. Very detailed samples are too heavy for me.
Are there a method like GetStructors() or a simple sample to get the tree structure and read a tag? Please help.
Upvotes: 2
Views: 7274
Reputation: 96
If there was an easy way for this, everyone would do it, but it's still not that hard to do. When you look at the opc community to understand what you should use here, the community states that the last update and long-term support is on the opc ua protocol.
If u use c# u can check opc foundations opc ua library c# simple opc ua client
There are some points to consider when creating an opc ua client:
if u dont want auth u should go kepserverex confuguration-> project -> opc ua -> allow anonymus login = yes
With this information and resources you can create yourself an opc client.
note : how client works :
You must first create a session, then create a subscription object through this session. You should create the IOs as a monitored item and add them to your subscription object. then you will need to create a datachange event from your subscription object and your client is ready. The data whose server value changes will be published through this datachange object and you are free to do whatever you want with these objects.
Upvotes: 2