Write to a tag where a String has Tag Name

jmveerkamp

Member
Join Date
May 2012
Location
OH
Posts
23
Hi everyone,

I am wondering if the following is possible:

I have several Logix 5000 tags of the following format:
TagPre_#_End

where only the # changes.

I am wanting to use a single FTView HMI screen to write to this tag based on the # the user enters.

So if a user enters 1004, I want to write to TagPre_1004_End in the PLC. Then if they change to say, 4056 I want to write to TagPre_4056_End.

Is this possible to do either in FTView or in PLC code?
I can't seem to figure out how to do this.
 
Your best bet is to create a String Tag Array.

StringData[Index]

Your HMI can directly access any tag in that array by manipulating the Index value.

The pre-defined STRING data-type allows for 82 characters. If you only need 30, for example, you can create your own STRING30 data-type, limiting the string length to 30. For large string arrays, which you are inferring you are using, this will save a considerable amount of memory.
 
I think your best bet is to change from having the identifying number be part of the tag name to making an array tag.

Then your HMI numeric entry object can write to a tag that's an index value, and your logic can write whatever value you want into that array element.

TagPre[Index] is easy to manipulate in ladder logic, while TagPre_Number_End is not.

I couldn't figure out a way to kludge this with placeholders in FactoryTalk View.
 
I think your best bet is to change from having the identifying number be part of the tag name to making an array tag.

This is what I've found too. I was hoping to avoid this. But I think for future projects it'll be okay. Just frustrating for current projects...

I thought about aliasing an array tag to the actual tag, but the actual tag is a pretty large UDT, so making a large array of already large UDTs seems wasteful to me memory-wise since PLCs don't seem to have lots of memory.

Thanks for the feedback everyone!
 
This is what I've found too. I was hoping to avoid this. But I think for future projects it'll be okay. Just frustrating for current projects...

I thought about aliasing an array tag to the actual tag, but the actual tag is a pretty large UDT, so making a large array of already large UDTs seems wasteful to me memory-wise since PLCs don't seem to have lots of memory.

Thanks for the feedback everyone!

You cannot do this - an alias tag cannot have "structure", it can only be a "stepping-stone" to refer to another location in the tag database. When the alias tag is created, you do not define its data-type, it inherits this from the tag or tag-element it is an alias for.
 

Similar Topics

When using System Platform, I can use the object viewer to directly manipulate attributes/tags/whatever. When I have a standalone InTouch...
Replies
11
Views
975
Hardware: 5069-L320ERMS2 Software: Logix Designer 35.11 / Ignition 8.1 Issue: When attempting to write to the tag "HMI_DRV200_DynamicTrim" in...
Replies
5
Views
757
I am using FactoryTalk View Studio ME to create an application for an allen-bradley panelview plus7. I am attempting to get the loaded application...
Replies
17
Views
1,543
Hi I am trying to Write into a PLC Tag using the Inger v7 , the Plc is a Micrologix 850 2080-LC50-48QWB , I can write bool , interger , but when...
Replies
1
Views
392
Dear colleagues, I am reaching out for assistance with an issue I am having. I have a code that can successfully insert data from FactoryTalk...
Replies
6
Views
1,040
Back
Top Bottom