Search code examples
c#opcopc-ua

OPC UA-.NETStandardLibrary: the simplest way to access historical data


I'm facing a task which is to extract historical data from an OPC system, and then store these data into a standalone database for our BI team.

Although I'm a experienced developer, but I never use OPC UA before. I found the latest library provided by OPC Foundation here:

https://github.com/OPCFoundation/UA-.NETStandardLibrary

There is a sample console client app in this repo. However, I didn't find any clue for HDA (Historical Data Access). So, could anyone help out?

Also, I'm actually the only IT background person in my company. The manager told me that there is another guy who is maintaining the OPC system using some 3rd party application, so that I assume that it is not necessary to implement anything about the OPC server. In other words, I suppose I just need to implement an OPC client connecting to some URLs which can be found in that OPC application. Does my assumption correct?

To sum up, there are two questions:

  1. How to implement an OPC UA Client to extract historical data with OPC UA-.NETStandardLibrary
  2. Given that the current OPC system is running on top of a 3rd party application, does that mean I don't need to code anything about the "Server"?

Any help will be appreciated.


Solution

  • Unless you actually need to support .NET Standard, you should rather be looking at a different GitHub project: https://github.com/OPCFoundation/UA-.NET . Under SampleApplications/Samples/HistoryClient you should find what you need.

    And yes, if the OPC UA server is in place, configured and running, your development task should be just to write an OPC UA client. You need to "know" about what data the server presents to you through OPC (or browse for it from the code), but you need not to know about the internal implementation of the server (its code).