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.

Advantages of Using OPC Classic HDA
  • 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.
For more information on OPC Classic HDA, visit the OPC Foundation's website.

Data Flow

The following diagram shows the data flow between the OPC Classic HDA clients, the OPC Classic HDA server, and Proficy Historian.

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.

Features of the OPC Classic HDA Server
  • 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:
Limitations
  • 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

  1. Access Historian Administrator.
  2. Select Browse for Server, and select the Historian server that you want to connect with the OPC Classic HDA server.
  3. Select Set Selected Server as Target of HDA Server, and then select OK.
    The selected server is set as the target Historian server.
  4. Configure any external OPC HDA clients to connect to the OPC Classic HDA server. You can connect multiple instances of the clients to a single server.
    When an OPC HDA client tries to connect to the Historian OPC Classic HDA server, and if an instance of the server is not available, the instance is started, and the client connects to the running instance of the server. The Historian OPC Classic HDA server continues to run as long as there are clients connected to it.
    Note: The OPC Classic HDA server uses Proficy.Historian.HDA as the program ID (ProgID).

What to do next

If you have installed the OPC Classic HDA server on a remote machine, enable the firewall.

Enable Tag-Level Security

Procedure

  1. Access Registry, and go to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intellution, Inc.\iHistorian\HDAServer
  2. 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 TypeOPC Classic HDA collector AttributesData TypeDescription
Data TypeOPCHDA_ DATA_TYPEInt16The data type for the item. For information, refer to Supported Data Types.
TagDescriptionOPCHDA_ DESCRIPTIONStringThe description of the item.
Engineering UnitsOPCHDA_ ENG_UNITSStringThe units for the item (for example, kg/sec).
ArchivingOPCHDA_ ARCHIVINGBooleanIndicates whether Historian stores data for this item. The following values are valid:
  • 0: Indicates that data for this item is not stored.
  • 1: Indicates that data for this item is stored.
ItemIDOPCHDA_ ITEMIDStringThe 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 QualityOPC Classic HDA Quality Description
ihOPCGoodOPC_ QUALITY_ GOODIndicates that there is no need for inspection. This quality is returned for the tags that have all the values archived properly.
ihOPCBadOPC_ QUALITY_ BADIndicates a need for attention. This quality is returned for the tags that had problems during the collection.
ihOPCUncertainOPC_ QUALITY_ UNCERTAINIndicates a need for inspection. This quality is returned when the data collection time is low and when there is no specific quality value.
ihOPCNAOPC_ QUALITY_ BADIndicates 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
Important: The OPC Classic HDA server filter strings are case-sensitive.
Although filtering is supported for the OPC_HDA_ARCHIVING attribute, do not use the filtering in the OPC Classic HDA clients because the value of this attribute is always true. Instead, you can refer to the log file to trace a history of communication events dealt with by the OPC Classic HDA server. You can also turn on the debug mode to more know more details in the log file. If an invalid filter is passed by an OPC HDA client, the OPC Classic HDA server returns all the available items in the address space.
Tip:
  • 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 Trace Logging feature logs communications with the OPC Classic HDA server into an html file. Advanced users can use this log file to trace a history of communication events with the OPC Classic HDA collector server. It is designed for use by the support personnel only to assist in diagnosing issues with the Historian OPC Classic HDA server. By default, the log file is located in the following folder: C:\Proficy Historian Data\LogFiles.
The log file contains the following information:
  • 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

  1. 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\
  2. Modify values for DebugMode DWORD as follows, and then select OK:
    1. In the Base box, select Decimal.
    2. In the Value box, enter 255.

Results

The debug mode is turned on for the trace logs.

Example Trace Log File

The following message illustrates the type of information that the trace log file provides. In this message:
  • 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

In the OPC UA HDA server, the flat address space is used by default. This type of object model is used to browse a small number of tags. If you want to browse a large number of collectors and tags, enable the hierarchical address space.

