wine_sparky
Member
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?
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: