Tech Support Corner: Flexible Options for Tag Management in TOP Server

10 min read

Aug 17, 2023 2:00:00 PM

Tags, nodes, points, items, symbols – in our industry, we often see these terms thrown around, but in most instances, we’re all talking about the same thing. From the TOP Server OPC Server's perspective, we refer to them as tags. A tag is an OPC Server software application’s representation of a device address to use for communication. This is how your HMI, SCADA, MES, historian, or other client application is able to consume data. If you’re a TOP Server user, you know that you are required to configure tags to get data from your device, but did you know there are multiple options of how to accomplish this?

Our technical team often hears from users asking, “do I have to create tags in TOP Server?” The short answer is no, but in this Tech Support Corner blog, we seek to answer this question in more detail, share the differences between static and dynamic tags, and cover how to choose which type is right for your application. Whether you are an established user or building a foundational understanding of tags and tag addresses, I am certain this blog will provide some great tips for your TOP Server tag configuration and maintenance best practices.

What’s the Difference – Static vs. Dynamic

Let’s get to the point then explore each in detail:

  • Static tags are defined and visible in the TOP Server configuration user interface.
  • Dynamic tags are defined in your client application such as your HMI, SCADA, Historian, or MES, and the device/plc memory addresses are passed into the TOP Server, but they are not visible or seen in the TOP Server Configuration user interface.

This confirms the answer to our question, “do I have to create tags in TOP Server?” The answer is “NO!”  It is also important to know that this is not an “either or” choice. You can have static and dynamic tags in the same project, and you can change methods any time you want. The decision is yours.

Let’s look into each in more detail and the advantages and disadvantages of each method of telling TOP Server what you need to access in the PLC or device also known as Static vs Dynamic tags.

Static Tags

In the realm of computing, the term “static” is utilized to signify the unchanging and consistent nature of an element within the context of a program’s execution. As something that is fixed or unchanging, this aligns with the role of a “Static tag” in TOP Server.

User-defined static tags are addressed using the TOP Server tag address format that maps a user friendly name to a PLC or device memory address, which is specific to the device type and protocol. Static tags are explicitly configured in your TOP Server project to be a pointer to a tangible memory space in the device. The static tag is given a user defined tag name that the client then uses to read the associated address from TOP Server. For help with specific tag addresses, please refer to the TOP Server driver-specific help file. Below is an example of static tags defined in a configuration. 
 
TOP Server Static Tag

Why should I use static (user-defined) tags in TOP Server? 

  1. The primary benefit of this method is that all static tags are available for browsing from client applications. This will require the client application to support tag browsing. Some OPC Clients are specifically designed such that it’s easier to browse the OPC server static tags and add them to the HMI than to type in the PLC file address.
  2. It is also beneficial to add static tags to the OPC server if you need to insulate the client configuration from PLC configuration changes.
    • For example, let’s say you have a Modbus PLC where Register 40001 represents the flowrate through a valve, and you configured a static tag with the name ‘Valve_Flowrate’. If the PLC Configuration had to change and the flowrate was now represented in Register 40003, you would be able to change the static tag, ‘Valve_Flowrate’ to point to a tag address of 40003 instead of 40001. Since the client is always pointing to the same static tag name in the TOP Server, no changes are required on the client side.
  3. Static tags in the TOP Server can also be useful to those who want to insulate their project from changes to PLC make/model.
    • For example, let’s imagine you are replacing a Modbus PLC with an Allen-Bradley PLC. If TOP Server was originally configured with static tags for the Modbus PLC, the user could then configure the Allen Bradley PLC with the exact same static tag references. This also would not require any changes on the client side.
  4. Having tags in the OPC server can help enable re-usable client project rollouts, which greatly reduces time and effort by copying project files from one system to another.
  5. If you’re worried about scalability of defining a large number of tags, mass configuration can be accomplished by utilizing TOP Server’s CSV import/export feature or the TOP Server Configuration API.
  6. Static tags support TOP Server’s ability to define engineering units and scaling ranges to convert PLC raw data to meaningful values in the OPC Server vs having to do it in the HMI/SCADA, and also enables the use of OPC deadband features.  

What are the Disadvantages of Static Tags? 

Initially you might think that there is a memory usage disadvantage, but the TOP Server runtime operates using very efficient memory pointers and underlying device memory addresses, only referencing friendly tagnames for the configuration & troubleshooting user interfaces and event logs. For this reason there is also not a performance disadvantage. 

The most common disadvantage users see is that if they have to define a tag database in their client application such as the HMI, SCADA, Historian, or MES, then there is an initial configuration concern, which can be overcome with our many mass creation tools; however, the maintenance concern when there are changes is valid and a reason to instead consider dynamic tags, which many users do. 

How do I define static tags?

