I was wondering if it was possible to use a Performance Equation (e.g. FINDEQ) within another, let's say, FINDEQ?
Any help would be greatly appreciated!
Thank you for sharing your questions in PI Square!
It is possible to use I Performace Equation's tag into another Performace Equation's calculation if that is what you mean.
Could you please elaborate a bit more on what you are trying to calculate o maybe give us an example?
Thank you in advance,
Thanks for the reply. Sebastein's reply helped me fix my syntax which was giving me the error.
This is what I was attempting to write: FindEq('tag 1', '(FindEq('tag2', 'x', 'y'))', 'z', 1), and I was getting a calculation error. It was my first time attempting such a nested syntax, so I wasn't very sure if knew all the "rules".
Thanks! This community is very helpful. I've learnt a lot from reading replies to other questions!
In some cases you can embed PEs. For example: FindEq('sinusoid',(FindEq('sinusoid', 't', '*',40)), '*',40) would work. However, there are some limitations, and working with PEs this way is quite error prone. I would highly recommend using the PI Analysis Service to do PE calculations. You can store results in variables and use them in later calculations within the same analysis. For example you could store the result of FindEq() as Time_1 and then use Time_1 as a parameter in another FindEQ function. This is much more user friendly and there are more PEs available within the Analysis Service.
OSIsoft: How to Setup Expression Analyses with PI AF [PI AF 2014- v184.108.40.20643] - YouTube
Thanks for this! This is helpful to know.
I was trying to write a similar type of syntax but unable to get a value: FindEq('tag 1', '(FindEq('tag2', 'x', 'y'))', 'z', 1)
From your reply I understood that I didn't need the (' ') for the second FindEq. I'm still a novice at PI but nonetheless, I'm eager to learn more. I work with processes where I'd like to get the timestamps of various shifts in set-points, which are not easily deducible. I don't know much about the PI Analysis Service, but it seems like it would be useful. Unfortunately, in my department we have only limited capabilities and user rights for our PI System. I will definitely take this information back to my Supervisor.
Tip: After editing a PE, check the PI Server's Message Logs for success/ failure. The PI Performance Equation Scheduler will "pick up" the tag edit from PI Update Manager and will either accept the changes or log any failures it encounters with the syntax. It' doesn't always pinpoint the exact (character) position of the syntax error, however, it will "get you close" and provide quicker feedback (not having to write or wait for a new value @ trigger tag or wait for its next scheduled execution).
Retrieving data ...