I think the expression is simple and reasonable. I wonder what's the wrong? I can't finger out.
The attribute ET01CE_01 probably has some kind of Value Retrieval method that isn't the standard "Automatic". Things like Time Range, After, Exact Time, etc aren't supported for TagAvg.
I also think that is the issue. he zhu Can you share the configuration string for this attribute? Just make to leave the server name part out, or change it to something.
This is not the source of your main issue but tag ET01CE_01 would considered both an input and output tag. Rather than trigger on Any Input, you should only trigger on changes to TE7401 and TE6050.
Nice catch Rick! The UI should be throwing back an error message mentioning the circular reference. It's possible there's two issues here, both the input attribute has a retrieval method and the analysis is configured with a circular reference. If the only issue here is the circular reference, I'd need the AF Client and Analysis version to try and reproduce!
ET01CE_01 is the first line output. I take it in the second line input. It's not conflict.
I am surprise this is so hard in PI AF.
I save the ET01CE_01 in to history server, then the analysis is ok.
If possible, when an Analysis is triggered the Analysis service gathers all data it needs from the Data Archive/PI Point/Attributes. It then calculates everything and only then writes the results back to the Data Archive/PI Points/Attributes.
Since the time frame of the TagAvg is fixed, it can already go and gather that data right away, before the current ET01CE_01 value is calculated and added to that calculation.
What you want to do instead is separate the subtraction and the TagAvg into two separate Analyses.
The issue is what triggers the analysis. Let's say the PI Data Archive received a new value for TE7401. That triggers the analysis to run. Let's call this particular invocation Run 1. The first thing going on during Run 1 is that is update and output the value for ET01CE_01. By virtue of updating ET01CE_01, it now spawns a new invocation of the analysis, which would be Run 2.
You have 2 choices to make this clean.
Choice 1 - as suggested yesterday, do not trigger on change of ET01CE_01.
Choice 2 - Break up the analysis into multiples. One analysis is to trigger on TE7401 or TE6050 and its primary function is to update the value to ETC01CE_01. And that's it for that analysis. Then create a 2nd analysis that triggers on a change to ET01CE_01.
Actually there are 3 choices since you are free to ignore any advice.
Retrieving data ...