I have some issues with some analyses that write the results to a static attribute.
I have a template for Tanks. One of the attributes is the volume of the tank (pi point reference).This pi tag contains the volume for each month.
Something like this:
20 3/1/2016 ....
For a processbook display,I need to show the volume for each tank for month. To calculate the volume for each month I have created 12 analyses, so each analyses calculate the volume for the specific month.
Each analyses is like this:
For January: Tagval('Tank1',"1-Jan-2016")
Each analyses write the result to an attribute
Analyses: JanVol write to the Attribute: Volume Jannuary
FebVol write to the Attribute: Volume February... etc
These attributes are static. They are not point reference. I don't need to keep the results for month in a PI tag. I already has this information in one TAg.
Reading best practices in AF, I found the best way to do analyses is to write the result to an attribute that is pi point reference. Aditionally when you write directly to static attributes you are making many changes that end creating issues with SQL database. I am having several issues to get the attributes updated with the results of the analyses. I dont know why, when I check the analysis , it shows the result ok, but the value is not updating the attribute. This behavior is not the same all the time. Some time works, other not.
I don't think creating the pi tag for each month for each tank is a good solution. If I do that, it means I will have a lot of tags that I really don't need.
Is there a better way to show the data by month without creating tags that they are not necessary? Is the creation of the tags the best solution?