OPC Classic HDA Server
About OPC Classic HDA
About OPC Classic Historical Data Access (HDA)
OPC Classic HDA is widespread standard, which provides specifications to retrieve and analyze historical process data. This data is typically stored in a process data archive, database, or a remote terminal unit (RTU). You can analyze this data for trending, fault prediction, performance assessment, and so on.
- With OPC Classic HDA, the exchange of historical data between an application and any data archive is consistent. Therefore, OPC HDA client applications that implement trends, reports, or spreadsheets can retrieve historical process data from Historian and other OPC Classic HDA servers.
- The OPC Classic HDA specifications are based on Microsoft's Object Linking and Embedding (OLE) and Distributed Component Object Model (DCOM) technologies. Therefore, OPC is endorsed by Microsoft.
- You can configure DCOM client and server software programs to run on the same computer node or distributed across a network of computers.
- The OPC Classic HDA is created to allow various automation applications to communicate with one another based on the historical data, regardless of the manufacturer. This allows greater flexibility and reliability when setting up automation systems.
- The OPC Classic HDA server specification provides a common view of automation information managed by the system for which the server was written.
- Developing OPC Classic-compliant applications is simplified because only one I/O interface is required.
- Using OPC-compliant applications increases the flexibility of your automation processes because they can also communicate with devices other than those specified by the applications' developers.
- Multiple OPC Classic HDA compliant client applications can communicate with an OPC Classic HDA server simultaneously.
Data Flow
About the Historian OPC Classic HDA Server
The Historian OPC Classic HDA server retrieves historical process data from Proficy Historian, and sends it to OPC Classic HDA clients. It dynamically updates the clients when tags are added and/or deleted in Historian. Clients that comply with this specification can connect to the OPC Classic HDA server to retrieve data from Historian.
- The server complies with the OPC HDA Server specification 1.2.0.
- You can browse for all the tags available in Historian.
- You can convert Historian timestamps, data types, and qualities to OPC HDA timestamps, data types, and qualities, respectively.
- You can automatically reconnect to the Historian server when connection is lost.
- You can connect multiple instances of the OPC Classic HDA clients to the same
server without any additional configuration. The OPC Classic HDA server has been
tested with the following OPC Classic HDA clients:
- OPC Foundation HDA Sample client. You can download this client from www.opcfoundation.org
- Advosol HDA test client. You can download this client from http://www.advosol.com/t-free-tools.aspx
- The OPC Classic HDA server supports only synchronous read raw interface.
Set Up the Historian OPC Classic HDA Server
Before you begin
- Install the HDA server and Historian Administrator. For instructions, refer to Install Client Tools.
- Disconnect and reconnect all the OPC HDA clients.
Procedure
What to do next
Enable Tag-Level Security
Procedure
- Access Registry, and go to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intellution, Inc.\iHistorian\HDAServer
-
In the TargetHistorianServer registry key, enter details
in following format:
MachineName,UserName,Password,Timeout
Supported Attributes
The following table provides a list of the attributes supported by the OPC Classic HDA collector.
Historian Property Type | OPC Classic HDA collector Attributes | Data Type | Description |
---|---|---|---|
Data Type | OPCHDA_ DATA_TYPE | Int16 | The data type for the item. For information, refer to Supported Data Types. |
TagDescription | OPCHDA_ DESCRIPTION | String | The description of the item. |
Engineering Units | OPCHDA_ ENG_UNITS | String | The units for the item (for example, kg/sec). |
Archiving | OPCHDA_ ARCHIVING | Boolean | Indicates whether Historian stores data for this item. The following values are valid:
|
ItemID | OPCHDA_ ITEMID | String | The Historian tag name. This is used to allow filtering in
CreateBrowsemethod . |
Supported Data Types
The following table provides a list of data types in Historian and the corresponding ones in the OPC Classic HDA server and the OPC UA HDA server.
Data Type in Proficy Historian |
Data Type in the OPC Classic HDA server or the OPC UA HDA server. |
---|---|
Single Integer |
VT_I2&endash; 16 bit signed integer |
Double Integer |
VT_I4- 32 bit signed integer |
Quad Integer |
VT_I8- 64 bit quad integer |
Unsigned Single Integer |
VT_UI2- 16 bit unsigned single integer |
Unsigned Double Integer |
VT_UI4- 32 bit unsigned single integer |
Unsigned Quad Integer |
VT_UI8- 62 bit quad integer |
Byte |
VT_I1 |
Boolean |
VT_BOOL |
SingleFloat |
VT_R4- 32 bit float |
Double Float |
VT_R8- 64 bit double float |
Variable String |
VT_BSTR |
Fixed String |
VT_BSTR |
Date |
VT_DATE |
Blob |
VT_BSTR |
Supported Quality Values
The following table provides a list of the quality values in Historian and the corresponding ones in the OPC Classic HDA server.
Proficy Historian Quality | OPC Classic HDA Quality | Description |
---|---|---|
ihOPCGood | OPC_ QUALITY_ GOOD | Indicates that there is no need for inspection. This quality is returned for the tags that have all the values archived properly. |
ihOPCBad | OPC_ QUALITY_ BAD | Indicates a need for attention. This quality is returned for the tags that had problems during the collection. |
ihOPCUncertain | OPC_ QUALITY_ UNCERTAIN | Indicates a need for inspection. This quality is returned when the data collection time is low and when there is no specific quality value. |
ihOPCNA | OPC_ QUALITY_ BAD | Indicates a need for attention. |
Supported Filter Attributes
The following table provides a list of attributes for which filtering is supported by the OPC Classic HDA server, and the corresponding ones in Historian, along with the supported operators for each.
Historian Property Type | OPC Classic HDA server Attributes | Supported Operators |
---|---|---|
Data Type | OPCHDA_DATA_TYPE | OPC_HDA_EQUAL_TO |
Tag Description | OPCHDA_DESCRIPTION | OPC_HDA_EQUAL_TO |
Engineering Units | OPCHDA_ENG_UNITS | OPC_HDA_EQUAL_TO |
Item ID | OPCHDA_ITEMID | OPC_HDA_EQUAL_TO |
- The wildcard character (*) will return all the tags.
- The wildcard (key*) will return tags which begins with ???key???.
- The wildcard (key) returns an exact tag name.
Turn On Debug Mode for Trace Log Files
About this task
- The date and time when an event has occurred.
- Errors and exceptions in parameters passed by an OPC HDA client.
- The status of an OPC HDA client.
Procedure
-
Access Registry, and then access the following key folder:
- For Windows 32-bit: HKEY_LOCAL_MACHINECLASSES_ROOT\SOFTWARE\Intellution,inc\iHistorian\HDAServer\
- For Windows 64-bit: HKEY_LOCAL_ MACHINE\SOFTWARE\Wow6432Node\\Intellution, Inc.\iHistorian\HDAServer\
-
Modify values for DebugMode DWORD as follows, and then
select OK:
- In the Base box, select Decimal.
- In the Value box, enter 255.
Results
Example Trace Log File
- The black color indicates the status of events.
- The blue color indicates the status of clients.
- The red color indicates errors and exceptions passed by clients.
Browse Large Number of Collectors and Tags
About this task
Procedure
OPC Classic HDA Aggregates
In the OPC Classic HDA server, an aggregate is a function that is used to process raw data from an OPC Classic HDA server over a given range of time divided into discrete intervals. These aggregates can be further used to for various purposes, such as visualizing the trends in the data.
The standard aggregates supported are:
- Minimum
- Maximum
- Average
- Nearest
- Before
- After
- GE Interpolative
Consider the following as a Historian Source for the Minimum, Maximum and Average Aggregates:
Timestamp | Value | Quality | Notes |
---|---|---|---|
Jan-01-2002 12:00:00 | 0 | No Data | First archive entry Point Created |
Jan-01-2002 12:00:10 | 10 | Raw, Good | |
Jan-01-2002 12:00:20 | 20 | Raw, Good | |
Jan-01-2002 12:00:30 | 30 | Raw, Good | |
Jan-01-2002 12:00:40 | 40 | Raw, Bad | Scan failed, Bad data entered |
Jan-01-2002 12:00:50 | 50 | Raw, Good | |
Jan-01-2002 12:01:00 | 60 | Raw, Good | |
Jan-01-2002 12:01:10 | 70 | Raw, Bad | Value is flagged as questionable |
Jan-01-2002 12:01:20 | 80 | Raw, Good | |
Jan-01-2002 12:01:30 | 90 | Raw, Good | |
NULL | No Data | No more entries, awaiting next scan. |
Timestamp | Value | Quality | Notes |
Feb-28-2002 12:01:30 | 987 | Raw, Bad | |
Mar-01-2002 12:01:30 | 98765 | Raw, Good | |
Mar-02-2002 12:01:30 | 9876 | Raw, Bad | |
Jan-01-2002 12:00:00 | 0 | No Data | First archive entry Point Created |
Jan-01-2002 12:00:10 | 10 | Raw, Good | |
Jan-01-2002 12:00:20 | 20 | Raw, Good | |
Jan-01-2002 12:00:30 | 30 | Raw, Good | |
Jan-01-2002 12:00:40 | 40 | Raw, Bad | Scan failed, Bad data entered |
Jan-01-2002 12:00:50 | 50 | Raw, Good | |
Jan-01-2002 12:01:00 | 60 | Raw, Good | |
Jan-01-2002 12:01:10 | 70 | Raw, Bad | Value is flagged as questionable |
Jan-01-2002 12:01:20 | 80 | Raw, Good | |
Jan-01-2002 12:01:30 | 90 | Raw, Good |
Average Aggregate
The purpose of Average aggregation is to find the average value for a given time interval. It adds up the values of all good raw data in a specified time interval. The sum is then divided by the number of good values. Bad values are ignored in the computation.
If the user specifies a time range where no good data exists for an interval, the quality of the aggregate for that interval will be bad, OPCHDA_NODATA.
This aggregate returns the timestamp of the start of the interval.
Start: Jan-01-2002 12:00:10 End: Jan-01-2002 12:00:20 Interval: 00:00:05
Timestamp | Value | Quality |
---|---|---|
Jan-01-2002 12:00:10 | 10 | Calculated, Good |
Jan-01-2002 12:00:15 | 0 | No Data, Bad |
Start: Jan-01-2002 12:00:35 End: Jan-01-2002 12:01:00 Interval: 00:00:05
Timestamp | Value | Quality |
---|---|---|
Jan-01-2002 12:00:35 | 0 | No Data, Bad |
Jan-01-2002 12:00:40 | 0 | Bad data in the interval |
Jan-01-2002 12:00:45 | 0 | No Data, Bad |
Jan-01-2002 12:00:50 | 50 | Calculated, Good |
Jan-01-2002 12:00:55 | 0 | No Data, Bad |
Maximum Aggregate
The maximum actual time aggregate retrieves the maximum good raw value within the interval [s,e), and returns that value the timestamp of the aggregate will always be the start of the interval for every interval. If the same maximum exists at more than one timestamp, the oldest one is retrieved.
Start: Jan-01-2002 12:00:10 End: Jan-01-2002 12:00:20 Interval: 00:00:05
Timestamp | Value | Quality |
---|---|---|
Jan-01-2002 12:00:10 | 10 | Raw, Good |
Jan-01-2002 12:00:15 | 0 | No Data, Bad |
Start: Jan-01-2002 12:00:35 End: Jan-01-2002 12:01:00 Interval: 00:00:05
Timestamp | Value | Quality |
---|---|---|
Jan-01-02 12:00:35 | 0 | No Data, Bad |
Jan-01-02 12:00:40 | 0 | No Data, Bad |
Jan-01-02 12:00:45 | 0 | No Data, Bad |
Jan-01-02 12:00:50 | 50 | Raw, Good |
Jan-01-02 12:00:55 | 0 | No Data, Bad |
Minimum Aggregate
The minimum actual time aggregate retrieves the minimum good raw value within the interval [s,e), and returns that value. The timestamp of the aggregate will always be the start of the interval for every interval.
Start: Jan-01-2002 12:00:10 End: Jan-01-2002 12:00:20 Interval: 00:00:05
Timestamp | Value | Quality |
---|---|---|
Jan-01-02 12:00:35 | 0 | No Data, Bad |
Jan-01-02 12:00:40 | 0 | Bad data in the interval |
Jan-01-02 12:00:45 | 0 | No Data, Bad |
Jan-01-02 12:00:50 | 50 | Raw, Good |
Jan-01-02 12:00:55 | 0 | No Data, Bad |
Before Aggregate
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intellution, Inc.\iHistorian\HDAServer
. Create a string value with name MaxDurationSec and provide the value in seconds.Start: Apr-01-2002 12:00:10 End: NA Interval: NA
Timestamp | Value | Quality |
Mar-01-2002 12:01:30 | 98765 | Raw, Good |
After Aggregate
When the After aggregate function is called with a timestamp (Start time), next valid value after ???Start time will be fetched. This search will happen between Start time and (Start time + MaxDurationSec).
To change the value of MaxDurationSec navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intellution, Inc.\iHistorian\HDAServer
. Create a string value with name MaxDurationSec and provide the value in seconds.
Start: Feb-01-2002 12:00:10 End: NA Interval: NA
Timestamp | Value | Quality |
Mar-01-2002 12:01:30 | 98765 | Raw, Good |
Nearest Aggregate
When the Nearest aggregate function is called with a timestamp (Start time), the nearest valid value of Start time will be fetched. This search is performed between Start time and (Start time MaxDurationSec). The call for the aggregation is initiated by the source client. The custom aggregations do not require any interval value. The default value for MaxDurationSec is 100 days.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intellution, Inc.\iHistorian\HDAServer
. Create a string value with name MaxDurationSec and provide the value in seconds.Start: Feb-01-2002 12:00:10 End: NA Interval: NA
Timestamp | Value | Quality |
Mar-01-2002 12:01:30 | 98765 | Raw, Good |
GE Interpolative Aggregate
The purpose of the interpolated aggregation is to return meaningful data for a time interval where raw data is not present. The value at a datapoint is estimated based on the raw data present at other datapoints.
For interpolative aggregate to return meaningful data, good values should be present at the boundary conditions.