RS Logix 5000 Instruction to search for a tag based on its name??

wine_sparky

Member
Join Date
May 2016
Location
B.C.
Posts
17
I have a RS Logix 5000 program that i feel was poorly structured and I'm trying to make the best of it.

There is a series of approx 40 tags with very similar names (MV_100, MV_101, MV_102, ect....), and with the exact same User Defined structure . The original programmer did not use an array for these tags. Each of the "MV" tags has a member called ".ID" that contains a decimal number that corresponds to the "MV" number (MV_101.ID = "101")

Now, I'd like to refer to these "MV" tags in my HMI without repeating the exact same screen over and over (I don't want to have to create a separate screen to control each individual "MV")

I'm trying to figure out a way to write back and forth, from a temp tag, to the "MV" tag for the purpose of writing to a "re-usable" HMI screen. I can't figure out how to write the HMI values back in to the PLC "MV" values because I can't figure out how to address the "MV" Tag with re-usable code.

I was thinking the answer might be to search for the tag based on the ".ID" value of it, but since the Tag name is different for each I was wondering if there was an instruction to reference a tag based on the string value of its name.

Any Ideas?
 
Last edited:
I'm not aware of such an instruction offhand.

I can't figure out how to write the HMI values back in to the PLC "MV" values because I can't figure out how to address the "MV" Tag with re-usable code.

If you don't mind having to re-load the screen each time you change which tag you are writing to, you could set the tag name as a parameter.

Alternately you could create a set of HMI inputs for each tag, then control their visibility.



This does indeed seem 'poorly structured' as you put it; seems an obvious place to use an array tag. Any reason you can't convert them to an array tag?
 
On a second reading, I've gotten ahead of myself.

You specify 'RS Logix 5000' but what HMI do you have?
 

Similar Topics

In studio 5000, is there a way to write a force mask into a rung? Long story short, I would like to create a test routine for a FAT test. In...
Replies
7
Views
1,266
Hey guys, thanks for taking the time to look into my question. I'm building a system to monitor several other systems for faults and one of the...
Replies
17
Views
4,635
I"m trying to average an array of DINT's called FIFO_ARRAY. It has 1000 elements in it. Here is what I have entered into the AVE instruction...
Replies
11
Views
4,722
Good morning everyone. I am apparently confused on the COP instruction. What I am trying to do is copy a DINT to a DINT in a User Defined Data...
Replies
16
Views
6,934
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,761
Back
Top Bottom