The Power of Tag Name Based PLCs

Tag based PLC controllers are not necessarily a new thing to the industry. However, the true power and benefits of using them is something that is still talked about in many circles. Below are some of our thoughts on the power of tag based controllers!


So what does Freedom mean to you? What comes to mind when you hear that word? Maybe the Statue of Liberty, Mel Gibson as William Wallace, the day you left for college, or maybe the week when your wife took the kids to visit her parents in New Orleans leaving you with nothing to do but grow a beard, sleep late, eat pizza, and watch around the clock football! Sorry, sorry, I lost myself for a moment. I’m ok. Freedom can be many things for many people but when it comes to PLCs and more specifically PLC programming, nothing gives you more freedom than tag name based controllers.

Tag name based PLC with Freedom Text Overlay

Control Your Controller…

If you are not familiar with tag name based controllers, let’s take a closer look. If you are familiar with them, come along for the ride. Tag name based controllers are ones where the memory mapping is defined by you. There are no preconfigured memory maps that you are required to stay within. For instance, controllers with fixed memory addressing will assign a specific amount of memory for Timers. There could be 500 memory addresses allocated for timer instructions. You need timer T501? Sorry, not gonna happen. Even if you have unused addresses available in another data type like Counters, you are still out of luck. With tag name based systems, memory allocation is dynamic and you control the data types that are created and how many there are. Need another timer, no problem. Six more contacts, you got it. And if you delete the assigned tag name from your database, the memory is freed up to be used elsewhere for any data type. The only limitation is the amount of total memory available. Now that is freedom!

Document Your Logic

With fixed memory controllers, additional code documentation makes a huge difference when it comes to troubleshooting. But it is an added step and extra work that sometimes gets overlooked. Take a look at the sample ladder rung below. This code was created by someone who didn’t take the time to add any documentation or maybe the documentation wasn’t saved properly. Either way, it’s up to you to figure it out. So what can you tell about the system from the ladder rung? Well, there is a discrete input from something trying to turn on the discrete output for something else but there is a permissive bit in the way. That’s about it.

sample ladder rung for Tag name based PLC 1

This code obviously doesn’t help much with troubleshooting so I’ll give you a hint. This is a sorting facility and you are looking at the start logic for Belt 3 which will not start. Adding that information to the code below, you can now see that the start command (pushbutton) is not making it to the start output for the motor. So what’s the problem? If you answered C100, you are correct. But what is C100? At this point you would probably trace C100 back to its origins in the code, which may be time consuming depending on the complexity of the system and the code itself. But let’s say you trace it back and you found that this contact is tied to another input point. However, since the code is so poorly documented you now have to find wiring diagrams or venture out to the control cabinet to see what device is tied to this input. Better get to it!

sample ladder rung for Tag name based PLC 2


Documentation Made Easier

Now take a look at the code below. This time the programmer used a tag name based controller which allowed him/her to store meaningful names for the ladder elements. Even without the images or any hints from me, you can take one look at this code and see the problem. Belt 3 won’t start because the Belt4_at_Speed signal is not there. At this facility the belts are started in sequence and instantly you know that the problem is Belt 4, not Belt 3.

sample ladder rung for Tag name based PLC 3

With fixed memory controllers you have to take the time to add additional documentation (assign nicknames, rung comments, etc.) in order to have any correlation between the code and the real world. Whereas with tag name based controllers, the tag names themselves can be used to document the code and these tags are stored in a database inside the controller so they are available to anyone.

And just in case you might be wondering how the tag names actually get assigned to real world I/O points, let’s look at an example using the Productivity3000. Using the Productivity Suite programming software, I have completed coding the belt start logic mentioned above. Now, I need to assign the tags to I/O points. Simply open the hardware configuration window for the I/O module that the device will be wired to, and reassign the points that are needed. That’s it!

Tag name based PLC using Productivity Suite programming software


Tag Naming Tips

Tag names are a great asset when programming but they should be used in a way that is easily understandable and therefore beneficial for everyone. Here are a few things to consider when creating your tags.

  • 1. Make tags that can be understood by someone bedsides you. Tag names like “FlipFlop” and “FlopFlip” (two actual tags I ran into in the field) may make sense to you, but you might not be the only one that has to work on that equipment.
  • 2. Try to keep it short and sweet. Avoid making the tag names too long since they will be viewed on a ladder rung inside the programming software. These rungs can get congested and if the naming is too long, word wrapping can occur, making them very hard to distinguish. ChokeValve24_ControlCabinet4_Rack4_Slot4_Point14 might not show up that well in the programing software.
  • 3. Stay structured. Use a structured tag naming convention that corresponds to the function, location, brand, etc. of the equipment. This will allow tags to be grouped together based on the chosen attribute. These groupings will help when it comes time to delete or expand a section of code. Let’s say you are adding a new diverter belt that is identical to diverter belt 4. Since you made all of diverter 4’s tags start with “Dvrtr4”, you can simply sort the tags alphabetically and copy all of diverter 4’s tags and change them to diverter 5. Or what if you need to delete a section? No need to track down and remove each assigned nickname, just sort the tags and delete as needed.

Want to Learn More?

With any type of programming language, versatility is important. The ability to create memory locations as needed and use naming conventions decided by the user gives tag name based controllers an advantage over all others. If you would like to learn more about the Productivity3000, our tag name based controller, or you want further information on programming fundamentals, please check out these 5 ways to learn more about PLCs. 

5 Ways To learn More PLCs