Indirect Tags in InTouch

krishna431

Member
Join Date
Jan 2017
Location
New York
Posts
32
I am a beginner in SCADA programming and am currently using InTouch. I want to create an array of tagnames, though I know this is not possible. I was wondering if indirect tags could be used in a similar manner. Can someone please explain indirect tags and how to declare/use them? I've read the documentation, but it would help if I had some real world examples to help me understand.
 
Hi gclshortt, I've actually seen those posts before, and I didn't quite understand the concept still. Please correct me if I'm wrong, but from my understanding, this is the format to declare an indirect tag:

IndirectTagName.name = LocalTagName;

now do we have to use the actual word "name" here or is it user defined?
 
Thank you! I understood how to declare the indirect tag.

Now, is there any way to use the indirect tag similar to how a loop variable works? I mean, if I want to display 100 different values or messages, I'd have to initiate 100 different tag names. Is there a way to make this more efficient using indirect tags?
 
You can use string substitution for assigning the indirect tag.
ie
IndirectTag.Name = Tag + "05"

So with this example, if you had a structured tag naming system that ref elected an array, you could easily loop through the set.!
 
Last edited:
@lostcontrol Thank you. That looks promising. However, I'm still having a hard time implementing this in my application. My aim is to read a csv file and continuously save each field as its own tag.

[result = ] FileReadFields (filename, offset, starttag, numberoffields)

In the above line, would using an indirect tag work in place of the "starttag"? If the number of fields is 5, then I would want the same 5 tags to have a different value for each line of the csv file.
 
Not really sure without testing, but suspect it may providing the indirect tag has been assigned correctly & there are similar tags to the indirect that are offset by +1, then it should..
If not, another way would be to possibly create 5x memory tags, read the csv the assign them back..
 
IndirectTag.Name is a string so it would be set:
IndirectTag.Name = LocalTag.Name;

or by a string:
IndirectTag.Name = "NameOfLocalTag";

Jack.
 
You're misunderstanding the use of indirect tags I believe. For your application of reading values from a csv you're still going to need a tag defined for each value. Once those values are in individual tags then you can assign those tags to a single indirect tag for display purposes. You could create a single display for example to show 10 data values for motor X. When you open the window you assign all the indirects the tags for that motor. You can use the same window for motors A to Z this way.
 
Last edited:

Similar Topics

Hi! I have problem with intouch script and indirect tags. I have script which create csv files and i want to automatize it to write data from...
Replies
0
Views
834
Is it possible to have an indirect tag screen (i.e. motor/pump/servo screen) with an alarm banner? Presently I have 4 pump screens that all...
Replies
9
Views
3,349
Hi, I am having trouble in the Intouch Application maping indirect real tags to IO real tags to grab information.
Replies
2
Views
3,400
i try to set constant value to indirect tag but it is not set i write it in button script : boaz.value=23; (boaz is an indirect real tag name )...
Replies
7
Views
10,112
Is it possible to set an indirect tag's reference "indirectly"? For example, I have a number of indirect tags TAG_INDIRECT_1, TAG_INDIRECT_2...
Replies
5
Views
4,930
Back
Top Bottom