RSLogix Tag Usage Check

TigerCR1200

Lifetime Supporting Member
Join Date
Aug 2013
Location
Texas
Posts
12
I am wanting to check a routine to see how often a tag is used and if it is used more than once turn on a bool for an alarm. Any ideas?
 
used more than once

What precisely do you mean by that ?

It sounds like you're asking the user program to perform a diagnostic cross reference on itself. I have never heard of such a function or feature.
 
...how often a tag is used...

Yes, I'm similarly unsure which way you mean this?

Used as in assigned more than once to an instruction?

Or...

Used as in executed upon more than once in say a scan?

Regards,
George
 
Yes a cross reference is what I am needing. I nee to create an error to inform the user they have made a configuration error.
Array[1].1 := Tag1
Array[1].2 := Tag2
Array[1].3 := Tag1

I need an alarm because Tag1 was used twice.
 
Yes a cross reference is what I am needing. I nee to create an error to inform the user they have made a configuration error.


I need an alarm because Tag1 was used twice.

As far as I know there is no way to do this from within Studio5000. You could of course export your code to an LK5 file and then use something else to find the duplicates. But that's not exactly a simple process if you need to do it often.

-Benaiah
 
Sorry the client decided to move to something different for the time being. I have an idea how to do it and if I get the chance to go back and do it I will share what I did.

To answer the questions of why. The customer I am developing this for has two programmers on staff that are swamped at the moment. So yes my end user will be editing my file after I am done with it. Their end user will not be. This will be a large structured text file that will have multiple arrays they will need to touch. They want to make sure they do not make a mistake.
 
If its two on-staff programmers, is just using the offline Compare Tool enough to identify changes? Or must this be an online function?
 
I don't see any realistic way to generate an actual alarm from that. The PLC RUN's the code, it doesn't syntactically check it.

The only way to do what you are looking for also doesn't seem worth it, but /shrug...
Get a serious text editor, something like UltraEdit.
Export the PLC program out at every build stage.
Write some code in JavaScript to scan the XML, and parse it for := <sometag>.
Build an array with <sometag> as the index, and an integer value as the data: If <sometag> is not in the array, add it as an index, and set the data property of the array to 1. If <sometag> IS in the array, you have a duplicate assign. Increase the data property, and either flag an error now, or scan the array at the end of the program scan and list the errors then.
 

Similar Topics

Hi. I came into a problem that was buried in my memory. I had a list of modifications to do on 2 RSLogix programs. So I tapped in the IP...
Replies
7
Views
1,102
I want to ask about this tag that is in RSLogix 5000: datatype: AB:PowerFlex525V_EENET_Drive:I:0 and I want to create a new tag(instance of...
Replies
10
Views
2,375
Has anyone experienced the following issue on RSLogix5000 (currently on V16) I have a PLC program that has been running on a site for a number...
Replies
5
Views
1,613
Hi All, I have a new 5 PLC system. Each has the same firmware revision. Each PLC has the same User Defined UDT for Safety Tags. PLC1 reads from...
Replies
2
Views
2,019
Hello, What is the Problem: I have an old version of projects with all the tags' descriptions and a new one without them. I know how to...
Replies
6
Views
3,171
Back
Top Bottom