1.8.3. Advanced Settings

You can use the settings.cfg file to change some of the default configuration settings in your DataHub instance. This is a normal configuration file that must be created in a text editor and put into your configuration directory the first time it is used. It is hand-edited, and consists of configuration commands of the format:

(set "option" value)

Where option is the configuration option and value is the value to be set.

Point Queue Depth

The DataHub program has a special queueing mechanism for point change throughput. If a DataHub instance receives incoming point changes faster than a connected client can process them, it puts the new values into a queue for that point. When a client is ready to accept the next value of that point, the DataHub engine sends the earliest value from that queue, then the next value, and so on, in time-sequential order.

We recommend setting the queue depth as small as possible for real-time data, since a deep queue will decrease the response time. If you want to minimize the response time and always use the very latest value, you can set the queue depth to 0 or 1, which effectively eliminates the queueing behavior altogether.

To change a queue depth, use the set command for either or both of the two supported options, with this syntax:

(set "type.pointqueuedepth" value)
(set" type.perpointqueuedepth" value)

Where:

type

Identifies the type or protocol of the connection. The following features and protocols are supported. All pointqueuedepth defaults are 10,000, while most perpointqueuedepth defaults are 3 unless otherwise noted.

gamma.pointqueuedepth
gamma.perpointqueuedepth
externalhistorian.pointqueuedepth
externalhistorian.perpointqueuedepth - default 50
builtinhistorian.pointqueuedepth
builtinhistorian.perpointqueuedepth - default 20
mqtt.client.pointqueuedepth
mqtt.client.perpointqueuedepth
mqtt.broker.pointqueuedepth
mqtt.broker.perpointqueuedepth
opcae.client.pointqueuedepth
opcae.client.perpointqueuedepth
opcae.server.pointqueuedepth
opcae.server.perpointqueuedepth - default 50
opcua.client.pointqueuedepth
opcua.client.perpointqueuedepth
opcua.server.pointqueuedepth
opcua.server.perpointqueuedepth
tcp.pointqueuedepth
tcp.perpointqueuedepth - default 1 or 10 depending on the setting of "try to send data even if it is known to be superseded".
pointqueuedepth

The maximum total number of point changes that can be queued before the connection is blocked. While a connection is blocked, stale values will be removed from the queue and dropped. The default is 10000. Changing this value will have an effect on memory usage.

perpointqueuedepth

The maximum number of point changes that can be queued before old values that have not been transmitted will be dropped in favor of newly arrived values. This is on a per-point basis, so no value will be dropped unless a new value for that point is available. The default is 3 unless otherwise noted. Changing this value could have a big effect on CPU usage.

value

The new value.

OPC DA and OPC A&E ProgId, GUIDs, and friendly names

You can set the ProgIds, GUIDs and friendly names that show up in some lists of available servers for OPC DA and OPC A&E. For example, to change the ProgId of your DataHub instance to mimic another OPC server, you would follow the steps below.

[Important]

Important: If you are changing an existing settings.cfg file, it is important that you follow this entire procedure two times, by first disabling the OPC DA and A&E interfaces as an administrator before modifying the settings.cfg file. If you do not do that, there could be abandoned registry entries that would appear to an OPC client as OPC servers that do not in fact exist.

  1. If your DataHub instance is installed as a service, uninstall it as a service using the DataHub Service Manager.

  2. Run the DataHub instance as an administrator.

  3. Select the OPC DA feature, disable the Act as an OPC Server option, and press Apply.

  4. Select the OPC AE feature, disable the Act as an OPC A&E Server option, and press Apply.

  5. Click the About button to display the configuration folder location, typically C:\Users\username\AppData\Roaming\Cogent DataHub, and make a note of the location.

  6. Stop the DataHub instance.

  7. In your settings.cfg file and add the following lines:

    (set "OpcDaProgId" "Cogent.DataHubTest.1")
    (set "OpcAeProgId" "Cogent.DataHubTestAE.1")
    (set "OpcDaViProgId" "Cogent.DataHubTest")
    (set "OpcAeViProgId" "Cogent.DataHubTestAE")
    (set "OpcDaFriendlyName" "Cogent DataHub Test")
    (set "OpcAeFriendlyName" "DataHub AE Server Test")
    (set "OpcDaAppId" "{C0634700-0837-4044-AEF8-971E5A510000}")
    (set "OpcDaClsId" "{C0634700-0837-4044-AEF8-971E5A500009}")
    (set "OpcAeAppId" "{C0634700-0837-4044-AEF8-971E5A520001}")
    (set "OpcAeClsId" "{C0634700-0837-4044-AEF8-971E5A500021}")
    				
  8. Change any of these settings to suit your application. If you are mimicking another server, you may need to change AppId and ClsId values to match that server.

    [Note]

    Note: OpcDaFriendlyName and OpcAeFriendlyName do not do anything in versions prior to V11.0.3.

  9. Open a command prompt as an administrator:

    C:\Program Files\Cogent\Cogent DataHub\CogentDataHub /regserver
  10. Run DataHub as an administrator.

  11. Select the OPC DA feature, enable the Act as an OPC Server option, and press Apply.

  12. Select the OPC AE feature, enable Act as an OPC A&E Server option, and press Apply.

  13. Stop your DataHub instance.

  14. Run your DataHub instance as normal.

OPC UA client filter

This setting allows you to control whether to keep or discard stale values received from an OPC server. It can be used with Point Queue Depth options, above. You only need to explicitly change this setting if you want to override the default behaviour.

(set "opcua.client.filterduplicates" 0|1)

The default setting is 1 (drop stale values) if the Monitored item queue size is set to 0 or 1, and 0 for Monitored item queue size greater than 1.

Custom DCOM Permissions

When the DataHub program is installed, it adds custom DCOM permissions to the APPID. This may interfere with existing default APPID settings, possibly causing irregularities in the DataHub CLSID. Setting this option in the settings.cfg file to 0 will prevent the DataHub program from adding custom DCOM permissions to the APPID, causing it to use the machine defaults instead. This setting can also be set to 0 by supplying the command-line argument /nodcompermissions.

(set "CustomDcomPermssions" 0)

Remote Config TCP Link license restriction

When you run more than one copy of Remote Config, all but the first copy will fail. But if there are free TCP Link licenses, the extra Remote Config instances will use them. This is a problem if a TCP Link license is needed by an app that is not currently running. When the app tries to connect, a stale Remote Config session could be holding its license, stopping it from connecting.

This settings.cfg file option tells the DataHub instance not to assign a TCP Link license to subsequent Remote Config connections.

(set Admin.FallbackToTcpLink 0)