I am facing a problem when accessing history data for a given node. I am connected to the UaAnsiCServer and have enabled the Historizing attribute for the following node: ns=4;s=Demo.History.DoubleWithHistory. I can also see the history data in the UaExpert client.
Furthermore, I am able to access the history data for the above node via _client.ReadNodeHistory(start, end, nodeId). However, when I am trying to call _client.ReadNodeHistoryProcessed(start, end, OpcAggregateType.Average, nodeId), I keep getting the following exception:
Code: Select all
An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in System.Private.CoreLib.dll but was not handled in user code
The given key 'ns=4;s=Demo.History.DoubleWithHistory' was not present in the dictionary.
On an unrelated note, calling _client.ReadNodeHistory(start, null, nodeId) with either startTime or endTime NULL returns an empty IEnumerable every time.
I am using version 2.42.5 of the Opc.UaFx.Client NuGet package.
Any help in resolving this issue would be greatly appreciated.
Cheers