RsLogix5000 finding all tags not written to (only destructive=N)

hadleed

Member
Join Date
Jul 2015
Location
Australia
Posts
2
Hi all,

I have been using RSLogix for the last couple of months and one thing I miss coming from Schneider Unity Pro is the ability to find tags that are written to but not read or read but aren't written to. (you can do this in Unity with the 'Used' column to shows all tags with only 1 reference)

It often happens that the code is modified by many hands and some people delete destructive instances of variables without deleting the non destructive reference.

I know you can see the destructive Y/N when you cross reference a particular tag.

Q: Is there a way to filter ALL tags to see the ones that aren't written to anywhere.
Perhaps a setting I am missing that can warning during compile for these tags?
Does anyone know an external tool that can do it? I was thinking about writing a tool that searches through the L5X file and works out all tags referenced in the correct part of destructive instructions and compares it to the full variable list.
 
In the Tag Editor look at the top and you will see Show: All Tags. There is a drop down arrow, click that and choose configure. You will see the filter choices there.
Once Setup then they will be shown by clicking the drop down arrow.
 
Last edited:
when I choose configure the filter choices are:

<all>
Unused
Produced
Consumed
Can be Forced
Alias

Unused - only shows tags with 0 cross references.

I want to find tags with 0 'Destructive" references.
(or alternatively find tags with exactly 1 cross reference).

none of these filter choices can give me what I want.
 
Did you ever end up making your own tool for this? I am in between projects at work right now, so I have enough free time that I might take a stab at making my own.
 
I'm realizing that if you export Studio 5000 code as a L5K, you could save it as a text file and from there, write a script to search for the tag name and where it appears, and then generate a report of if it whether it is contained in a MOV, or an OTE, or an OTL, etc. It wouldn't be perfect, but I think it will be a huge step.
 
[G]enerate a report of if it whether it is contained in a MOV, or an OTE, or an OTL, etc.

Hard part is that if the tag is the Source of a MOV it is non-destructive, but if it's the Destination it is Destructive. Same with all the Math instructions.

You might be able to be really clever and search for the strings ',TAG)' and 'OT?(TAG)'.

The first (with the comma and close paren) tells you it is a Destination tag, and thus is destructive regardless of Instruction (easier than building a list of all possible destructive instructions). The second one handling the OTE, OTL, and OTU instructions. Might need one more for ONS, or perhaps you could get away with O??(TAG)'

Have fun. Post your code when you're done.
 
These utilities would be extremely valuable.



A few years ago I wrote a vba script for excel that would parse a Logix "Report" of tag cross-reference printed to an ASCII printer. For each tag, there is an asterisk * by the instruction if it written to. As I parsed the file I would take any tag that did not have an asterisk * following it and populate a sheet with its name.


It was easy to identify tags that were set via HMI or other method, so it wasn't so hard to find errors. Unfortunately I lost my code.


I wish Rockwell would give external access to the cross-reference data base that it generates (I think generates whenever you open the project)
 

Similar Topics

Does anyone know a fast way to find which desktops on the network (by IP) have open copies of a communal program on the same network? Our issue...
Replies
5
Views
1,717
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
118
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,121
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
868
Back
Top Bottom