SourceTimestamp on DataValue|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
SourceTimestamp on DataValue
Avatar
Thomas Koehrsen
Denmark
New Member
Members
Forum Posts: 1
Member Since:
08/24/2023
sp_UserOfflineSmall Offline
1
04/16/2024 - 04:43
sp_Permalink sp_Print

We have an OPC UA Server implementation that is front-end to a lot of ‘Non OPC UA’ Data sources.

In this regard we have run into an implementation/state issue with timestamp on DataValue.

Under normal operation we set the SourceTimestamp and StatusCode of the DataValue based on the Quality and Timestamp from the Data source.

However! If the connectivity to the data source is lost. We then update SourceTimestamp with time of disconnect and statusCode with Bad.

When the connectivity is reestablished data source timestamp and Quality is reapplied to SourceTimestamp and statusCode.

The effect of this can be that the SourceTimestamp can jump backwards I time.

This behavior seems wrong as it can lead to invalid time series as the series is not chronologically correct.

According to https://reference.opcfoundatio…..docs/7.7.3 text says :

” In the case of a bad or uncertain status sourceTimestamp is used to reflect the time that the source recognized the non-good status or the time the Server last tried to recover from the bad or uncertain status.”

Does the above mean that we must update the statusCode to good and SourceTimestamp to timestamp of reconnect? It’s not explicitly saying this but could be a solution to timestamps in chronological order.

Avatar
Randy Armstrong
Admin
Forum Posts: 1578
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/20/2024 - 05:32
sp_Permalink sp_Print

The spec does not specify the clock to use when setting the SourceTimestamp when Bad.

You could use an estimate of the Data source clock by caching a delta from the Server clock.

But this would not eliminate the risk of a discontinuity because the Data source could change when it comes back online.

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