If you’ve spent time around control systems, you’ve undoubtedly heard the phrase “tags” used. After all, tags are an integral part of a control program. And controllers (PLCs, DCS, etc.). And operator interfaces (HMIs). And historians. And a whole host of other pieces of a control system. With all these tags floating around, it can get pretty confusing. Let’s take a look at tags: what they are and how they help you.
What are tags?
We’ll start with theory and then look at an example. Fundamentally, a tag is just a specified variable for a specific piece of data in your control system. Tags are defined for one reason: to organize and structure your data for use. These tags are defined in your controller’s program and then referenced throughout the program to automate the process. Tags can be any data type: integers, Booleans, strings, expressions, etc. Your PLC can also pass tags to other elements of your control system like HMIs and historians, but only when you explicitly tell it to. Your controller can have many thousands of tags identified, but output devices are limited in the number of tags they can receive from the controller. That’s the general theory. Let’s look at an example to make it clearer.
Think for a second about the data that a control system collects. Depending on your setup, you’re probably capturing information like temperature, output, tank levels, uptime, drive speed, etc. Of course, if the system is small, you know exactly what that data is. Temperature? Yep, that temperature probe is in the oven. Tank level? Obviously, we put that sensor in our water tank. But what if you have 1 oven with 2 sensors inside, 3 separate tanks, and 2 separate drives? How do you know which data is which? Just as importantly, how does your PLC know what all that data is? If only there was a way to label that data…
How do tags help me?
Enter tags! Fundamentally, a tag is just a specified variable within the data of your control system. The sole purpose of a tag is to organize and structure your data. These tags are defined within the controller’s program, and they’re the foundation of the control system’s smarts. If your system doesn’t understand the data it’s receiving, then it can’t execute your process. In the example above, part of the setup of your control system would include creating tags for those different tanks and drives. So, let’s say we create tags for the system above: Oven_1:Front.Temp, Oven_1:Rear.Temp, Tank_1.Level, Tank_2.Level, Tank_3.Level, Drive_1.Speed, and Drive_2.Speed.
Now our controller knows what each of these inputs is and is able to pass that data to the other elements of your system. If we’re setting up an HMI for our control system, these tags will be the basis of that HMI. Let’s say we only want a screen that monitors the oven temperature. Easy: we’ll just program the HMI to only show values for Oven_1:front.Temp and Oven_1:Rear.Temp. But wait! Turns out I don’t really care what each probe’s temperature is as long as the oven remains within my acceptable overall range. In this case, we’d go back to our controller and create a tag called Oven_1:Average.Temp using this expression: ([Oven_1:front.Temp + Oven_1:Rear.Temp] / 2). Once this is done, we come back to the HMI and program it to show Oven_1:Average.Temp as well, and we’re good to go!
Tag Planning is Key
Tags are a critical piece of any good control system. Sure, your controller can store thousands of tags, but a well-planned control system will only tag data that you will use to make your process run efficiently and effectively. It’s also crucial to label those tags in a consistent and clear manner so you know exactly what unique piece of data that tag represents. This planning process can be substantial, but your project’s timeline can depend on good tagging practices up front.
Data considered important is different for each system and process, so if you need help identifying and planning tags for your next project, get in touch with us today!