G_DeMark

Unused Tags Search

10 posts in this topic

I have a relatively large program with many ladder routines in the program.  Multiple programmers over time have edited the routines.  I am looking to clean up and stream line the program.  I would like to know if there is a way to search for (filter) any Tags that exist but are not used in the program.  I would like to delete these unused tags to help clean up the program.   Thanks

Share this post


Link to post
Share on other sites

Which PLC platform?

In the SLC / Micrologix you can open a data file and click the Usage button and it will show you what is used. I would note that used and useful are two different words... 

I'm not sure what you can do in CLX, other than use the cross reference, which would be tedious with a large program. Maybe create a report- Routine: and check the tag listing for routine box? File--> Generate Report

I should add that "unused" in the program may equate to "used" in the HMI

Edited by Michael Lloyd

Share this post


Link to post
Share on other sites

Hi Michael,  I am talking in regard to CLX (compact).  Thanks

Share this post


Link to post
Share on other sites

Bear in mind that, if there is an HMI, there could be a tag that is not used in the program but is used in the HMI. I can't think of a good reason for that but I ran into it a good number of years ago. Edit- I remember now. They toggled a bit in the PLC and used it in the HMI to indicate "something"

Some tags can't be deleted if they are used. Some, like Alias tags, can be deleted if they are used. Ie deleting isn't a good idea :)

I just tested File--> Generate Report--> Routine---> Check the tag listing for the routine box method on a program. It generated a huge document. 85 pages. 

How about the good ole brute force method? Export the tags and logic comments Tools--> Export tags and logic comments, open it in Excel. Delete all the BS like internal tags and IO card info, and then routine by routine start checking off the tags in the export until you've found everything that is used?

Edited by Michael Lloyd

Share this post


Link to post
Share on other sites

Good suggestions.  I will get to work.

 

Share this post


Link to post
Share on other sites

In RS Logix 5000, open the tag database and select the filters at the top. There is a filter for "unused". I use it all the time to clean out programs. But as Michael said, be aware of tags that may be in the PLC simply for use by the HMI. If you do this online, the software won't let you delete tags that are used by the HMI.

Share this post


Link to post
Share on other sites

I'll be darned. It wasn't in the first selection group but Unused was definitely there and it sort of worked. Once I selected Configure then Unused then Unused shows up in the selection section below Configure.

I picked a fairly large program (4 full 16 slot racks) to see what Unused would find. There about 60 tags, all of which are "used". Some were alias tags for a remote IO rack. One was a tag that is mapped in a structured text file, like so- Local:15:O.Ch3Data := PY6011.CV , and a few were actually outputs in the main routine. I have a LOT of mapped tags in the program so it's odd that it only picked on this one. 60 tags is a lot but it's a lot better than cross referencing hundreds or thousands.

Jeremy- Does that apply to any HMI or just Allen Bradley HMI's? We use ClearSCADA and 99.99% of the time the tags that ClearSCADA uses are used in the PLC, so I've not really tried the "online delete" method. Not lately anyway. It bit me once so I am not quite so quick to use that method.

Every now and then we "acquire" someone else's program. If it's in my location I just rewrite the program to suite my way of doing things. I have a lot of stuff that is tightly integrated with our HMI software and it makes the transition process a lot easier and usually only takes a day or so to rewrite the program once the IO sheet is fleshed out and the HMI work is a breeze once the program "matches". Time is money :)

 

Share this post


Link to post
Share on other sites

I haven't really tested it with other HMIs, since the only times I've used a non-AB HMI with an AB PLC are new installations. If I had to guess, I would think that the brand of HMI doesn't really matter. I think the PLC simply recognizes when an outside source accesses a tag and flags it so you can't accidentally delete it.

It's not a perfect system, and if anything it's overcautious. It's common to clean out a program and still have a handful of tags that it won't let you delete online just because at some point in the past something tried to access it.

Share this post


Link to post
Share on other sites

Ok, thank you. I'm fortunate in that I have written all of the programs (55 or so) on this side of our system so if I delete a tag it's because I screwed up when I made it. The Unused tool is definitely handy for when I work in other states. Much appreciated.

Share this post


Link to post
Share on other sites

Excellent information.  This will really help me a great deal with my project.  You are both a wealth of knowledge and I appreciate your time.  Thanks

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now