If an Ag re ate is takin a lon time to calc late an is a pro c in the time ut time, the Serv r may return p rtial res lts with a contin ation p int.. If e dTime is les than startTime, or
Terms and definitions
For the purposes of this document, the terms and definitions given in IEC TR 62541 -1 , IEC 62541 -3, IEC 62541 -4, and IEC 62541 -1 3 as well as the following apply
Annotation metadata associated with an item at a given instance in time
Note 1 to entry: An Annotation is metadata that is associated with an item at a given instance in time There does not have to be a value stored at that time
BoundingValues values associated with the starting and ending time
BoundingValues refer to the values linked to the starting and ending times of a ProcessingInterval when accessing data from the historian Clients may need these values to identify the starting and ending data points within a specified time range If a raw data value is present at the beginning or end of the request, it is classified as the bounding value However, if no raw data value is available at these points, the Server will establish the boundary value, which may involve data from outside the requested range For further information on utilizing BoundingValues, refer to section 4.4.
Object, Variable, Property or View in the AddressSpace where a Client can access historical data or Events
A HistoricalNode refers to any Object, Variable, Property, or View within the AddressSpace that allows a Client to read and update historical data or Events.
“HistoricalNode’s history” or “history of a HistoricalNode” will refer to the time series data or Events stored for this HistoricalNode The term HistoricalNode refers to both HistoricalDataNodes and HistoricalEventNodes
Variable or Property in the AddressSpace where a Client can access historical data
A HistoricalDataNode signifies any Variable or Property within the AddressSpace that allows a Client to read or update historical data The term "history of a HistoricalDataNode" pertains to the time series data associated with this node, which includes various examples of such data.
• device data (like temperature sensors),
• status information (open/closed, moving),
• dynamically changing system data (like stock quotes),
The term HistoricalDataNodes is used when referencing aspects of the standard that apply to accessing historical data only
Object or View in the AddressSpace for which a Client can access historical Events
Note 1 to entry: “HistoricalEventNode’s history” or “history of a HistoricalEventNode” refers to the time series Events stored in some historical system Examples of such data are:
• system triggers (such as new orders to be processed)
The term HistoricalEventNode is used when referencing aspects of the standard that apply to accessing historical Events only
HistoricalDataNode’s value that has been changed (or manually inserted or deleted) after it was stored in the historian
In some servers, a lab data entry value may not be classified as modified; however, if a user corrects a lab value, the original value is deemed modified and will be returned in requests for modified values Additionally, manually entering a value that was overlooked by a standard collection system can also be considered modified By default, all historical services utilize the most recent value for the specified HistoricalDataNode at the given timestamp Requests for modified values allow access to values that have been superseded, deleted, or inserted, with the determination of what constitutes a modified value left to the system When a server has modified data for an entry in the historical collection, it will indicate this by setting the ExtraData bit in the StatusCode.
3.1 7 raw data data that is stored within the historian for a HistoricalDataNode
The data associated with the DataValue can encompass all collected information or a specific subset, depending on the historian and the storage rules applied during the saving of the item's values.
StartTime/EndTime bounds of a history request which define the time domain
For all requests, values at the end time of the time domain are excluded, ensuring that requests for successive, contiguous time domains capture every value in the historical collection exactly once.
TimeDomain interval of time covered by a particular request, or response
In general, the time domain begins at the start time and ends just before the end time, regardless of whether the start time is earlier than or the same as the end time Even if the end time is earlier than the start time, the time domain still starts at the start time and concludes just before the end time, effectively running "backward" for that specific request and response Notably, any value that coincides exactly with the end time is excluded from the TimeDomain For further clarification, refer to the examples in section 4.4, which also discusses how BoundingValues affect the time domain.
All timestamps that can be legally represented in the UtcTime DataType are considered valid, and servers should not return an invalid argument result code for timestamps outside their data range For details on the range and granularity of this DataType, refer to IEC 62541 -3 Servers are expected to manage out-of-bounds timestamps effectively and provide appropriate StatusCodes to the Client.
Structured History Data structured data stored in a history collection where parts of the structure are used to uniquely identify the data within the data collection
Most historical data applications treat each timestamp as a unique identifier for a single current value However, certain data or metadata, like Annotations, can allow for multiple values at the same timestamp In these instances, the server utilizes one or more parameters from the Structured History Data entry to uniquely identify each element within the history collection, with Annotations serving as a key example of Structured History Data.
Abbreviations
General
This standard outlines the management of historical time series and Event data within the OPC Unified Architecture, detailing how historical data and Events are represented in the AddressSpace.
Data architecture
A Server with Historical Access enables Clients to seamlessly access various historical data and Event sources, such as process and event historians This historical information may reside in proprietary data collections, databases, or temporary memory buffers The Server facilitates access to historical data and Events for all or specific Variables, Objects, Properties, or Views within its AddressSpace.
Figure 1 illustrates how the AddressSpace of a UA Server might consist of a broad range of different historical data and/or historical Event sources
OPC UA Historical Access Server server client
OPC UA Historical Access Server
OPC-COM Server (DA or A&E)
Figure 1 – Possible OPC UA Server supporting Historical Access
The Server can function as an independent OPC UA Server, gathering data from either another OPC UA Server or different data sources Clients accessing the OPC UA Server with Historical Access can range from basic trending tools seeking values over specific time periods to sophisticated reporting systems that necessitate data in various formats.
Timestamps 1 0
OPC UA Historical Access necessitates the use of a single timestamp reference to connect multiple data points, allowing the Client to specify the desired reference timestamp For further details, refer to IEC 62541 -4 regarding the TimestampsToReturn enumeration.
UA Server supporting Historical Access will treat the various timestamp settings as described below A HistoryRead with invalid settings will be rejected with Bad_TimestampsToReturnInvalid (see IEC 62541 -4)
For HistoricalDataNodes, the SourceTimestamp is used to determine which historical data values are to be returned
The request specifies the use of SourceTimestamp, but the response may include SourceTimestamp, ServerTimestamp, or both It is important to note that if the response contains the ServerTimestamp, the timestamps may not align with the requested time range.
BOTH_2 Return both the SourceTimestamp and ServerTimestamp
NEITHER_3 This is not a valid setting for any HistoryRead accessing
HistoricalDataNodes Any reference to timestamps in this context throughout this standard will represent either ServerTimestamp or SourceTimestamp as dictated by the type requested in the HistoryRead
Service Some Servers may not support historizing both SourceTimestamp and ServerTimestamp, but it is expected that all Servers will support historizing SourceTimestamp (see IEC 62541 -7 for details on Server Profiles)
If a request is made requesting both ServerTimestamp and SourceTimestamp and the Server is only collecting the SourceTimestamp the Server shall return Bad_TimestampsToReturnInvalid
For HistoricalEventNodes this parameter does not apply This parameter is ignored since the entries returned are dictated by the Event Filter See IEC 62541 -4 for details.
Bounding Values and time domain 1 1
When using the HistoryRead Service to access HistoricalDataNodes, users can enable the returnBounds flag to request BoundingValues For a detailed overview of the Extensible Parameter HistoryReadDetails, which encompasses StartTime, EndTime, and NumValuesPerNode, refer to section 6.4 Additionally, section 4.4 elaborates on the concept of Bounding Values and their impact on the requested time domain, providing examples of TimeDomains to clarify the expected behavior.
To request historical data using the HistoryRead Service, at least two of the following parameters must be specified: startTime, endTime, and numValuesPerNode The returned data when requesting Bounding Values depends on the parameters provided For example, if a historian has values recorded at 5:00, 5:02, 5:03, 5:05, and 5:06, the Read Raw functionality will return results as outlined in Table 1 In this context, FIRST represents a tuple with a null value, a timestamp corresponding to the specified StartTime, and a StatusCode of Bad_BoundNotFound, while LAST indicates a tuple with a null value, a timestamp for the specified EndTime, and a StatusCode of Bad_BoundNotFound.
Locating bounds, especially the FIRST or LAST points, can be resource-intensive for servers, making the search for bounding values dependent on server capabilities In some instances, the server may reach its search limits before identifying a bounding value Additionally, for specific use cases like reading annotations or attribute data, bounding values may not be suitable, allowing the server to return a StatusCode of Bad_BoundNotSupported.
Start Time End Time numValuesPerNode Bounds Data Returned
UNSPECI FI ED 5:06 6 Yes 5: 06,5:05,5:03,5: 02, 5:00,FIRST b
UNSPECI FI ED 4:48 6 Yes 5: 00, FI RST
UNSPECI FI ED 4:48 6 No NODATA
Start Time End Time numValuesPerNode Bounds Data Returned
The LAST timestamp cannot be set to the specified End Time due to the absence of a defined End Time; therefore, it will be adjusted to the previous timestamp plus one second Similarly, the FIRST timestamp cannot be assigned the specified End Time because there is no defined Start Time, resulting in it being set to the previous timestamp minus one second When the Start Time equals the End Time and data is available at that moment, with Bounds set to True, the start bounds will match the Start Time, while the next data point will determine the end bounds.
Changes in AddressSpace over time 1 3
Clients utilize the browse Services of the View Service Set to explore the AddressSpace and identify HistoricalNodes along with their attributes These Services deliver the latest information regarding the AddressSpace, which may evolve over time, including changes to TypeDefinitions and modifications to NodeIds, such as additions or deletions.
Server developers and administrators must recognize that changes to the AddressSpace can affect a Client's access to historical data If a HistoricalNode's history is still needed but it is no longer being historized, the Object should remain in the AddressSpace with the correct AccessLevel and Historizing Attribute settings, as outlined in IEC 62541-3 regarding access levels.
HistoricalNodes 1 3
The Historical Access model defines additional Properties that are applicable for both HistoricalDataNodes and HistoricalEventNodes
The DataVariable or Object that has Annotation data will add the Annotations Property (see Table 2 below)
Name Use Data Type Description
Annotations O Annotation The Annotations Property is used to indicate that Annotation data exists for the history collection exposed by a HistoricalDataNode Annotation DataType is defined in 5.5
Since it is not allowed for Properties to have Properties, the Annotation Property is only available for DataVariables or Objects
Not all HistoricalDataNodes in the AddressSpace include Annotation data, as indicated by the Annotations Property, which shows whether a HistoricalDataNode supports Annotations Access to Annotation data is facilitated through standard HistoryRead functions, while modifications, insertions, or deletions of Annotations are performed using standard HistoryUpdate functions.
As with all HistoricalNodes, modifications, deletions or additions of Annotations will raise the appropriate Historical Audit Event with the corresponding NodeId.
HistoricalDataNodes 1 4
General 1 4
The Historical Data model defines additional ObjectTypes and Objects These descriptions also include required use cases for HistoricalDataNodes.
HistoricalDataConfigurationType 1 4
The Historical Access Data model enhances the standard type model through the introduction of the HistoricalDataConfigurationType This object outlines the essential features of a Node that specifies the historical configuration for any HistoricalDataNode designed to store history, as detailed in Table 3.
All Instances of the HistoricalDataConfigurationType use the standard BrowseName as defined in Table 6
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasComponent Object AggregateConfiguration AggregateConfigurationTy pe Mandatory
HasComponent Object AggregateFunctions FolderType Optional
HasProperty Variable Stepped Boolean PropertyType Mandatory
HasProperty Variable Definition String PropertyType Optional
HasProperty Variable MaxTimeI nterval Duration PropertyType Optional
HasProperty Variable MinTimeI nterval Duration PropertyType Optional
HasProperty Variable ExceptionDeviation Double PropertyType Optional
HasProperty Variable ExceptionDeviationForm at Enum PropertyType Optional
HasProperty Variable StartOfArchive UtcTime PropertyType Optional
HasProperty Variable StartOfOnlineArchive UtcTime PropertyType Optional
The AggregateConfiguration Object serves as the entry point for understanding how the Server manages Aggregate-specific functionalities, including the handling of uncertain data This Object must be included, even if it does not contain any Aggregate configuration Objects Aggregates are defined according to IEC 62541-1 3.
AggregateFunctions serves as the primary access point for exploring all historical access capabilities supported by the Server Users can browse all HistoryAggregates available through this Object, which are defined according to IEC 62541-1 3 standards.
The Stepped Variable determines the display method for historical data, allowing it to be shown as either SlopedInterpolation (a sloped line between points) or SteppedInterpolation (vertically-connected horizontal lines) This property also influences the calculation of certain aggregates A value of True activates the stepped interpolation mode, while a value of False indicates the use of SlopedInterpolation, with the default setting being False.
The Definition Variable is a vendor-specific, human-readable string that outlines the calculation method for the value of a HistoricalDataNode This definition is non-localized and typically includes an equation that can be interpreted by specific clients.
The MaxTimeInterval Variable specifies the maximum interval between data points in the history repository regardless of their value change (see IEC 62541 -3 for definition of Duration)
The MinTimeInterval Variable specifies the minimum interval between data points in the history repository regardless of their value change (see IEC 62541 -3 for definition of Duration)
The ExceptionDeviation Variable specifies the minimum amount that the data for the HistoricalDataNode shall change in order for the change to be reported to the history database
The ExceptionDeviationFormat Variable specifies how the ExceptionDeviation is determined Its values are defined in Table 4
The StartOfArchive Variable specifies the date before which there is no data in the archive either online or offline
The StartOfOnlineArchive Variable specifies the date of the earliest data in the online archive
ABSOLUTE_VALUE_0 ExceptionDeviation is an absolute Value
PERCENT_OF_VALUE_1 ExceptionDeviation is a percentage of Value
PERCENT_OF_RANGE_2 ExceptionDeviation is a percentage of I nstrumentRange
PERCENT_OF_EU_RANGE_3 ExceptionDeviation is a percentage of EURange (see IEC 62541 -8)
UNKNOWN_4 ExceptionDeviation type is Unknown or not specified.
HasHistoricalConfiguration ReferenceType 1 5
This concrete ReferenceType serves as a direct subtype of the Aggregates ReferenceType, enabling references from a Historical Node to multiple HistoricalDataConfigurationType Objects.
The semantic indicates that the target Node is utilized by the source Node of the Reference Figure 2 illustrates the position of this ReferenceType within the OPC UA hierarchy, while its representation in the AddressSpace is detailed in Table 5.
Figure 2 – ReferenceType hierarchy Table 5 – HasHistoricalConfiguration ReferenceType
The subtype of Aggregates ReferenceType is defined in I EC 62541 -5.
Historical Data Configuration Object 1 6
The Object serves as the entry point for browsing information about HistoricalDataNode configuration, as defined in its type in Table 3 and formally in Table 6 A HistoricalDataNode with a defined configuration will have a BrowseName of 'HA Configuration', while additional configurations can have unique BrowseNames All Historical Configuration Objects should be referenced using the HasHistoricalConfiguration ReferenceType, and it is advisable to select display names that clearly describe the historical configuration, such as "1 Second Collection" or "Long Term Configuration."
Table 6 – Historical Access configuration definition
Class BrowseName DataType TypeDefinition Modelling
HistoricalDataNodes Address Space Model 1 7
HistoricalDataNodes are always a part of other Nodes in the AddressSpace They are never defined by themselves A simple example of a container for HistoricalDataNodes would be a
Figure 3 illustrates the basic AddressSpace Model of a DataVariable that includes History
Attribute Value DataType AccessLevel Historizing
MaxTimeI nterval MinTimeI nterval ExceptionDeviation ExceptionDeviationFormat
IEC Figure 3 – Historical Variable with Historical Data Configuration and Annotations
Each HistoricalDataNode containing history must have a defined Historizing Attribute, as outlined in IEC 62541 -3, and may link to a HistoricalAccessConfiguration Object If the HistoricalDataNode is a Property, it inherits values from its Parent Property.
Not all variables in the AddressSpace may have historical data To determine the availability of this data, a Client should check the HistoryRead/Write states within the AccessLevel Attribute, as detailed in IEC 62541 -3.
Figure 3 only shows a subset of Attributes and Properties Other Attributes that are defined for Variables in IEC 62541 -3, may also be available.
Attributes 1 7
Subclause 5.2.6 lists the Attributes of Variables that have particular importance for historical data They are specified in detail in IEC 62541 -3
HistoricalEventNodes 1 8
General 1 8
The Historical Event model defines additional Properties These descriptions also include required use cases for HistoricalEventNodes
Historical Access of Events uses an EventFilter It is important to understand the differences between applying an EventFilter to current Event Notifications, and historical Event retrieval
Real-time monitoring allows users to receive Event Notifications by subscribing to an EventNotifier The EventFilter plays a crucial role in filtering and selecting content for Event Subscriptions When an Event Notification matches the criteria specified by the where parameter in the EventFilter, it is forwarded to the Client.
In historical event retrieval, the EventFilter is crucial for filtering and selecting content, defining the parameters of events recorded in history It is important to note that not all parameters from the real-time event may be included, as some fields available at the time of the event's generation might not have been stored in the historical record.
The HistoricalEventFilter is subject to change, allowing clients to specify any field for any EventType within the EventFilter If a specified field is not present in the historical collection, it will be set to null when referenced in the selectClause or whereClause.
HistoricalEventFilter Property 1 8
A HistoricalEventNode that has Event history available will provide the Property This Property is formally defined in Table 7
Name Use Data Type Description
HistoricalEventFilter M EventFilter A filter used by the Server to determine which
HistoricalEventNode fields are available in history I t may also include a where clause that indicates the types of Events or restrictions on the Events that are available via the
The HistoricalEventFilter Property serves as a reference for the Event fields currently stored by the Historian; however, it does not necessarily reflect the full range of Event fields that the Historian is capable of storing.
HistoricalEventNodes Address Space Model 1 8
HistoricalEventNodes are specific Objects or Views within the AddressSpace that present historical Events Identified by the EventNotifier Attribute, these Nodes offer a historical subset of the Events produced by the Server.
Each HistoricalEventNode is represented by an Object or View with a specific set of Attributes The HistoricalEventFilter Property specifies the fields available in the history
Not all Objects or Views in the AddressSpace qualify as HistoricalEventNodes; only those containing historical Events can be classified as such To determine the availability of historical Events, a Client should check the HistoryRead/Write states within the EventNotifier Attribute, as detailed in IEC 62541-3.
Figure 4 illustrates the basic AddressSpace Model of an Event that includes History
Attribute EventNotifier ->subscribToEvent=1 EventNotifier ->HistoryRead=1 EventNotifier ->HistoryWrite=1
Attribute EventNotifier ->subscribToEvent=1 EventNotifier ->HistoryRead=1 EventNotifier ->HistoryWrite=1
Attribute EventNotifier ->subscribToEvent=1 EventNotifier ->HistoryRead=1 EventNotifier ->HistoryWrite=1
Figure 4 – Representation of an Event with History in the AddressSpace
HistoricalEventNodes Attributes 1 9
Subclause 5.3.4 lists the Attributes of Objects or Views that have particular importance for historical Events They are specified in detail in IEC 62541 -3 The following Attributes are particularly important for HistoricalEventNodes
• EventNotifier The EventNotifier Attribute is used to indicate if the Node can be used to read and/or update historical Events.
Exposing supported functions and capabilities 1 9
General 1 9
OPC UA Servers offer a variety of functionalities and capabilities, utilizing standard Objects to present these features consistently Vendors can extend several standard-defined concepts, as detailed in IEC TR 62541-1.
Figure 5 – Server and HistoryServer Capabilities
HistoryServerCapabilitiesType
The ServerCapabilitiesType Objects for any OPC UA Server supporting Historical Access shall contain a Reference to a HistoryServerCapabilitiesType Object
The content of this BaseObjectType is already defined by its type definition in IEC 62541 -5 The Object extensions are formally defined in Table 8
The properties outlined are designed to provide Clients with an overview of the Server's general capabilities; however, they do not ensure that all features will be accessible for every Node For instance, certain Nodes may lack support for Events, or an aggregating Server may encounter limitations if underlying Servers do not support Insert or a specific Aggregate In these instances, the HistoryServerCapabilities Property will reflect the supported capabilities, while the Server will return relevant StatusCodes when a capability is not applicable.
References NodeClass Browse Name Data
Type Type Definition ModelingRule HasProperty Variable AccessHistoryDataCapability Boolean PropertyType Mandatory HasProperty Variable AccessHistoryEventsCapability Boolean PropertyType Mandatory
HasProperty Variable MaxReturnDataValues UI nt32 PropertyType Mandatory
HasProperty Variable MaxReturnEventValues UI nt32 PropertyType Mandatory
HasProperty Variable InsertDataCapability Boolean PropertyType Mandatory
HasProperty Variable ReplaceDataCapability Boolean PropertyType Mandatory
HasProperty Variable UpdateDataCapability Boolean PropertyType Mandatory
HasProperty Variable DeleteRawCapability Boolean PropertyType Mandatory
HasProperty Variable DeleteAtTimeCapability Boolean PropertyType Mandatory
HasProperty Variable InsertEventCapability Boolean PropertyType Mandatory
HasProperty Variable ReplaceEventCapability Boolean PropertyType Mandatory
HasProperty Variable UpdateEventCapability Boolean PropertyType Mandatory
HasProperty Variable DeleteEventCapability Boolean PropertyType Mandatory
HasProperty Variable InsertAnnotationsCapability Boolean PropertyType Mandatory
HasComponent Object AggregateFunctions FolderType Mandatory
All UA Servers that support Historical Access shall include the HistoryServerCapabilities as part of its ServerCapabilities
The AccessHistoryDataCapability Variable determines whether the Server can access historical data values A True value signifies support for historical access to HistoricalNodes, while a False value indicates no support The default setting is False For the Server to qualify as a valid OPC, at least one of the capabilities—AccessHistoryDataCapability or AccessHistoryEventsCapability—must be set to True.
UA Server supporting Historical Access
The AccessHistoryEventCapability Variable determines whether the server can access historical Events, with a True value indicating support and a False value indicating no support The default setting is False For a server to qualify as a valid OPC UA Server supporting Historical Access, at least one of the AccessHistoryDataCapability or AccessHistoryEventsCapability must be set to True.
The MaxReturnDataValues Variable specifies the maximum number of values the Server can return for each HistoricalNode during a request, with a value of 0 indicating no imposed limit However, even with MaxReturnValues set to 0, the Server may still limit the number of returned values and provide a continuation point, as external system constraints may apply The default setting for this variable is 0.
Similarily, the MaxReturnEventValues specifies the maximum number of Events that a Server can return for a HistoricalEventNode
The InsertDataCapability variable signifies whether the Insert capability is supported When set to True, it indicates that the Server can insert new data values into history without overwriting existing ones, while the default setting is False.
The ReplaceDataCapability variable signifies whether the Replace capability is supported A value of True means the server can replace existing data values in history, but it will not add new values By default, this variable is set to False.
The UpdateDataCapability Variable signifies the support for the Update capability, where a value of True indicates that the Server can insert new data values into history when none exist and replace existing values By default, this variable is set to False.
The DeleteRawCapability Variable signifies whether the server can delete raw data values from history, with a True value indicating support for this capability By default, the value is set to False.
The DeleteAtTimeCapability Variable signifies whether the server can delete a data value at a specified time, with a value of True indicating support for this feature By default, the value is set to False.
The InsertEventCapability Variable signifies whether the Insert capability is supported, with a True value indicating that the Server can add new Events to history It is important to note that an insert does not replace existing entries, and the default value is set to False.
The ReplaceEventCapability variable signifies the support for the Replace functionality, with a True value indicating that the Server can replace existing Events in history rather than simply inserting new ones By default, this variable is set to False.
The UpdateEventCapability Variable signifies the support for the Update feature, with a True value indicating that the Server can insert new Events into history when none are present and replace existing values By default, this value is set to False.
The DeleteEventCapability variable signifies whether the server supports the deletion of historical events A value of True indicates that the server can delete events, while the default setting is False.
The InsertAnnotationCapability variable signifies whether Annotations are supported, with a value of True indicating that the Server can insert Annotations Additionally, Servers that allow the insertion of Annotations may also permit their editing and deletion By default, this variable is set to False.
AggregateFunctions serves as the primary access point for exploring all Aggregate capabilities available on the Server for Historical Access Users can browse all supported HistoryAggregates starting from this Object, as defined in IEC 62541-1 3 If the Server does not support Aggregates, the Folder will remain empty.
Annotation DataType
This DataType describes Annotation information for the history data items Its elements are defined in Table 9
The Annotation Structure includes several key components: the message, which is a string representing the text of the annotation; the username, a string identifying the user who added the annotation as provided by the underlying system; and the annotationTime, recorded in UtcTime, indicating when the annotation was added This timestamp may differ from other recorded times.
Historical Audit Events
General
AuditEvents are created when a Client performs an action on the Server, such as writing to a Variable, prompting the Server to generate an AuditEvent that identifies the Variable, user, and Client Session involved While not all Servers support auditing, those that do must adhere to the specifications outlined in section 5.6 of IEC 62541-7 Servers are required to produce Events of the AuditHistoryUpdateEventType for every invocation of the HistoryUpdate Service on any HistoricalNode, as detailed in IEC 62541-3 and IEC 62541-5 When the HistoryUpdate Service is used to insert Historical Events, the resulting AuditHistoryEventUpdateEventType must include the EventId of the inserted Event along with a description indicating its insertion Conversely, if the HistoryUpdate Service is invoked to delete records, the AuditHistoryDeleteEventType or its sub-types must be generated, with further information available in section 6.7 regarding updates to historical data or Events.
Utilizing the Delete raw or Delete modified features will trigger an AuditHistoryRawModifyDeleteEventType event or its sub-types The Delete at time function will generate an AuditHistoryAtTimeDeleteEventType event or its sub-types Additionally, employing the Delete Event function will result in an AuditHistoryEventDeleteEventType event or its sub-types All other updates must adhere to the guidelines outlined in the AuditHistoryUpdateEventType model.
AuditHistoryEventUpdateEventType
This subtype of AuditHistoryUpdateEventType is specifically designed for categorizing events related to History Event updates It inherits all the behaviors of its parent type, and its representation in the AddressSpace is formally outlined in Table 10.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryUpdateEventType defined in I EC 62541 -3, i.e it has HasProperty References to the same Nodes.
HasProperty Variable UpdatedNode NodeId PropertyType Mandatory
HasProperty Variable PerformInsertReplace PerformUpdateType PropertyType Mandatory
HasProperty Variable Filter EventFilter PropertyType Mandatory
HasProperty Variable NewValues HistoryEventFieldList [ ] PropertyType Mandatory HasProperty Variable OldValues HistoryEventFieldList [ ] PropertyType Mandatory
This EventType inherits all Properties of the AuditHistoryUpdateEventType Their semantic is defined in IEC 62541 -5
The UpdateNode identifies the Attribute that was written on the SourceNode
The PerformInsertReplace enumeration reflects the parameter on the Service call
The Filter reflects the Event filter passed on the call to select the Events that are to be updated
The NewValues identify the value that was written to the Event
The OldValues represent the values held by Events prior to an update It is permissible for a Server lacking this information to return a null value, particularly in the case of an insert, where a null value is anticipated.
Both the NewValues and the OldValues will contain Events with the appropriate fields, each with appropriately encoded values.
AuditHistoryValueUpdateEventType
This subtype of AuditHistoryUpdateEventType is specifically designed for categorizing events related to history value updates It inherits all behaviors from its parent type, and its representation in the AddressSpace is formally outlined in Table 1.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryUpdateEventType defined in IEC 62541 -3, i e it has HasProperty References to the same Nodes.
HasProperty Variable UpdatedNode NodeI d PropertyType Mandatory
HasProperty Variable PerformInsertReplace PerformUpdateTyp e PropertyType Mandatory
HasProperty Variable NewValues DataValue[] PropertyType Mandatory
HasProperty Variable OldValues DataValue[] PropertyType Mandatory
This EventType inherits all Properties of the AuditHistoryUpdateEventType Their semantic is defined in IEC 62541 -5
The UpdatedNode identifies the Attribute that was written on the SourceNode
The PerformInsertReplace enumeration reflects the parameter on the Service call
The NewValues identify the value that was written to the Event
The OldValues represent the value held by the Event prior to the write operation If a Server lacks this information, it is permissible to return a null value, which is expected in the case of an insert.
Both the NewValues and the OldValues will contain a value in the DataType and encoding used for writing the value.
AuditHistoryDeleteEventType
This subtype of AuditHistoryUpdateEventType is specifically designed for categorizing events related to history deletion It inherits all behaviors from its parent type, and its representation in the AddressSpace is formally outlined in Table 1.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryUpdateEventType defined in I EC 62541 -3, i e it has HasProperty References to the same Nodes.
HasProperty Variable UpdatedNode NodeI d PropertyType Mandatory
HasSubtype ObjectType AuditHistoryRawModifyDeleteEventT ype HasSubtype ObjectType AuditHistoryAtTimeDeleteEventType
This EventType inherits all Properties of the AuditUpdateEventType Their semantic is defined in IEC 62541 -5
The NodeId identifies the NodeId that was used for the delete operation.
AuditHistoryRawModifyDeleteEventType
This subtype of AuditHistoryDeleteEventType is specifically designed for categorizing events related to history deletion It inherits all behaviors from its parent type, and its representation in the AddressSpace is formally outlined in Table 1-3.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryDeleteEventType defined in Table 1 2, i.e it has HasProperty References to the same Nodes.
HasProperty Variable IsDeleteModified Boolean PropertyType Mandatory
HasProperty Variable StartTime UtcTime PropertyType Mandatory
HasProperty Variable EndTime UtcTime PropertyType Mandatory
HasProperty Variable OldValues DataValue[] PropertyType Mandatory
This EventType inherits all Properties of the AuditHistoryDeleteEventType Their semantic is defined in 5.6.4
The isDeleteModified reflects the isDeleteModified parameter of the call
The StartTime reflects the starting time parameter of the call
The EndTime reflects the ending time parameter of the call
The OldValues represent the historical values prior to deletion, and it is essential for a Server to report all deleted values If a Server lacks this information, it may report a null value Additionally, the OldValues will include the value in the appropriate DataType and encoding used during the writing process.
AuditHistoryAtTimeDeleteEventType
This subtype of AuditHistoryDeleteEventType is specifically designed for categorizing events related to history deletion It inherits all behaviors from its parent type, and its representation in the AddressSpace is formally outlined in Table 1-4.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryDeleteEventType defined in Table 1 2, i.e it has HasProperty References to the same Nodes.
HasProperty Variable ReqTimes UtcTime[] PropertyType Mandatory
HasProperty Variable OldValues DataValues[] PropertyType Mandatory
This EventType inherits all Properties of the AuditHistoryDeleteEventType Their semantic is defined in 5.6.7
The ReqTimes reflect the request time parameter of the call
The OldValues attribute represents the historical value prior to deletion, and it is essential for a Server to report all deleted values If a Server lacks this information, it may appropriately return a null value The OldValues will include the value in the specified DataType and encoding used during the writing process.
AuditHistoryEventDeleteEventType
This subtype of AuditHistoryDeleteEventType is specifically designed for categorizing events related to history deletion It inherits all behaviors from its parent type, and its representation in the AddressSpace is formally outlined in Table 15.
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of the AuditHistoryDeleteEventType defined in Table 1 2, i.e it has HasProperty References to the same Nodes.
HasProperty Variable EventIds ByteString[] PropertyType Mandatory
HasProperty Variable OldValues HistoryEventFieldList PropertyType Mandatory
This EventType inherits all Properties of the AuditHistoryDeleteEventType Their semantic is defined in 5.6.4
The EventIds reflect the EventIds parameter of the call
The OldValues represent the historical data prior to deletion, and it is essential for a Server to report all deleted values If a Server lacks this information, it may report a null value Each OldValue will include an Event with the necessary fields, all containing properly encoded values.
6 Historical Access specific usage of Services
General
IEC 62541 -4 specifies all Services needed for OPC UA Historical Access In particular:
• The Browse Service Set or Query Service Set to detect HistoricalNodes and their configuration
• The HistoryRead and HistoryUpdate Services of the Attribute Service Set to read and update history of HistoricalNodes.
Historical Nodes StatusCodes
Overview
6.2 defines additional codes and rules that apply to the StatusCode when used for HistoricalNodes
The general structure of the StatusCode is specified in IEC 62541 -4 It includes a set of common operational result codes which also apply to historical data and/or Events.
Operation level result codes
In OPC UA Historical Access, the StatusCode signifies the conditions under which a Value or Event was stored, serving as a usability indicator Given the complexities of historical data and Events, it is essential to provide the Client with additional information beyond the basic quality and call result code This includes details such as whether the value is stored in the data repository, if the result was Interpolated, and whether all data inputs for a calculation were of good quality.
In the following, Table 1 6 contains codes with Bad severity indicating a failure; Table 1 7 contains Good (success) codes
The codes specific to OPC UA Historical Access complement the general codes applicable to all data types, as outlined in IEC 62541-4, IEC 62541-8, and IEC 62541-1.
Table 1 6 – Bad operation level result codes
Bad_NoData No data exists for the requested time range or Event filter
Bad_BoundNotFound No data found to provide upper or lower bound value
Bad_BoundNotSupported Bounding Values are not applicable or the Server has reached its search limit and will not return a bound
Bad_DataLost Data is missing due to collection started/stopped/lost
Bad_DataUnavailable Expected data is unavailable for the requested time range due to an un- mounted volume, an off-line historical collection, or similar reason for temporary unavailability
Bad_EntryExists The data or Event was not successfully inserted because a matching entry exists
Bad_NoEntryExists The data or Event was not successfully updated because no matching entry exists
Bad_TimestampNotSupported The Client requested history using a TimestampsToReturn the Server does not support (i e requested Server Timestamp when Server only supports SourceTimestamp)
Bad_InvalidArgument One or more arguments are invalid or missing
Bad_AggregateListMismatch The list of Aggregates does not have the same length as the list of operations
Bad_AggregateConfigurationReject ed The Server does not support the specified AggregateConfiguration for the
Bad_AggregateNotSupported The specified Aggregate is not valid for the specified Node
The result codes defined in IEC 62541-4:2015 include several important categories: "Bad_ArgumentsMissing," which indicates missing arguments; "Bad_TypeDefinitionInvalid," referring to an invalid type definition; and "Bad_SourceNodeIdInvalid," which signifies an invalid source node ID Additionally, "Bad_OutOfRange" denotes values that are out of the acceptable range, while "Bad_NotSupported" indicates unsupported operations The code "Bad_IndexRangeInvalid" points to an invalid index range, and "Bad_NotWriteable" signifies that a particular item is not writable For detailed descriptions of these result codes, please refer to the respective tables in the IEC 62541-4:2015 standard.
Table 1 7 – Good operation level result codes
Good_NoData No data exists for the requested time range or Event filter
Good_EntryInserted The data or Event was successfully inserted into the historical database
Good_EntryReplaced The data or Event field was successfully replaced in the historical database
Good_DataIgnored The Event field was ignored and was not inserted into the historical database
In the context of data handling, it's important to differentiate between Good and Bad Status codes related to missing data The Good_NoData code indicates that no data was found during a simple 'Read' request, while the Bad_NoData code is used when an action is requested for a specific interval but no data is available This distinction is crucial for users who expect data to be present during an action and need to be informed when their requested action cannot be executed due to the absence of data.
Good_NoData is returned for cases such as:
– ReadEvents where startTime=endTime, – ReadEvent data is requested and does not exist, – ReadRaw where data is requested and does not exist
Bad_NoData is returned for cases such as:
– ReadEvent data is requested and underlying historian does not support the requested field,
– ReadProcessed where data is requested and does not exist, – Any Delete requests where data does not exist
The above use cases are illustrative examples Detailed explanations on when each status code is returned are found in 6.4 and 6.7
Semantics changed
The StatusCode in addition contains an informational bit called Semantics Changed (see IEC 62541 -4)
UA Servers utilizing OPC UA Historical Access should avoid setting this bit and instead relay the StatusCode stored in the data repository Clients must recognize that the data values returned may have this bit activated.
Continuation Points
The continuationPoint parameter in the HistoryRead Service allows the Server to track where to resume reading data when not all values can be returned in a single response This value is opaque to the Client and is essential for maintaining state information on the Server For HistoricalDataNode requests, the Server may utilize the timestamp of the last returned data item, provided it is unique, which can minimize the need for the Server to store additional state information for the continuation point.
The Client specifies a maximum number of results per request, and the Server must not exceed this limit, although it may return fewer results If there are additional results to provide, the Server allocates a ContinuationPoint Fewer results may be returned due to buffer limitations or other internal constraints, and a ContinuationPoint may also be necessary due to HistoryRead parameter restrictions In cases where an Aggregate calculation is lengthy and nearing the timeout, the Server may return partial results along with a ContinuationPoint If the calculation exceeds the Client's timeout, the Server might return zero results but still provide a ContinuationPoint for resuming the calculation on the next Client read call For more information on ContinuationPoints and HistoryRead, refer to the HistoryReadDetails parameter in section 6.4.
When a Client specifies a ContinuationPoint, the HistoryReadDetails and TimestampsToReturn parameters are disregarded, as it is illogical to request different parameters when resuming from a prior call However, the dataEncoding parameter can be modified with each request.
If the Client specifies a ContinuationPoint that does not correspond with the last returned ContinuationPoint from the Server, then the Server shall return a Bad_ContinuationPointInvalid error
When the releaseContinuationPoints parameter is included in the request, the Server will not return any data and will release all ContinuationPoints specified If a ContinuationPoint is either missing or invalid for an operation, the StatusCode will be Bad_ContinuationPointInvalid.
HistoryReadDetails parameters
Overview
The HistoryRead Service outlined in IEC 62541 -4 offers various functions, with the HistoryReadDetails parameter serving as an Extensible Parameter that specifies the function to be executed along with its specific details For a comprehensive understanding of Extensible Parameters, refer to IEC 62541 -4, which includes Table 1 8 listing the symbolic names of valid Extensible Parameter structures Different functions may be performed by some structures depending on their associated parameter settings For instance, the phrase ‘using the Read modified functionality’ indicates the operation of the HistoryRead Service utilizing the Extensible Parameter structure ReadRawModifiedDetails, where the isReadModified Boolean parameter is set to TRUE.
ReadEventDetails Read event This structure selects a set of Events from the history database by specifying a filter and a time domain for one or more Objects or Views See 6.4 2.1
When this parameter is specified the Server returns a HistoryEvent structure for each operation (see 6.5.4)
The ReadRawModifiedDetails structure allows users to select a set of values from the history database by defining a time domain for one or more variables When this parameter is specified, the server returns a HistoryData structure for each operation.
ReadRawModifiedDetails Read modified This parameter selects a set of modified values from the history database by specifying a time domain for one or more Variables See 6.4.3.1
When this parameter is specified the Server returns a HistoryModifiedData structure for each operation (see 6.5.3)
ReadProcessedDetails Read processed This structure selects a set of Aggregate values from the history database by specifying a time domain for one or more Variables See 6.4.4.1
When this parameter is specified the Server returns a HistoryData structure for operation (see 6.5.2)
ReadAtTimeDetails Read at time This structure selects a set of raw or interpolated values from the history database by specifying a series of timestamps for one or more Variables See 6.4.5.1
When this parameter is specified the Server returns a HistoryData structure for each operation (see 6.5.2).
ReadEventDetails structure
The ReadEventDetails structure, as defined in Table 1 9, is applicable only to Objects with the EventNotifier Attribute set to TRUE, in accordance with IEC 62541 -3 It is essential to specify two of the three parameters: numValuesPerNode, startTime, and endTime.
The ReadEventDetails structure outlines the parameters necessary for conducting an Event history read It includes a counter, numValuesPerNode, which specifies the maximum number of values that can be returned for any Node within a given time range If only a single time is provided, the time range will adjust to return this specified number of values, with a default value of 0 indicating no maximum limit Additionally, the structure defines startTime and endTime as UtcTime parameters that mark the beginning and end of the reading period, respectively Both parameters default to DateTime.MinValue, signifying that they are unspecified if not provided.
The EventFilter is a crucial component utilized by the Server to identify which HistoricalEventNode should be included in the results It is mandatory to specify this parameter, with at least one EventField required The EventFilter is classified as an Extensible parameter type, defined and utilized similarly to monitored data items as outlined in IEC 62541-4 Additionally, this filter determines the EventFields that will be returned in response to the request.
The ReadEventDetails structure facilitates the retrieval of Events from the history database within a specified time domain for multiple HistoricalEventNodes Events are filtered according to the provided filter structure, which specifies the EventFields to be returned For a comprehensive understanding of the filter, please refer to IEC 62541 -4.
The startTime and endTime are used to filter on the Time field for Events
The time domain for a request is determined by the parameters startTime, endTime, and numValuesPerNode, with at least two of these parameters required If endTime is earlier than startTime, or if only endTime and numValuesPerNode are provided, the data will be returned in reverse order, presenting newer data first When all three parameters are specified, the results will be returned in either ascending or descending order based on the values of startTime and endTime, up to the limit set by numValuesPerNode If numValuesPerNode is set to 0, all values within the specified range will be returned Default values apply when any of the parameters are not specified.
The startTime and endTime can be the same, enabling the Client to request the Event at a specific moment When both times are identical, it is assumed that time is progressing forward If there is no data available at the specified time, the Server will respond with the Good_NoData StatusCode.
When startTime, endTime, and numValuesPerNode are specified, and if there are more than numValuesPerNode Events for a Node within that timeframe, only numValuesPerNode Events will be returned along with a ContinuationPoint To retrieve the next set of numValuesPerNode values, the Client must call HistoryRead again using the provided ContinuationPoint.
For an interval in which no data exists, the corresponding StatusCode shall be Good_NoData
The filter parameter specifies which historical events and their associated fields are retrieved While some fields of an EventType may support real-time updates, they might not be accessible from the historian In such instances, a StatusCode value will indicate any Event field that cannot be retrieved, specifically returning Bad_NoData.
If a Node does not support the requested TimestampsToReturn, the operation will return a Bad_TimestampNotSupported StatusCode This limitation specifically pertains to Event fields that are of the DataValue type when reading Events.
ReadRawModifiedDetails structure
Table 20 defines the ReadRawModifiedDetails structure Two of the three parameters, numValuesPerNode, startTime, and endTime shall be specified
The ReadRawModifiedDetails Structure defines the parameters for executing a "raw" or "modified" history read The isReadModified Boolean indicates whether to use Read Modified functionality (TRUE) or Read Raw functionality (FALSE), with a default value of FALSE The startTime parameter specifies the beginning of the period to read, defaulting to DateTime.MinValue if not set Similarly, the endTime parameter marks the end of the reading period, also defaulting to DateTime.MinValue if unspecified The numValuesPerNode counter determines the maximum number of values returned for any Node within the specified time range, with a default value of 0 indicating no maximum limit Lastly, the returnBounds Boolean parameter specifies whether to include bounds in the results.
TRUE Bounding Values should be returned FALSE All other cases
When using this structure to read Raw Values with isReadModified set to FALSE, it retrieves values, qualities, and timestamps from the history database for specified HistoricalDataNodes within a time domain This feature is designed for Clients seeking the actual data stored in the historian, which may be either compressed or consist of all raw data collected, depending on the historian and its storage rules If returnBounds is set to TRUE, the Bounding Values for the time domain are also returned, enabling Clients to interpolate values for the start and end times when displaying the actual data trends.
The time domain for a request is determined by the parameters startTime, endTime, and numValuesPerNode, with at least two of these parameters required If endTime is earlier than startTime, or if only endTime and numValuesPerNode are provided, the data will be returned in reverse order, presenting later data first When all three parameters are specified, the results will be returned from startTime to endTime, either in ascending or descending order based on their values If numValuesPerNode is set to 0, all values within the specified range will be returned By default, DateTime.MinValue is used to indicate unspecified startTime or endTime, as outlined in IEC 62541-6.
The startTime and endTime can be the same, enabling the Client to request a single value When both times are identical, it is assumed that time is progressing forward Additionally, the Server must not return a Bad_InvalidArgument StatusCode if the requested time domain falls outside its range; instead, this situation should be regarded as an interval with no available data.
When startTime, endTime, and numValuesPerNode are specified, and if there are more than numValuesPerNode values available for a Node within that time range, only numValuesPerNode values will be returned along with a continuationPoint To retrieve the next set of numValuesPerNode values, the Client must call ReadRaw again using the provided continuationPoint.
When Bounding Values are requested with a specified non-zero numValuesPerNode, the returned Bounding Values count towards the numValuesPerNode total If numValuesPerNode is set to 1, only the start bound is returned, while the end bound is returned if reverse order is required For a numValuesPerNode of 2, both the start bound and the first data point are returned, with the end bound provided in reverse order If no Bounding Values are found, the StatusCode will indicate Bad_BoundNotFound, accompanied by a timestamp reflecting the start or end time and a null value The server determines the historical range for retrieving Bounding Values.
In cases where there is no data available for a specific interval, the StatusCode will be Good_NoData unless Bounding Values are requested If Bounding Values are requested and at least one is available, the result code will be Success, and the corresponding bounding value(s) will be provided.
In scenarios with multiple values for a specific timestamp, only the most recent value is returned by the Server, while the others are classified as Modified values If the Server provides a value that conceals other values at the same timestamp, it will set the ExtraData bit in the associated StatusCode Additionally, if the Server has more information about a value, the ExtraData bit will also be activated, signaling that ModifiedValues can be retrieved, as detailed in section 6.4.3.3.
If the requested TimestampsToReturn is not supported for a Node, the operation shall return the Bad_TimestampNotSupported StatusCode
When reading Modified Values with the isReadModified set to TRUE, the system retrieves values, StatusCodes, timestamps, modification types, user identifiers, and modification timestamps from the history database for specified HistoricalDataNodes within a defined time range If multiple values have been replaced, the Server will return all of them The updateType determines the value in the modification record: if it is INSERT, the new value is returned; for any other updateType, the old value that was changed is provided.
This function is designed to read modified values from history, requiring the returnBounds parameter to be set to FALSE; otherwise, the Server will respond with a Bad_InvalidArgument StatusCode.
The request domain is determined by startTime, endTime, and numValuesPerNode, with at least two parameters required If endTime is earlier than startTime, or if only endTime and numValuesPerNode are provided, the data will be returned in reverse order, prioritizing later data When all three parameters are specified, the response will include up to numValuesPerNode results from startTime to endTime, sorted based on their values If more than numValuesPerNode values exist within the specified time range for a node, only numValuesPerNode values will be returned, accompanied by a continuationPoint Clients seeking additional values should call ReadRaw again using the continuationPoint If numValuesPerNode is set to 0, all values within the range will be returned In cases where the server cannot provide all modified values for a timestamp in one response, it will return the modified values with the same timestamp in subsequent calls.
When a value is modified multiple times, all corresponding timestamps are returned, potentially resulting in duplicate timestamps in the array If the startTime is less than or equal to the endTime, the values will be ordered from the most recent to the oldest modification timestamp Conversely, if the endTime is less than the startTime, the values will be sorted from the oldest to the most recent modification timestamp The server determines whether to retain all modifications or only the most recent one.
A Server is not required to create a modification record when data is initially added to the historical collection If it does, it will set the ExtraData bit, allowing the Client to access the modification record through a ReadModified call Should the data be modified later, the Server will generate an additional modification record, which will be provided alongside the original record during a Client's ReadModified call, provided the Server supports multiple modification records per timestamp.
If the requested TimestampsToReturn is not supported for a Node then the operation shall return the Bad_TimestampNotSupported StatusCode.
ReadProcessedDetails structure
Table 21 defines the structure of the ReadProcessedDetails structure
ReadProcessedDetails Structure Specifies the details used to perform a “processed” history read startTime UtcTime Beginning of period to read endTime UtcTime End of period to read
The ProcessingInterval defines the duration between returned aggregate values, with a value of 0 indicating that no ProcessingInterval is set The aggregateType[] specifies the NodeId of the HistoryAggregate object, which indicates the list of aggregates used for retrieving processed history For further details, refer to IEC 62541-13.
Aggregate configuration structure useSeverCapabilitiesDefaults Boolean As described in IEC 62541 -4
TreatUncertainAsBad Boolean As described in IEC 62541 -1 3
PercentDataBad UInt8 As described in IEC 62541 -1 3
PercentDataGood UInt8 As described in IEC 62541 -1 3
UseSlopedExtrapolation Boolean As described in IEC 62541 -1 3
See IEC 62541 -1 3 for details on possible NodeId values for the HistoryAggregateType parameter
This structure computes aggregate values, qualities, and timestamps from the historical database for designated time domains across one or more HistoricalDataNodes The time domain is segmented into intervals defined by the ProcessingInterval duration The specified aggregate type is calculated for each interval, starting from the startTime, utilizing the data within the subsequent ProcessingInterval.
For example, this function can provide hourly statistics such as Maximum, Minimum, and Average for each item during the specified time domain when ProcessingInterval is 1 h
The request domain is determined by the parameters startTime, endTime, and ProcessingInterval, all of which must be specified If endTime is earlier than startTime, the data will be returned in reverse order, with the most recent data appearing first If startTime and endTime are identical, the server will respond with a Bad_InvalidArgument error, as this scenario lacks a meaningful interpretation.
The aggregateType[] parameter allows a Client to request multiple Aggregate calculations per requested NodeId If multiple Aggregates are requested then a corresponding number of entries are required in the NodesToRead array
To request the Min Aggregate for NodeIds FIC1 01 and FIC1 02, as well as both Min and Max Aggregates for NodeId FIC1 03, it is necessary for NodeId FIC1 03 to be included twice in the NodesToRead array request parameter.
If the array of Aggregates does not match the array of NodesToRead then the Server shall return a StatusCode of Bad_AggregateListMismatch
The aggregateConfiguration parameter enables a Client to customize Aggregate configuration settings provided by the AggregateConfiguration Object for each call For detailed information on Aggregate configurations, refer to IEC 62541 -1 3 If the Server cannot accommodate the override of Aggregate configuration settings, it will return a StatusCode of Bad_AggregateConfigurationRejected Additionally, if the Aggregate is deemed invalid for the Node, the StatusCode will be Bad_AggregateNotSupported.
In calculating the Aggregate for each interval, values that match the starting timestamp of the interval are included, while those that match the ending timestamp are excluded Each value is counted only once in the computation If the time domain is reversed, the later timestamp is treated as the start of the subinterval, and the earlier timestamp as the end It is important to note that merely swapping the start and end times does not yield the same values in reverse order, as the intervals in both scenarios differ.
When an Aggregate calculation takes longer than expected, the Server can provide partial results along with a continuation point This approach is useful if the calculation exceeds the Client's timeout hint In certain situations, even a single Aggregate result may require more time than the Client timeout allows Consequently, the Server may return no results but include a continuation point, enabling the Server to resume the calculation during the next Client read call.
Refer to IEC 62541 -1 3 for handling of Aggregate specific cases.
ReadAtTimeDetails structure
Table 22 defines the ReadAtTimeDetails structure
The ReadAtTimeDetails Structure outlines the parameters necessary for conducting an "at time" history read It includes an array of timestamps, reqTimes [], defined in UtcTime, which specifies the exact moments for which data values are to be retrieved Additionally, the useSimpleBounds Boolean option is available to ascertain the value at the designated timestamp.
The ReadAtTimeDetails structure retrieves values and attributes from the history database for specified timestamps associated with one or more HistoricalDataNodes This function is designed to provide values that can be correlated with other known timestamped data, such as reading sensor values at the time lab samples were collected.
The order of the values and qualities returned shall match the order of the timestamps supplied in the request
When a value is absent for a given timestamp, it will be interpolated from surrounding values to accurately represent the value at that timestamp This interpolation process adheres to the standard rules of Interpolated Aggregate as defined in IEC 62541-1 3.
If the useSimpleBounds flag is True and Interpolation is required then SimpleBounds will be used to calculate the data value
When a value is located for the given timestamp, the Server assigns the StatusCode InfoBits as Raw Conversely, if the value is derived through interpolation from adjacent values, the Server designates the StatusCode InfoBits as Interpolated.
If the requested TimestampsToReturnis not supported for a Node, then the operation shall return the Bad_TimestampNotSupported StatusCode.