qtopc-uaqtopcua

Qt OPC-UA - Accessing Trend/Historical Data


I'm using Qt 5.11.1 with Qt OPC Ua and the Open62541 backend to create an OPC Client application.

Is it at all possible to make a request for historical data with the Qt OPC UA module? E.g. Get the values for this variable (node) between these two times.

My server application has this functionality (FreeOpcUa) as I can set variables to be 'historized' and view previously stored values. But I cannot see an obvious solution to access this data easily on the client side.

At the moment I'm considering exposing a function on my server for each variable which would take in a start and end timestamp and manually gather the values and format them into a string or some object for the client to use.

Would anyone have any ideas or thoughts on a better way to do this? I'm not overly familiar with OPC-UA or Qt so may just be missing something obvious.


Solution

  • To use the OPC UA History Feature, both your OPC UA Client and Server shall supports the HistoryRead/HistoryWrite Services.

    I don't know the status of the feature for your Server but for your Client (Open62541) those Services are not completely functionnal yet. Check the FEATURES document from their GitHub here

    Apparently those should be fully functionnal within the next 0.4 Release.