Procedure

  1. Access Registry, and then go to the following key folder: .
    • For Windows (32-bit): HKEY_LOCAL_MACHINE\SOFTWARE\Intellution, Inc.\iHis- torian\HDAServer\
    • For Windows (62-bit): HKEY_LOCAL_ MACHINE\SOFTWARE\Wow6432Node\\Intellution, Inc.\iHistorian\HDAServer\
  2. Create a DWORD named HierarchicalAddressSpace.
  3. In the Value box, enter 255.
    Note: For a flat address space, this value is set to 0.
  4. Select OK, and then close the Registry.
  5. Restart the OPC Classic HDA server by disconnecting and reconnecting all the OPC HDA clients.

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
The custom aggregates supported are:
  • Nearest
  • Before
  • After
  • GE Interpolative

Consider the following as a Historian Source for the Minimum, Maximum and Average Aggregates:

TimestampValue Quality Notes
Jan-01-2002 12:00:00 0No Data First archive entry Point Created
Jan-01-2002 12:00:10 10Raw, Good
Jan-01-2002 12:00:20 20Raw, Good
Jan-01-2002 12:00:30 30Raw, Good
Jan-01-2002 12:00:40 40Raw, Bad Scan failed, Bad data entered
Jan-01-2002 12:00:50 50Raw, Good
Jan-01-2002 12:01:00 60Raw, Good
Jan-01-2002 12:01:10 70Raw, Bad Value is flagged as questionable
Jan-01-2002 12:01:20 80Raw, Good
Jan-01-2002 12:01:30 90Raw, Good
NULL No Data No more entries, awaiting next scan.
Consider the following Historian Source for Nearest, Before and After Aggregates:
Timestamp Value Quality Notes

Feb-28-2002

12:01:30

987Raw, Bad

Mar-01-2002

12:01:30

98765Raw, Good

Mar-02-2002

12:01:30

9876Raw, Bad
Jan-01-2002 12:00:00 0No Data First archive entry Point Created
Jan-01-2002 12:00:10 10Raw, Good
Jan-01-2002 12:00:20 20Raw, Good
Jan-01-2002 12:00:30 30Raw, Good
Jan-01-2002 12:00:40 40Raw, Bad Scan failed, Bad data entered
Jan-01-2002 12:00:50 50Raw, Good
Jan-01-2002 12:01:00 60Raw, Good
Jan-01-2002 12:01:10 70Raw, Bad Value is flagged as questionable
Jan-01-2002 12:01:20 80Raw, Good
Jan-01-2002 12:01:30 90Raw, 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.

Example 1

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 10Calculated, Good
Jan-01-2002 12:00:15 0No Data, Bad
Example 2

Start: Jan-01-2002 12:00:35 End: Jan-01-2002 12:01:00 Interval: 00:00:05

TimestampValueQuality
Jan-01-2002 12:00:35 0No Data, Bad
Jan-01-2002 12:00:40 0Bad data in the interval
Jan-01-2002 12:00:45 0 No Data, Bad
Jan-01-2002 12:00:50 50Calculated, Good
Jan-01-2002 12:00:55 0No 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.

Example 1

Start: Jan-01-2002 12:00:10 End: Jan-01-2002 12:00:20 Interval: 00:00:05

TimestampValueQuality
Jan-01-2002 12:00:10 10Raw, Good
Jan-01-2002 12:00:15 0No Data, Bad
Example 2

Start: Jan-01-2002 12:00:35 End: Jan-01-2002 12:01:00 Interval: 00:00:05

TimestampValueQuality
Jan-01-02 12:00:35 0No Data, Bad
Jan-01-02 12:00:40 0No Data, Bad
Jan-01-02 12:00:45 0No Data, Bad
Jan-01-02 12:00:50 50Raw, Good
Jan-01-02 12:00:55 0No 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.

Example 1

Start: Jan-01-2002 12:00:10 End: Jan-01-2002 12:00:20 Interval: 00:00:05

TimestampValueQuality
Jan-01-02 12:00:35 0No Data, Bad
Jan-01-02 12:00:40 0Bad data in the interval
Jan-01-02 12:00:45 0No Data, Bad
Jan-01-02 12:00:50 50Raw, Good
Jan-01-02 12:00:55 0No Data, Bad

Before Aggregate

When the Before aggregate function is called with a timestamp (Start time), the previous valid value before 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.
Note: 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: Apr-01-2002 12:00:10 End: NA Interval: NA

Timestamp Value Quality

Mar-01-2002

12:01:30

98765Raw, 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).

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.
Note:

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

98765Raw, 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.

Note: 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

98765Raw, 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.