It's common for members of the Software Toolbox Technical Team to encounter instances where users need to configure thousands of static tags for the devices in their TOP Server projects. We have even supported implementations with over a million tags.
In such situations, it would be inefficient to manually add each individual tag to TOP Server. There are several better alternatives for adding large quantities of static tags to a TOP Server project: Automation Tag Generation (ATG), Bulk Tag Creation, and/or CSV Import/Export.
Continuing our Tech Support Corner blog series, this post covers what methods you have available to mass create large quantities of static TOP Server tags and how to use them for greater efficiency.
So you may or may not be aware that there are two ways to specify the address of a piece of data in one of your devices in TOP Server. We refer to these as static tags or dynamic tags. This blog won't go into the specifics of why you would choose one type of addressing over the other but you can click here for a discussion on the differences. Suffice it to say, for the purposes of this blog post, static tags are tags that you have explicitly configured in your TOP Server project - it's a method for creating a user-friendly tag name alias to a device point address.
As I mentioned, we have users with a wide variety of projects of varying sizes with respect to overall tag counts, even up to a million tags (depending on other factors such as polling frequency). Such large projects might sound like a nightmare to configure, and you might think it takes a long time to set up, but TOP Server comes equipped with several methods of configuring a large number of tags. In this Tech Support Corner blog, we are going to cover the 3 main ways that a user can quickly create a large number of tags in their TOP Server project:
- Automatic Tag Generation
- Bulk Tag Creation
- CSV Import / Export
Using Automatic Tag Generation in TOP Server
While not all devices and drivers support Automatic Tag Generation or ATG, for drivers where it is supported (such as the AB ControlLogix Ethernet driver) devices can be set up to automatically build out a list of tags that represent device-specific data . If the target device has its own local tag database, the TOP Server driver could read from the device and generate those tags within the TOP Server.
As an example, we are going to use a ControlLogix 5500, which supports Automatic Tag Generation (ATG) straight from the device. In your Device Properties, go to Tag Generation and click ‘Create tags’.
NOTE: For details on the other settings available under the Tag Generation properties (On Device Startup, On Duplicate Tag, etc.), please see Page 76 of the TOP Server Help File.
A successful tag generation will be reported in the Event Log and look something like the following screenshot:
And we see all of our tags under the selected device:
It's that simple! On the other hand, an unsuccessful tag generation attempt will show the following warning message in the Event Log:
Unable to generate a tag database for device 'Allen-Bradley.ControlLogix5500': Errors occurred retrieving controller project.
Now, in some cases where the device's communications protocol doesn't support direct device access for tag creation, it is possible to specify a file from the device's configuration software for offline Automation Tag Generation. One example of this would be Siemens S7 PLCs, which can import tags using a Siemens STEP 7 Project file (*.S7P) or a TIA Portal Exporter File (*.TPE). Once the import file is referenced in the Device Properties, the same ‘Create tags’ command will execute the tag generation from that file.
You can see how much time the Automatic Tag Generation process can save on large tag count projects, as well as, ensuring there are no syntax errors when defining the tags (because we all are, after all, human).
Using the Bulk Tag Creation Wizard in TOP Server
The Bulk Tag Creation button becomes available in the TOP Server toolbar when a device is selected and gives the user access to the Multiple Tag Generation tool. See below:
The Multiple Tag Generation tool allows users to dynamically create multiple tags using a user-defined syntax. There are a variety of address format "parts" available, such as ranges utilizing decimal, hexadecimal, and octal number systems. To avoid overlapping data, this tool also has the ability to increment by the user-defined data type.
The custom format that the tag addresses follow are built using Static Text, Numeric Ranges, and Text Sequences. More information on all of these can be found on Page 83 of the TOP Server Help File.
For this example, we are going to configure Modbus Holding Registers in the TOP Server.
In the above screenshot, we did the following:
- Added “HoldingRegister” to the Name field. This will result in the Tag Names being HoldingRegister1, HoldingRegister2, HoldingRegister3, etc.
- In the Address field, put Static Text with just the number 4. This is because Modbus addresses with a leading 4 represent Holding Registers.
- In the Address field, we also added a decimal Numeric Range of 1 to 10. This will result in only 10 tags, but this can be scaled to generate much more if needed.
- We set the Data Type to be Word, which will apply to all of the tags we create.
Clicking the Preview button will show you what you are about to create.
All of our tags have a green check, which means the user-defined addresses are valid for the driver that we are using. An invalid tag address will show a red warning sign instead. Clicking Generate will add the tags to your device, and the result can be seen below.
This method is most useful when the Tag Addresses and Tag Names that you want to configure share similar characteristics or involve sequential numeric values. Modbus registers are a perfect example of a good use case. We also commonly work with users that utilize this feature with our other drivers that use register-based addressing like Mitsubishi, Omron, Allen-Bradley, Siemens, GE, and more!
Using CSV Import and Export to Add TOP Server Tags
This method is fairly self-explanatory – users can import tags from a CSV file that follows a specific format. This blog is specific to generating a large number of static tags, but the Import CSV method is also available to generate Aliases, as well as performing mass configuration on certain TOP Server Plug-Ins such as the EFM Exporter, Alarms & Events, Scheduler, and more.
The easiest procedure to follow when importing via CSV goes as follows:
- Create one tag in TOP Server for the device in question.
- Export that tag to CSV by right-clicking on the Device and selecting Export CSV.
- Edit the CSV file in Excel to add more rows while following the same format.
- Save and close the CSV file.
- Import the CSV file back into TOP Server.
We will be using the TOP Server OPC UA Client Driver to connect to an OPC UA Server and see this procedure in action.
We start by adding one tag manually, or by browsing the OPC UA Server from the Device Properties and adding a tag that way. This provides a reference tag so that we can create a CSV template of sorts.
We then export that one tag to CSV and here is the result:
There are also additional columns not shown that pertain to the Tag Scaling Properties, but for the sake of this demonstration, we will ignore those and leave them blank.
Fill out the fields shown with as many tags as needed. Here are some things worth pointing out:
- For most applications, Respect Data Type can be set to 1.
- Client Access can be R or R/W for Read Only or Read/Write access to the tags from your client application.
- Scan Rate is in milliseconds, but this field only applies if the Scan Mode in the Device Properties is set to Respect Tag-Specified Scan Rate or if you're using a non-OPC client application such as SuiteLink or DDE.
Here is our result after adding a few more tags:
We can then save and close the CSV file, then import it back into the same or different TOP Server device. Here is the result, which perfectly matches our CSV file:
While we only added 6 tags to start, we often see users keep the CSV as a tag database and they add to it over time. As they add more tags to their CSV, they re-import to add the new tags to TOP Server. If your CSV file contains tags with the same Tag Name as what is already in your TOP Server device, the old tags will be overwritten/updated. This can actually be a powerful tool to not only import large numbers of tags, but also do mass edits on large numbers of tags by exporting to CSV and making those changes from Excel.
Additionally, if you have multiple devices that have the same address space and tags, you can use the same CSV file to greatly reduce the time it takes to add static tags for all of your devices.
We hope that this instructional post has shown that mass configuration of static tags in TOP Server does not have to be a daunting task and can be accomplished quite efficiently. If you are interested in using any of these methods, please feel free to contact our support team with any questions. We will gladly help you to identify the best way to configure your project based on your use case. And don’t forget to subscribe to our blog to find out about the latest updates to TOP Server.