Displaying attributes in PI Vision created by formulas in PI AF is too slow.

I am using PI AF to get an attribute value that I will display in PI Vision. The attribute is obtained from many formulas and table lookups. I am working on a heat exchanger "U" coefficient and it is calculated correctly, but I am having some problems when I want to show a trend for the last 2 years. I included attributes from daily TagAvg to reduce the amount of calculations, but this is not enough.

Parents
  • There is no real easy answer here. Some will say never use Formula but some simple calculations using 1 input argument, a Formula can be just performant as an Analysis. In your case of a Formula that is basically calling RoundFrac(A, 3), this sounds acceptable.

     

    Granted, this can be complicated if you have multiple inputs, or if you have a single input that is not a PI Point, but itself another Formula or Table Lookup. And when I say PI Point, I mean the recorded value, not an aggregate (e.g. average) which you can configure for an AFAttribute using the PI Point Data Reference.

     

    Again, short, simple Formulas are okay in my book. But Analyses allow for IF-THEN-ELSE constructs, and some other benefits such as working with String data, which Formulas cannot use.

     

    If you have sluggish performance, I would suggest a careful review where you consider where and when all the data is coming from and what is being done with that data. Don't just look at what AFAttribute is being fed into it as Parameter A. Is that AFAttribute a PI Point, an aggregated PI Point, or itself another Formula or Table Lookup? That is to say, try to trace down all the dependencies of inputs.

     

    Are there any aggregations or rolls ups needed? These are performance killers. If you use these, the best advice to to run the aggregation or rollup and then save the calculated results to a PI Point. That is to say, the calculated value is persisted or cached so that it can be quickly fed down the line to other parts of the overall calculation.

Reply
  • There is no real easy answer here. Some will say never use Formula but some simple calculations using 1 input argument, a Formula can be just performant as an Analysis. In your case of a Formula that is basically calling RoundFrac(A, 3), this sounds acceptable.

     

    Granted, this can be complicated if you have multiple inputs, or if you have a single input that is not a PI Point, but itself another Formula or Table Lookup. And when I say PI Point, I mean the recorded value, not an aggregate (e.g. average) which you can configure for an AFAttribute using the PI Point Data Reference.

     

    Again, short, simple Formulas are okay in my book. But Analyses allow for IF-THEN-ELSE constructs, and some other benefits such as working with String data, which Formulas cannot use.

     

    If you have sluggish performance, I would suggest a careful review where you consider where and when all the data is coming from and what is being done with that data. Don't just look at what AFAttribute is being fed into it as Parameter A. Is that AFAttribute a PI Point, an aggregated PI Point, or itself another Formula or Table Lookup? That is to say, try to trace down all the dependencies of inputs.

     

    Are there any aggregations or rolls ups needed? These are performance killers. If you use these, the best advice to to run the aggregation or rollup and then save the calculated results to a PI Point. That is to say, the calculated value is persisted or cached so that it can be quickly fed down the line to other parts of the overall calculation.

Children
No Data