Support Forums
Highest Value out of all tags named Tagname

I need to find the highest value of all tags named DataAge under a Context Tag PC regardless of context depth.

I need to find the highest value of all tags named DataAge under a Context Tag PC regardless of context depth.

Century Control Systems, Inc. www.centurycontrolsystems-inc.com

Should be easy enough to script.
something like:
DataAges = \GetTagList(scope(\VTSDB, "PC"\Name, TRUE, 0, "DataAge", Invalid, Invalid, False);

then use something like
Whileloop(i < arraysize(DataAges),
{if Highest dataage < dataAges[i] then Highest dataage = dataAges[i] }
{i++}

Hope this helps....

Should be easy enough to script. something like: DataAges = \GetTagList(scope(\VTSDB, &quot;PC&quot;\Name, TRUE, 0, &quot;DataAge&quot;, Invalid, Invalid, False); then use something like Whileloop(i &lt; arraysize(DataAges), {if Highest dataage &lt; dataAges[i] then Highest dataage = dataAges[i] } {i++} Hope this helps....
27
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft