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.
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.
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: If you are changing an existing
|
If your DataHub instance is installed as a service, uninstall it as a service using the DataHub Service Manager.
Run the DataHub instance as an administrator.
Select the OPC DA feature, disable the option, and press .
Select the OPC AE feature, disable the option, and press .
Click the button to display the
configuration folder location, typically
C:\Users\,
and make a note of the location.username\AppData\Roaming\Cogent DataHub
Stop the DataHub instance.
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}")
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: |
Open a command prompt as an administrator:
C:\Program Files\Cogent\Cogent DataHub\CogentDataHub /regserver
Run DataHub as an administrator.
Select the OPC DA feature, enable the option, and press .
Select the OPC AE feature, enable option, and press .
Stop your DataHub instance.
Run your DataHub instance as normal.
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
is set to
0 or 1, and 0 for
greater than 1.
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)
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)