05/09/2016
Hi all.
Lets consider a scenario for partial status code calculation based on aggregate, Count.
Say the input data is as follows (provided in OPC UA doc for historian 1) with the parameters Start time: 12:00:00 End time: 12:01:40 Interval: 00:00:16
TimeStamp – value – statusCode
12:00:00 _ BadNoData
12:00:05 _ BadNoData
12:00:10 10 Good
12:00:15 15 Good,Interpolated
12:00:20 20 Good
12:00:25 25 Good,Interpolated
12:00:30 30 Good
12:00:35 35 UncertainDataSubNormal, Interpolated
… (end time stamps concerned with partial calculation)
12:01:15 75 UncertainDataSubNormal, Interpolated
12:01:20 80 Good
12:01:25 85 Good,Interpolated
12:01:30 90 Good
12:01:35 90 UncertainDataSubNormal, Interpolated
The Partial status bit calculation says: SET SOMETIMES, If an interval is not a complete interval.
The ouput is:
TimeStamp – value – statusCode
12:00:00 1 Good, Calculated,Partial
12:00:16 2 Good, Calculated
… (end 2 time stamps concerned with partial calculation)
12:01:20 2 Good, Calculated,Partial
12:01:36 2 BadNoData
As per the above output given, the partial bit is considered for calculation based on Start time and End time by checking if the data is available at the start time and the end time.
But as the definition and calculation of partial bit is concerned (SET SOMETIMES, If an interval is not a complete interval), partial bit calculation should be taken care of in every processing Interval.
So if we go as per the definition of partial calculation; For the interval 12:00:16, the output should be;
12:00:16 2 Good, Calculated, Partial
because our input has no data at 12:00:16. (Note 1st interval is from 12:00:00 to 12:00:16 and the next from 12:00:16 to 12:00:32).
Please explain how the output calculation given in the OPC UA document holds correct or am I missing anything here.
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
Siddhartha,
“Partial bit is used to indicate that the interval is not a complete interval and that a client may receive a different value for the Aggregate if it re-fetches the interval with the same parameters.”
Partial is used if the complete interval does not have data available, the first interval is for 12:00:00 – 12:00:16 which is missing values, in that the historian was not running prior to 12:00:10. Someone could fill in data from before the historian was running, thus it is considered partial. The second interval is from 12:00:16- 12:00:32 – in this interval there is data for the entire interval, the historian was running and collecting data. The result would not change if it is being recalculated later (historian filled in more data at the end – or maybe earlier data is added). It is important to note that the time stamp is the timestamp of the start of the interval, for 12:00:16 is the second interval.
Partial is much like bounding in that if there is a value before the interval and one after the interval than the interval is covered and it would not be partial.
Paul
Paul Hunkar - DSInteroperability
02/12/2016
Hello Paul,
I have an extended question on the same topic.
Your explanation of Partial is perfectly fine if i have the visibility of entire historian data.
As an aggregate library developer, I will be processing one interval at a time. Some times I might not have knowledge about the data of previous interval and later interval . In this case how can I evaluate the partial bit for the current interval if it does not have start and end bounding values?
Thanks & Regards
Samba
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
Samba,
If you are generating a generic library for calculating aggregates – one in which the data is also provided to the library call, then you can not determine “partial” unless the caller provides the information (i.e. was the data source complete for the interval). Most implementation I have seen are part of a historian or subscription service. The historian has knowledge as to when a collection was running so the partial bit is easy to set. A subscription does not return partial ever, since it starts on a boundary and end at the end of the boundary and thus always has data for the entire interval.
Paul
Paul Hunkar - DSInteroperability
1 Guest(s)