OPC UA Historical Access: Read raw and modified values|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
OPC UA Historical Access: Read raw and modified values
Avatar
Ildar MIndiyarov_1
Member
Members
Forum Posts: 3
Member Since:
06/27/2023
sp_UserOfflineSmall Offline
1
07/18/2023 - 03:50
sp_Permalink sp_Print

Is the following correct?

Suppose I have a historian with the following timestamp-values:
5:00 - 10
5:01 - 20
5:02 - 30

If I update the value for timestamp 5:01 (value = 25) using my client app then it becomes modified (5:01 - 20 and 5:01 - 25).
If I read the raw values (isReadModified is set to FALSE) then the server should return the following:
5:00 - 10
5:01 - 25
5:02 - 30
(including timestamp 5:01 with latest modified value(?)).

If I read modified values (isReadModified is set to TRUE) then I should only get two values for timestamp 5:01 (5:01 - 20 and 5:01 - 25), (but 5:00 and 5:02 will not be included because they are not modified)

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 109
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
07/20/2023 - 01:03
sp_Permalink sp_Print

Some clarifications: A Historian is not required to support modification of historical data and if it does it is not required to store old values (modified records).  With that said most historian do support this functionality.  The read raw (isReadModified is set to FALSE) behaviour you are describing is correct.  But the isReadModified is set to True is not -  you would get a structure back that has more information

From the specification: "it reads the ModifiedValues, StatusCodes, timestamps, modification type, the user identifier, and the timestamp of the modification from the history database for the specified time domain for one or more HistoricalDataNodes. If there are multiple replaced values the Server shall return all of them. The updateType specifies what value is returned in the modification record. If the updateType is INSERT the value is the new value that was inserted. If the updateType is anything else the value is the old value that was changed."

Assuming you replaced the value when changing it, you would see just the 20.

Paul

Paul Hunkar - DSInteroperability

Avatar
Ildar MIndiyarov_1
Member
Members
Forum Posts: 3
Member Since:
06/27/2023
sp_UserOfflineSmall Offline
3
07/20/2023 - 02:17
sp_Permalink sp_Print

Thank you for your response, Paul, it became clear.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 13
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1347
Posts: 4567