A complete introduction to tags in Studio 5000 Logix Designer

Get great content like this delivered to your inbox every month.
No spam, unsubscribe any time.
In my previous post, I introduced you to the Ladder Diagram programming language. In that post, I introduced the concept of tags but didn’t go into a lot of detail about what tags are.
In this post, I’m going to circle back and explain the basics of tags in Studio 5000 Logix Designer. By the end of the post, you will understand:
A tag is a logical name for an area in the controller’s memory. When you are programming a PLC, you use tags to write data to and read data from the controller’s memory.
In Studio 5000 Logix Designer, you have to declare a tag before you can use it. A tag has two mandatory attributes:
The tag’s name is the logical name for the tag.
The tag’s data type determines what data can be stored in the tag and how much space is allocated for the tag in the controller’s memory.
Some common data types used in PLC programming include BOOL, DINT, REAL, and STRING.
A BOOL, or Boolean, tag can store the values 0 or 1. They cannot store letters or other numbers.

A DINT, or Double Integer, tag can store whole numbers between -2,147,483,648 and 2,147,483,647. DINT tags cannot store numbers with decimal places or letters.
.png)
A REAL tag can store numbers with decimal places between -3.40282347E38 and 3.40282347E38. REAL tags cannot store letters.
.png)
A STRING tag can store letters and numbers. Numbers stored in STRING tags are treated as letters and can’t be used in mathematical calculations.
.png)
There are lots of other data types that can be used in Studio 5000 Logix Designer. For example, you could use a tag with the data type SINT, INT, or DINT to store a whole number. The difference between these data types is the amount of memory that they use - a SINT uses one byte, an INT uses two bytes, and a DINT uses four bytes.
Historically, PLC programmers used tags with smaller data types to save memory in the controller. In Logix 5000 controllers, the smallest amount of space allocated for a tag is four bytes so SINT, INT, and DINT tags actually take up the same amount of space in the controller.
.png)
Tags can have additional attributes.
Some attributes, like the Description attribute let you give a tag more context by adding a description to the tag.
.png)
Other attributes like External Access and OPC UA Access define if a tag can be accessed by an external device like an HMI or an OPC UA Client.
.png)
The Constant attribute defines whether a tag’s value can be changed programmatically or if it has a constant value that can only be changed in Studio 5000 Logix Designer.
.png)
The Style attribute defines how a tag is displayed in Studio 5000 Logix Designer. You can use this attribute to monitor the individual bits in a DINT tag instead of the decimal number.
.png)
Finally, the Alias Tag and Base Tag attributes let you configure one tag as an alias of another. An alias lets you assign another name to a tag. In this example, DINT_1 is an alias for DINT_2 and will always have the same value as DINT_2. This feature is used to map Local Tags to Controller Tags. Let’s talk about what that means in the next section
.png)
All tags in a Studio 5000 Logix Designer project have a scope. A tag’s scope defines where the tag can be accessed in the project.
A controller-scoped tag is a global tag that can be accessed anywhere in the project. The names of controller-scopes tags must be unique in a project.
A program-scoped tag is a local tag that can only be accessed in the program where it was declared. Since program-scoped tags are encapsulated in a program, two programs can have a tag with the same name.
Although it is allowed to have a program-scoped tag with the same name as a controller-scoped tag in a project, it is considered bad practice and should be avoided.
%20(1).png)
A parameter is a special type of program-scoped tag that can be used to pass data between programs. Historically, this passing of data was done by aliasing local togs to controller tags.
.png)
You can define four different types of parameters in a Studio 5000 Logix Designer project:
An Input Parameter is used to pass data into a program. Input parameters are passed by value, which means that the data is passed into the program in a way that is read-only. Input parameter values are updated before the program is executed.
An Output Parameter is used to return data from a program. These parameters are passed by value from the program after the program has executed.
An InOut Parameter is used to exchange data with a program by reference. This means that the data can be read and written and can be updated as the program is being executed.
A Public Parameter exposes the data from a program so that it can be read by other programs. Effectively, it turns a program-scoped tag into a controller-scoped tag that is declared at the program level.
%20(1).png)
In this post, I introduced you to the concepts of tags in Studio 5000 Logix Designer. After reading the post, you should have a good understanding of tags, data types, attributes, scopes, and parameters.
To get hands-on practice with declaring tags in Studio 5000 Logix Designer, check out my course AB-S5K-PLC-100. This course teaches you the basics of programming Logix 5000 PLCs using Studio 5000 Logix Designer by building a project using interactive simulations that run in your browser so you don’t need to have access to any hardware or software to follow it.
For a limited time only, you can get a 30-day free trial when you sign up for a Controls Engineering Academy membership today.
Learn how to program Allen Bradley Logix 5000 PLCs using Studio 5000 Logix Designer by building projects in your browser. Get access to all of our courses for free for 30 days, then $29.97 per month.