Skip to content
  • There are no suggestions because the search field is empty.

Creating Internal DataHub Tags using a Configuration File

DataHub has the ability to load additional configuration files on startup.  This example configuration file is going to be used to create a set of tags in the DataHub.  These tags can then be used by any application connecting to the DataHub.  A common use case for needing DataHub to create the tags is when two OPC Clients are both connected to DataHub.  In that case DataHub needs to be the source of the tags so the clients can read/write to them.
 
Download the example configuration file attached.  It shows examples for creating tags with a value using cset or without a value using create.  The example puts the tags in a group called "default", you can change that and DataHub will automatically create whatever group you use.  The tags are in the formation DataGroup:TagName.
 
Below is the formats for these commands and examples are found in the attachment.

cset

(cset name value)
cset will create a tag with a value and the data type will be based on the value

create

(create name)

create will create the tag but without a value

 
To test the configuration file, you need to open the DataHub and navigate to the Scripting section. At the bottom of that section you click Add and choose the *.cfg file you wish to load when DataHub starts. Check the box next to that config file and click Apply. You now need to Restart the DataHub to test the configuration file.
4041 - LoadConfig