Citect Tag indirect adressing

Steve_D

Member
Join Date
Jul 2002
Location
Albury/Wodonga
Posts
92
To all you Citect Gurus..... I have a function that uses a trend tag which is passed into the function as a string (i.e. the name of the tag is a string (e.g.FT1000) I find the min value over a trend period but I want to return the data into the tag FT1000_min
If I use the text FT1000_min I get the result I want in FT1000_min, but what I want to is do make the name of this tag to be the name of the passed in tag and then add "_min" to allocate the data to the _min tag.

In short
This works....
GetTrendFileData(STRING sTrendTag, INT iHours)
STRING sPeriod = TrnInfo(sTrendTag, 2);
TrnGetTable(sTrendTag, 0, 0, 100, rFileData[0], 1);
FT1000_Min = TableMath(rFileData, 100, 0, 0)

but this doesnt, even though when I call the function with sTrendTag as "FT1000"
GetTrendFileData(STRING sTrendTag, INT iHours)
STRING sPeriod = TrnInfo(sTrendTag, 2);
TrnGetTable(sTrendTag, 0, 0, 100, rFileData[0], 1);
sTrendtag + "_Min" = TableMath(rFileData, 100, 0, 0)

The bottom lines are the only issue here, if sTrendTag is FT1000 wont the bottom one work?
How do you indirectly reference a tag name?
Sorry its so confusing...but its confusing..


 

Similar Topics

Hey, I'm trying to do the following, I have some experience with Citect but can't seem to figure this out. I/O Tag: BoxPos1_ProdNum (Data Type...
Replies
0
Views
585
Greetings, How can I create some structure tags that are similar to the ones seen in SIMATIC WinCC Tag Management section? Or does Citect SCADA...
Replies
0
Views
1,180
Greetings, How should I refer the variables that come from Unity Pro as tags in Citect SCADA 2016? For instance, I want to import some tags...
Replies
4
Views
1,973
who can teach me how to edit tag adam 4017+ in citect scada? real external I/O
Replies
0
Views
883
Hello, I am using CITECT V7.2 with the ABCLX driver to communicate to a compactlogix L30ER. I want to make a simple string tag that I can key...
Replies
5
Views
2,586
Back
Top Bottom