History read operations

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

Moderator: uasdkc

Post Reply
apittier
Jr. Member
Jr. Member
Posts: 2
Joined: 18 Feb 2019, 21:41

History read operations

Post by apittier »

Dear Support Team,

I'm working on a custom provider based on the uaprovider_demo that's part of the "ANSI C Based OPC UA Client/Server SDK" examples.

As for the historian support, we followed "Lesson 7: Adding Support for Historical Access" and we're using UaServer_FileLogger_Create and UaServer_DataLoggerItemData_Create.
http://documentation.unified-automation ... rted7.html

Then for the history read operations we have:

Code: Select all

#if UASERVER_SERVICES_HISTORYREAD
    a_pProviderInterface->HistoryReadRawModifiedAsync = UaProvider_Demo_HistoryReadRawModifiedAsync;
    a_pProviderInterface->HistoryReadEventAsync       = UaProvider_Demo_HistoryReadEventAsync;
    a_pProviderInterface->HistoryReadAtTimeAsync      = UaProvider_Demo_HistoryReadAtTimeAsync;
    a_pProviderInterface->HistoryReadProcessedAsync   = UaProvider_Demo_HistoryReadProcessedAsync;
#endif
As for the above read operations (defined in uaprovider_demo_historyread.c):
  • (r1) UaProvider_Demo_HistoryReadRawModifiedAsync : is solved by calling UaServer_DataLogger_ReadValues
  • (r2) UaProvider_Demo_HistoryReadEventAsync : is not implemented but I think it could be solved using an EventLogItem (UaServer_DataLogger_CreateEventLogItem) and then by calling: "UaServer_DataLogger_ReadEvent", right?
  • (r3) UaProvider_Demo_HistoryReadAtTimeAsync : not implemented
  • (r4) UaProvider_Demo_HistoryReadProcessedAsync : not implemented

Questions:
  • 1. Is there a suggested approach to implement read operations (r3) and (r4)?
  • 2. Would it be possible to solve (r3) and (r4) using the UaServer_FileLogger and UaServer_DataLoggerItemData?
  • 3. Considering that I'm using UaExpert as the opc-client to access the opc-server, is it possible to call read operations (r3) and (r4) from UaExpert?
  • 4. Confirm that (r2) could be solved with UaServer_DataLogger_CreateEventLogItem and UaServer_DataLogger_ReadEvent

Looking forward to hearing from you.

Thanks in advance for your help!

Best regards,
Amparo

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

Re: History read operations

Post by Support Team »

Hello Amparo,

1. Is there a suggested approach to implement read operations (r3) and (r4)?
Currently there are no sample implementations for those operations.

2. Would it be possible to solve (r3) and (r4) using the UaServer_FileLogger and UaServer_DataLoggerItemData?
HistoryReadAtTime can be implemented using the existing FileLogger interface, by reading only one point in time.
HistoryReadProcessed requires additional processing of the historical data, which needs to be implemented in addition.

3. Considering that I'm using UaExpert as the opc-client to access the opc-server, is it possible to call read operations (r3) and (r4) from UaExpert?
Those two history operations can currently not be invoked by UaExpert.

4. Confirm that (r2) could be solved with UaServer_DataLogger_CreateEventLogItem and UaServer_DataLogger_ReadEvent
This is correct. However, if you are interested, please send a support request at https://webdav.unifiedautomation.com/su ... _form.html including your customer ID, so we can send you an example for a event history implementation.
Best regards
Unified Automation Support Team

Post Reply