Historical Access for Instances of User Defined Types

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
acidiclustre
Full Member
Full Member
Posts: 9
Joined: 09 Jun 2015, 21:16

Historical Access for Instances of User Defined Types

Post by acidiclustre »

Hi team,
I recently implemented Historical Access where the historical data is being stored in an external MSSQL database. So according to the UA SDK documentation I had to have my own implementation of IHistoryDataSource and IHistoryDataEnumerator for my MSSQL datasource.
Now what I want to achieve is, Historical Access capabilities for user defined instances (instances of user defined UA types). For example, I have a UA Type which has four variables and I want to be able to have historical capabilities for this object e.g. if I pull up this object in History View, I want to be able to see the average of the historical values of the four variables between the specified timestamps. Is something like this possible to implement? Or the SDK supports historizing only for UA Variables?
Regards,
Sup

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Historical Access for Instances of User Defined Types

Post by Support Team »

We sent you an answer by email from support@unifiedautomation.com
Best regards
Unified Automation Support Team

acidiclustre
Full Member
Full Member
Posts: 9
Joined: 09 Jun 2015, 21:16

Re: Historical Access for Instances of User Defined Types

Post by acidiclustre »

Thank you so much for the answer

acidiclustre
Full Member
Full Member
Posts: 9
Joined: 09 Jun 2015, 21:16

Re: Historical Access for Instances of User Defined Types

Post by acidiclustre »

For anyone reading this thread, the answer to the question is : It is not supported by OPC UA to read the historical data for Objects. In your case you have to read the historical data for the four children separately.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Historical Access for Instances of User Defined Types

Post by Support Team »

Sorry for not directly replying here, the issue is not related to the SDK, it is just not intended by the OPC Specification:

In OPC UA you can not directly historize the object, you can historize variables instead. Hence, your object must have a (structured) variable representation which than could be historized, however not the object itself.

Best Regards
Support Team

vinayakkhavasi
Jr. Member
Jr. Member
Posts: 1
Joined: 03 Nov 2017, 13:21

Re: Historical Access for Instances of User Defined Types

Post by vinayakkhavasi »

Hello,

I need to implement Historical data access into our OPC UA server.
We have data stored in an external data base.
And we need to provide this data and I am not understanding the IHistoryDataSource and IHistoryDataEnumerator interfaces.
The notions used in these two interfaces are quite not possible understand.

Can any one provide me the sample code implemention of these two interfaces especially i need information on GetModificationInfo() in IHistoryDataSource and use of RequestContext context, DateTime timestamp in GetEnumerator() method of IHistoryDataEnumerator.

Regards
Vinayak

Post Reply