jeudi 18 janvier 2007

OPC Historical Data Access Specification: The industrial standard to share historian content on a transparent way

In the automation industry, data can be organized in three categories: real-time data, historical data and alarms.

Thus, OPC Foundation published its first industry OPC standard: OPC DA that handles the real-time data. In a second step, and to satisfy the strong need of the industrials of a standard manner to manage the historian retrieved from the process control level in a transparent way, the OPC Foundation released the second specification called OPC HDA. Its main goal is to provide a standard communication for the historical data between the software application and any specific system and/or industrial equipment.

The OPC HDA specification is then represented as a set of interfaces that handle historical data stored in archiving systems such as databases for analysis purposes.

A typical architecture of the OPC HDA communication is as follows:
The OPC HDA Server retrieves historian data from plant historian or any historian database.
Using OPC HDA, any OPC HDA Client can read either raw or processed data within a time range.
Besides reads, it can, depending on OPC HDA Server updates capabilities, insert into the historian database or deletes data at a given timestamp or through a time period.
It can also replace existing values in the historian. This can be useful in case data was updated by mistake.

Compared to OPC DA, OPC HDA standard is simpler because:
- It requires less OPC interfaces’ implementation: just 2 interfaces
- It is based on one type of object "OPCServer". There is no "OPCGroup" notion. In fact, items are manipulated at the server level without the scope of any container!

Although the simplicity of the OPC HDA specification, it is rich with fundamental concepts such as historical data processing (interpolation, average, maximum, etc) within time ranges that accommodate the best the industrial’s requirements.

In the following, I will try to clarify some points in the form of
Questions:

1. What are the possible data sources from which an OPC HDA Server can retrieve historian data? Is it possible to collect historical data from an OPC DA Server?
2. What are the types of OPC HDA Servers defined by the specification?
3. What are the minimum required functionalities that it is expected to offer a basic OPC HDA Server?
4. What are the possible read modes that can provide an OPC HDA Server?
5. What is the meaning of the parameter "Max Returned values"?
6. What do we mean by "processed data"?
7. What are the possible update operations that may offer an OPC HDA Server?
8. How can we know what the OPC Server supports as update functionalities?
9. Besides reads and updates, does OPC HDA standard offer other types of exchanging data between OPC client and OPC server?
10. Does HDA standard support asynchronous calls?

And responses:

1. What are the possible data sources from which an OPC HDA Server can retrieve historian data? Is it possible to collect historical data from an OPC DA Server?
With respect to the OPC HDA specification, data sources of historian data are not specified. It is up to the OPC HDA Server to define one or more data sources including:
any proprietary historian server (example PI and InFoPlus.21 systems), databases and an OPC DA Server. In fact, imagine you have an existing OPC DA Server and you want to expose history from the collected real time data. In such case, you can add an OPC HDA layer to the same server. Therefore, you will have an OPC DA/HDA Server that manipulates both real time and historical data.

2. What are the types of OPC HDA Servers defined by the specification?
We can distinguish two types of Historian Servers:
- Simple Trend data servers: these servers just offer simple raw data reads and some optional interfaces.
- Complex data compression and analysis servers: these servers provide reading of both raw and aggregated data, historian updates and other functionalities such as playback and annotations.

3. What are the minimum required functionalities that it is expected to offer a basic OPC HDA Server?
To build a basic OPC HDA Server, you need to implement IOPCHDA_Server and IOPCHDA_SyncRead interfaces. These interfaces define methods to get information about the OPC Server and to perform synchronous read raw data operation.

4. What are the possible read modes that can provide an OPC HDA Server?
We can distinguish the following read modes:
- Read raw data: allows reading raw data, for one or more HDA items, within a time range.
- Read at time data: allows reading data, for one or more HDA items, at a specified timestamp.
- Read processed (or aggregated) data: allows to read computed data by using analysis functions such as maximum and average, for one or more HDA items, within a time range.
- Read modified data: allows reading modified data, for one or more HDA items, within a time range.
- Playback: to get continual updates on the historical data
- Annotations: used to read and/or insert annotations relation to the HDA items in the history database.

5. What is the meaning of the parameter "Max Return values"?
Some OPC Servers could not manage a huge number of historian data values within a given time range. They have a significant server characteristic called "max returned value"; this parameter is useful in read calls in which the number of requested values to be read is specified. Then, if "max returned values" differs to 0, the total number of read values cannot bypass this limit anyway. If it is equal to 0, OPC Client can retrieve all the historical data during a specific time range without any restriction.

6. What do we mean by "processed data"?
Besides reading data as it is archived in the historian, an OPC HDA Server may provide summary data which is computed using a variety of analysis functions.
For example:
Using OPC HDA, it is possible to calculate hourly maximum data value during the last year in an efficient way.

7. What are the possible update operations that may offer an OPC HDA Server?
Standard OPC update capabilities are: insert, insert/replace, replace, delete at time and delete raw. But, it is up to the OPC Server to support a set of them (this set can be empty).

8. How can we know what the OPC Server supports as update functionalities?
OPC specification offers a method called "querycapabilities" to request for OPC Server update capabilities.

9. Besides reads and updates, does OPC HDA standard offer other types of exchanging data between OPC client and OPC server?
In addition to reads and updates, an OPC HDA Server can provide:
- reading of annotations for a given list of HDAA items for a specified time period
- playback functionality to allow reading receiving continual updates on the historical data

10. Does HDA standard support asynchronous calls?
Obviously, OPC HDA standard supports asynchronous calls for both reads and updates. HDA asynchronous concept is the same as in OPC DA

If you have questions not shown in the list above, please do not hesitate to send them to my email: hassen.kouki@gmail.com. I will be more than happy to answer you within hours.

Aucun commentaire: