Intouch, Indirect tags, assembled names, loop

rozabusko

Member
Join Date
Aug 2022
Location
uk
Posts
1
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 indirect tags and to be able to set how many tags we want to write to csv.

original script looks like that but i want to make it automatized

CSVField2 = csv_field_1_indirect.Name;
CSVField3 = csv_field_2_indirect.Name;


I wrote

{write tag names to indirect tags}
csv_field_1_indirect.Name = Temperature_SP.Name ;
csv_field_1_indirect.Value = Temperature_SP.Value;

csv_field_2_indirect.Name = Control_TC_1.Name;
csv_field_2_indirect.Value = Control_TC_1.Value;

csv_field_3_indirect.Name = Load_TC1.Name;
csv_field_3_indirect.Value = Load_TC1.Value;



{TagCounter - number of used tags}

FOR TempLoopCounter = 1 TO TagCounter


{assemble indirect tag name - ex. csv_field_1_indirect.Name }
name11 = "csv_field_" + Text(TempLoopCounter,"0") + "_indirect.name";

{assemble csv file tag name - ex CSVField1}
name2.Name= "CSVField" + Text(TempLoopCounter+1,"0");

{write value from indirect tag to csv file tag}

name2.Value= "name11";

NEXT;



where
name11 - memory message
name2 - memory message


Could you point me correct direction how to do that?

Thanks!
 

Similar Topics

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,366
Hi, I am having trouble in the Intouch Application maping indirect real tags to IO real tags to grab information.
Replies
2
Views
3,417
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...
Replies
9
Views
8,366
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,146
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,961
Back
Top Bottom