Honeywell PHD
.NET AGENT
Overview
The OPC-HDA connector enables Seeq to access data from Honeywell PHD connector.
Prerequisites
Please consult the Honeywell PHD OPC Server User Guide to set up an OPC Server if it is not already configured.
In order to function correctly, the PHD server must be configured to allow browsing of tags via the OPC interface:
On the PHD Server, use the Windows Registry Editor (regedit.exe) to set HKEY_LOCAL_MACHINE\SOFTWARE\Honeywell\Uniformance\OPCServer\BrowseMode to 1.
Restart the OPC Server by either disconnecting all OPC clients and confirming all
opcserver.exe
processes terminate, or by explicitly killingopcserver.exe
via Windows Task Manager.
OPC Core Components Installation
The required version of the OPC Core Components libraries is not installed by default.
If you have already used the Seeq Server Command Line Interface to move the data folder (using the command "seeq install --data <new folder path>") then you do not have to complete this step as the "install with data option" also installs the OPC Core Components libraries. You can skip to Verifying Connectivity below.
To install, execute the following command using the Seeq Server Command Line Interface (CLI): seeq install
This command will ensure all required components are installed. If an error is encountered, follow the instructions in the command output.
If you do not install the OPC Core Components library, then there may be warnings/errors in the net-link logs as below:
Could not instantiate OPC Server Enumerator. Are the OPC Core Components installed?
System.Runtime.InteropServices.ExternalException (0x80004005): CoCreateInstanceEx: Class not registered
System.NotSupportedException: The COM server does not support the interface 'OpcRcw.Hda.IOPCHDA_Server'
Seeq.Link.Connector.HDA.HDAConnection - Unable to connect to HDA server: <server_name>
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'OpcRcw.Comn.IOPCServerList2'.
Connectivity Verification
One of the more difficult aspects of OPC HDA is initial connectivity. OPC HDA uses Microsoft Windows' DCOM infrastructure for communication and security.
In order to minimize problems and verify that the machine running Seeq will have connectivity, Seeq includes the OPC Foundation's sample OPC HDA client.
In most cases, Windows Integrated Authentication is used as the means of authentication for any OPC HDA client like Seeq. That means that you must run with credentials that are authorized on the OPC HDA server / historian to which you are connecting.
Take the following steps on the Seeq Server machine to verify connectivity:
Browse to the C:\Program Files\Seeq Server\opc-hda-samples\Bin folder.
Note: You may need to modify the path if you have installed to a non-default location.
If you are using Windows Integrated Authentication (most common), hold down the SHIFT key and right-click on OpcHdaSampleClient.exe. Select Run as different user.
If you don't hold down the SHIFT key when right-clicking, you won't see the Run as different user option.
In the resulting security dialog, enter the credentials that have appropriate permissions to browse tags and retrieve data on the target OPC HDA server.
If you're using Basic Authentication (where you expect to enter a username and password separate from a Windows account), just double-click on the OpcHdaSampleClient.exe.
The OPC .NET API Sample Historical Data Access Client application will appear. In the Server textbox / dropdown at the top of the application, you must supply the address of the OPC HDA server.
If the OPC HDA server is on this same machine, then you can click the dropdown icon on the right side of the textbox and click Browse. After a while, the server should appear in the list and you can simply select it.
If the OPC HDA server is not on the same machine, you'll need the hostname and ProgID. The Hostname is the OPC HDA server's machine name or IP address.
The ProgID for PHD is
OPC.PHDServerHDA.1
. The address will take the form opchda://hostname/ProgID. For example: opchda://phdprod12/OPC.PHDServerHDA.1
Once the server address has been established, click Connect. If you are using Basic Authentication, you may be prompted for credentials.
This is the point at which you may have difficulty. You may receive relatively terse error messages. Here are some possible error messages and thei corresponding troubleshooting steps:
Access Denied and E_Network_Error
The credentials you supplied are not authorized on the OPC HDA server. Try the following actions:
Ensure that the target server is configured to allow your user account to connect, browse tags and retrieve data.
Ensure that you are running the OPC HDA Sample Client with the correct credentials. (See above instructions for running the client under a particular Windows account.)
Ensure that the user is in the 'Distributed COM Users' group on both the OPC-HDA server and remote client machine.
NOTE: If this still doesn't work fully you may get an error in the OPC Sample Client saying "E_Network_Error". If this is the case, try adding the user to the Administrator group as well on the target server (i.e. the historian) and try again.
CoCreateInstanceEx: The RPC server is unavailable.
The OPC HDA client library either could not contact the server, or it could not establish the necessary DCOM apparatus on the server side. Try the following actions:
Ensure that you've entered the hostname correctly.
Ensure that the target OPC HDA server is accessible on the network.
Ensure that the DCOM settings for the target OPC HDA server are configured appropriately to allow remote connections.
From the 'Run' menu on the Windows machine type "mmc comexp.msc /32" and then 'Enter'.
The '/32' switch is needed to access the menu option for the OPC-HDA server, typically written as a 32-bit application.
Navigate to the OPC-HDA server application, right-click on 'Properties', click on the 'Location' tab and ensure the 'Run application on this computer' is checked.
Apply changes and close the window.
This article can be helpful: https://www.matrikonopc.com/dcom-configuration-opc.aspx
If your connection is successful, you will see an entry for your server in the left hand panel. For example:
Right-click on the new entry and select Add trend. A dialog will appear and the first 100 tags will be enumerated.
You can optionally keep adding blocks of 100 tags by responding Yes if a dialog appears asking More items exist. Continue browsing?
Browse to a tag that you know has recent data and double-click on it to add it to the list of tags in this new trend.
You can type in a specific tag name at the bottom of the Create Trend dialog to add it to the trend. This is useful when there are thousands of tags in the database and you want to check a specific tag.
For some OPC HDA servers, you can right-click on the root node of the tree and select Set Filters. Enter a tag name or wildcard pattern with asterisks into the Item Name field, then click OK. Note: Filters are not supported by Honeywell PHD -- an error will be shown.
Click Next when you've added any tags you want to try.
Click Done and observe that a new trend has been added as a child of your server entry, and the tags appear below the trend node.
Right-click on the new trend (probably "Trend01") in the tree on the right and select Read Raw.
The Read Values dialog will appear. You can choose to modify the Start Time, End Time, Max Values and Include Bounds parameters. By default, the trend will request 18 months of data ("NOW-18MO") but you can change that to something smaller like "NOW-1D" to request only a day.
You can also specify explicit times by selecting Absolute (it may be lurking hidden above the Now dropdown entry) in the format 2017-02-12T17:34:00.000Z.
Click Next and you should see data appear in a table on the right-side of the dialog box. You can right-click on the table of data and select Graph to switch to a visualization.
Check the Result textbox for an error. Errors start with E_. Successful queries start with S_. If you encounter an error with the sample client, then Seeq will likely encounter the same error if you attempt to bring up the same tag and date range.
If you made it this far, you are ready to enable the OPC HDA connection in Seeq!
Configuration
This is an example configuration template that is displayed in the Additional Configuration box that appears when you click Configure for an existing datasource (or if a new datasource is being created, in the Create new datasource connection modal that appears after clicking Add Datasource) on the Datasources administration page.
{
"URL": "opchda://localhost/OPCSample.OpcHdaServer/{6a5eedec-1509-4627-997f-993ccb65ab7c}",
"Username": null,
"Password": null,
"Filters": [],
"ArchivingEnabled": true,
"BuildTree": false,
"RetryAttemptsOnError": 0,
"RetryDelayOnError": "0.1s",
"RecycleConnectionEvery": null,
"Instrumentation": {
"Enabled": false,
"TagCountMax": 1000,
"TagNameRegexFilter": null,
"ValueCaptureEnabled": false,
"ValueCaptureStartTime": "NOW-24MO",
"ValueCaptureEndTime": "NOW",
"ValueCaptureMaxValues": 10,
"ValueCaptureIncludeBounds": true
},
"SimulationFile": null,
"OpcApiCallTimeout": "60m",
"HistorianQualityFilter": null
}
Additional Configuration
Property Name | Default Value | Data Type | Description |
---|---|---|---|
| null | String | This is the URL used to connect to the OPC-HDA server, as collected in Prerequisites. |
| null | String | This is the username if using Basic Authentication. Note that you can also set up Windows Integrated Authentication, follow the instructions in the Installing A Remote Agent / Run as a Specific User article to configure the service appropriately. |
| null | String/SecretFile | This is the password if using Basic Authentication. It is recommended to leverage a Secrets File to store this information. Note that you can also set up Windows Integrated Authentication, follow the instructions in the article Installing A Remote Agent / Run as a Specific User to configure the service appropriately. |
| An Empty List | List of FilterDefinitions | You can choose to include or exclude certain tags from your OPC-HDA datasource by specifying filter definitions. Note that these filters are distinct and work differently from the filters that you may have used with the OPC-HDA Sample Client. |
| true | Boolean | Whether archiving is enabled. In general, this parameter should be left to the default value of For connections where indexing fails to index all items randomly and without causing indexing to fail outright, |
| true | Boolean | Whether an asset tree should be created. In general, this parameter should be left to the default value of In rare cases, the asset tree created by the connector based on the Elements in the OPC-HDA tree may be problematic. For example, the tree may have a single root Asset with over 100k Signals as direct children. In such cases, this parameter may be set to |
| 0 | Integer | The number of retries on error. If requests made to the HDA server are failing intermittently during normal operation. If this field is set to an integer greater than zero, any failed requests will be retried the number of times specified, with a delay of |
|
| String | The delay between retries on error. This field may be set using any valid Seeq duration string, but a delay greater than 10s is not advised. |
| null | String | When set to a valid Seeq duration string, the connection to the HDA server will be closed and reopened whenever the period of time specified has passed. This is occasionally helpful for HDA servers that continue to indicate a valid connection when checked but do not respond correctly to data requests or attempts to browse tags. |
| A default InstrumentationDefinition | InstrumentationDefinition | A troubleshooting tool that can be helpful is the Instrumentation capability. If you set the Instrumentation / Enabled field to true, an XML file will be produced in the log folder beneath Seeq's data folder. It will be named for the HDA server (e.g. OPC.PHDServerHDA.1-PHDPROD1.xml). You can examine this file yourself to get a sense for the API calls being made by Seeq, but it's probably best to engage with Seeq Support and send them the file to help you troubleshoot. |
| null | String | Path to an XML file in a Seeq-created format for server simulation and testing; rarely used. |
|
| String | A timeout used for calls to the OPC HDA server - if a connect, disconnect, status, validate, etc., call has not completed or thrown an error after this period of time, a timeout exception will be thrown, and the call will not succeed. |
| null | String | This is the list of quality values that should not be sent to Seeq (note that this is different from sending to Seeq as invalid values). By default, (including when For example, setting this value to |
FilterDefinition Configuration
Property Name | Default Value | Data Type | Description |
---|---|---|---|
|
| String | The expression to be included or excluded in File Glob Syntax. |
|
| String | This field should be set to either |
| true | Boolean | Whether the filter is enabled or disabled. |
InstrumentationDefinition
Property Name | Default Value | Data Type | Description |
---|---|---|---|
|
| Boolean | Whether the intrumentation is enabled or disabled. |
|
| String | Filter for the TagNames that will be included in the instrumentation file. When null, no filter will be applied. |
|
| Integer | Maximum number of children per node to intrument. |
|
| Boolean | True if you want to capture time series data for each tag. |
|
| String | The start time for capturing time series data for each tag. Uses the OPC-HDA interface's specification scheme, which is generally "NOW-##MO", signifying "now minus some number of months". |
|
| String | The end time for capturing time series data for each tag. Uses the OPC-HDA interface's specification scheme, which is generally "NOW-##MO", signifying "now minus some number of months". |
See OPC-HDA Filtering Examples for more information.
Known Issues
Seeq is aware of Microsoft KB5004442 and has validated that the OPC-HDA connector is not affected by this. See DCOM Hardening for more information.
Please report any other issues you find to our support portal.
Troubleshooting
In addition to the global OPC browsing configuration, PHD can also restrict data access based on Windows Integrated Authentication. If errors are encountered when accessing data in the Sample Client, consider talking to a PHD administrator or running as a user that definitely has privileges to view the relevant tag data.
Verify with a standalone OPC-HDA Client
If you are experiencing any errors retrieving data, the first step is to confirm whether or not you can retrieve the same data using a standalone OPC-HDA client.
You can use the OPC .NET API Sample Historical Data Access Client as described in the Connectivity Verification section above. This tool accesses OPC-HDA data in exactly the same way as Seeq, so it's the most useful verification to perform.
You can also use the MatrikonOPC Explorer tool, which has similar features.
Enabling/disabling indexing, especially for larger systems
In some configurations, large systems may have too many tags and it may not be beneficial to index them all at once (for example, a company may have 20 OPC-HDA servers, and one may choose to index one server at a time), or ever again after the initial indexing has taken place (due to performance hit every few hours, or whenever Seeq chooses to index again either at startup or via a set schedule). To control whether or not to do indexing, set the indexing schedule according to the instructions in Scheduling Connector Indexing Activities.
Invalid Values
If the data being retrieved by Seeq is reported by the historian as being bad
(as defined in section 6.8 of the OPC-DA specification), it will be sent as invalid. Data reported as good
or uncertain
will be read by Seeq as valid. In order to have Seeq treat this data as valid, the reason for the low quality should be addressed prior to using the data for analytics.
Disabling archiving
Seeq may receive inconsistent results when browsing items from certain HDA systems or historians. This manifests as signals disappearing from the asset tree and not showing up in search results in Seeq. If it is the case that these signals still return samples successfully (for instance on a worksheet where they were previously added), and the Archived
property on the signal is true
, the Seeq connection to the historian may have archived that signal because it was not present in the most recent indexing process. One way to verify this is to search the net-link log for the phrase "Datasource clean-up complete", which should appear on a line that includes the name of the server and the number of items archived.
In this case, one possible option is to disable archiving. The downside of this is that if items are removed from the HDA datasource, they will not be archived in Seeq - they will continue to show up in the asset tree and search results. The upside is that even if Seeq notices that the item is missing during the indexing process, it will not archive it - so intermittent missing items will be unaffected.
If you are running into other issues with connecting to or access data from Honeywell PHD, view our guide for troubleshooting datasource issues.
Performance considerations
The Honeywell PHD connector does not have any special performance considerations. View our guide on optimizing datasource performance for general guidance.