Static tags must be defined under a Device within a TOP Server project . Static tags are constructed from three primary parts and two others:

  1. Tag Name: At the server level, this is a name given by the user, providing a unique identifier for the tag.
  2. Address: The value of this field is determined by the communication protocol being used and the particular device that TOP Server is communicating with.
  3. Data Type: The data type is established based on the communication protocol or the device’s program and memory access standards Based on the device address, TOP Server automatically selects the default type where it can, which is outlined in the driver help file.
  4. Client Access: Specifies whether the client application can Read or Read / Write a tag. TOP Server may restrict this to read only if the device memory type is always read only.
  5. Scan Rate: Specifies the update interval of the tag when the Scan Mode is set to “Respect Tag-Specified Scan Rate” in the device properties, which is not the typical case, so this setting is usually ignored. Click here to learn more about TOP Server device Scan Modes and the default of respect client specified scan rate with OPC connections.

Note: To scale your TOP Server static tags from device raw data ranges to engineering units, we recommend referencing document on TOP Server Scaling

The TOP Server Tag Configuration is shown below with the referenced items above highlighted that are part of the General Property group. Although the details for tag scaling are not shown, you can see the property group that if selected would provide the scaling options for the selected tag.  

TOP Server Create Static Tag

For some users, it is not feasible to configure tags individually, particularly when dealing with a larger quantity. TOP Server offers several different ways to create a large number of static tags, one of which is mentioned before as CSV import but all of which, including automatic tag generation from some devices, are outlined in another blog post, which we encourage you to also read: Three Ways to Mass Create TOP Server Static Tags.

Dynamic Tags

Dynamic tag addressing is a alternative method of telling TOP Server what device data to access where the tags are only defined in the client application such as your HMI, SCADA, Historian or MES.  Sometimes we hear users referring to this as “Direct” addressing.

The client defines tags using the direct tag address rather than referencing a static tag name in the server. Upon client connect, the TOP Server creates a virtual tag for that tag address and starts scanning for data as usual. 

TOP Server Dynamic Tags

Why should I use dynamic (direct) tags in TOP Server?

  1. It can save time to not have to configure and maintain two tag databases in the client and server. Some client applications require tags to be configured in their own tag database, so it would not be worthwhile to also maintain a static tag database in TOP Server. It would also be more efficient to only maintain a tag database in the client if you can’t take advantage of any of the benefits of static tags mentioned above.
  2. Retrofitting can also be a case for not configuring static tags.
    • For example, if you have an existing HMI configuration and the HMI’s driver isn’t supported in a newer operating system, you can redirect all of the existing tag references to use TOP Server as the data source. This would prevent any reconfiguration of the HMI’s existing pointers to PLC file addresses.
  3. Company-defined configuration standards might not allow configuring and maintaining a tag database in the OPC Server and require tags to only be configured in the HMI or client application.

What are the disadvantages of Dynamic Tags?

Dynamic tag addressing does not provide the option for scaling device values to engineering units a TOP Server project nor does it provide granular control on read/write access. 

Also if you launch the OPC Quick client, you will see all the internal system tags but you won’t see any values of live data without configuring some tags using dynamic tag addressing in the OPC Quick Client. For this reason, we suggest you consider defining one static tag per device that would be helpful for troubleshooting. You can also build configurations of Dynamic Tags in the OPC Quick Client and save them off for common troubleshooting scenarios you may encounter. 

How do I define dynamic tags?

Unlike Static tags, Dynamic tags will be defined in the client software application’s tag database. Instead of creating a tag item in the client that addresses a user defined tag in TOP Server, the user would instead create tag items in the client that directly accesses the device driver’s addresses. If any data type other than the default data type (specified in each driver help file) is required, TOP Server also supports appending an “@” symbol to the end of the address. Supported formats for dynamic tags are:

  • Channel_1.Device_1.<Tag address>@<Data Type>
  • Channel_1.Device_1.<Tag address>

As shown in the below image, appending the tag address with @Short changed the data type from TOP Server’s default data type “Word” to “Short”. 

Here is an example of dynamic tags passed down to the TOP Server from its built in OPC Quick Client application:

TOP Server Appending Tag Addresses

If you decide dynamic tag addressing fits your organization’s needs, you should still consider defining at least one static tag per device. This allows for easier troubleshooting between the server and the device should you experience communication issues because you will be able to quickly open the OPC Quick Client and see that tag’s value without having to dynamically add it. Remember, both static and dynamic tag addressing can be used at the same time in any client application. If a dynamic tag address matches the address referenced by a static tag, and the scan rates are the same or integer multiples of each other, TOP Server will optimize its device polling to the fastest rate required, and not duplicate the tag and duplicate the request for the data to the device.  

What about Performance?

There is not a difference in performance in terms of how fast TOP Server can get the data between the two options. Static tags will use a bit more memory than Dynamic tags, but underlying operations all use underlying memory addresses and highly efficient internal memory pointers. If you expect to have a very large project, which to us is over 100,000 tags, and you want to discuss memory usage and the results of our internal studies on this, please contact support.  

Conclusions

Overall, TOP Server’s flexible configuration options allow you to specify to TOP Server what data you want to read and write to best fit your specific needs. This configurable functionality is one of the many advantages of using TOP Server. If you have any questions while determining which type of TOP Server tag specification meets your needs, please feel free to contact our support team

Try TOP Server SuiteLink and OPC Drivers for Free!
Haley Waddell
Written by Haley Waddell

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all