Hi!

I have some question about analysis. Can I use a string as an expression for my analysis?

Like this example:

Then I want to use the value of this attribute "Expression" as my analysis expression :

Can I do this or not?

Thanks!

Vitor.

Hi!

I have some question about analysis. Can I use a string as an expression for my analysis?

Like this example:

Then I want to use the value of this attribute "Expression" as my analysis expression :

Can I do this or not?

Thanks!

Vitor.

Hello Vitor,

Looking at the Evaluation result, you simply get the string instead of the summary you are interested in. So this obviously does not work.

The equation needs to be entered anyhow. With creating the additional Attribute you even increase your effort. Under the assumption what you are planning to do here would work, what value would you gain by holding an expression as Attribute value? What's the use case behind your idea?

Hi Gregor,

Well, We some pumps, and each one of them have an expression to calc the density and we don't want to create a lot of templates.

So we thought to use an attribute as an expression.

Hello Vitor,

I would assume that there is a specific factor for this calculation which changes but the formula itself remains the same. Storing this factor as a numeric attribute value to be used within the calculation is possible.

Hi Gregor,

Actually, example: We have 30 pumps and we want to use one template for all those pumps, but we need to calc the density,and for that, we have one differente formula for each pump.

So we thought to use the formula of analysis as an attribute.Hello Vitor,

Pardon me but I don't have an idea what kind of bombs you are talking about nor how one would calculate their density. Maybe you could help me to catch up by sharing 2~3 samples of different calculations.

Worst case, you are indeed dealing with 30 different Analysis for 30 different "bomb Elements" and in that case you will have to deal with either 30 different Element Templates or, if you allow extensions with a single Element Template, you will need to add an individual Analysis for each derived "bomb"

Gregor, May I Have been confused, well, I will give you examples:

This is our templates now:

And we have this attribute:

and then we have some calcs for this density like:

This is just an example:

pump1:

if (stateno('State of Bomb') = 1 ) then -25.6-(1.7*TagAvg('Output flow','*-40m','*'))+(2.548*TagAvg('Current','*-40m','*'))-(86.4*Pow(10,-9)*Pow(TagAvg('Output flow','*-40m','*'),2))+(2*Pow(10,-6)*TagAvg('Output flow','*-40m','*')*TagAvg('Current','*-40m','*')) else 0

pump2:

if (stateno('State of Bomb') = 1 ) then -(2.784*Pow(TagAvg('Current','*-40m','*'),2))-(552.36*(1/TagAvg('Speed','*-40m','*'))) else 0

So, each pump have this extensive formulas

Hello Vitor,

Thank you for sharing these formulas! It looks as if they use different attributes plus certain factors are different. It appears as if the choice of available attributes has already impacted those formulas. It is difficult for me to make a final distinction if there indeed is no option to find a generalized Analysis (formula) which would than would apply for all these bomb items.

If you indeed don't see an option to generalize this calculation, you will have to enter the formulas individually. I wouldn't know there's an option to enter the formula as Attribute value.

This can be an ideia for OSIsoft, I will search more about this, but I can't find anything about enter the formula as Attribute value. In my example, imagine to create 30 differents templates with the sames attributes just because of the analysis

- 1 person found this helpful
Hi Vitor,

I can confirm that this won't work.

You or we can create an enhancement request for you on our feedback website. Before doing so, I just want to make sure we get the details of the request right. Do you want Asset Analytics to evaluate a changing equation every time it runs, or simply once the element instance is created from the template, the equation is permanently set?

If the answer is that the equation is permanently set, you can add "non templated" analyses to elements based off a template. I'm not sure what the gain is of configuring the equation in an attribute and referring to that attribute in an analysis template instead of simply creating an additional "non-templated" analysis on each element. Can you explain why creating an additional analysis (with the same name) isn't an option?

Also, just a suggestion, but consider using variables in your analyses and definitely read over the best practice article ! It will save you a lot of work and headache down the line.

Best Practice article: https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB01641

Feedback: User Feedback for OSIsoft Products and Services

Thanks,

Seb

HI Sebastien,

Sorry for the delay in aswering, I was changing service and ended up not participating in the decision, but from what I remember the option to use in attributes would be because each pump has a different formula. But we had not thought of creating an additional "non-templated" analysis on each element.

Thanks for the help.

Hi Vitor,

I can confirm that this won't work.

You or we can create an enhancement request for you on our feedback website. Before doing so, I just want to make sure we get the details of the request right. Do you want Asset Analytics to evaluate a changing equation every time it runs, or simply once the element instance is created from the template, the equation is permanently set?

If the answer is that the equation is permanently set, you can add "non templated" analyses to elements based off a template. I'm not sure what the gain is of configuring the equation in an attribute and referring to that attribute in an analysis template instead of simply creating an additional "non-templated" analysis on each element. Can you explain why creating an additional analysis (with the same name) isn't an option?

Also, just a suggestion, but consider using variables in your analyses and definitely read over the best practice article ! It will save you a lot of work and headache down the line.

Best Practice article: https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB01641

Feedback: User Feedback for OSIsoft Products and Services

Thanks,

Seb