Skip to Main Content
AVEVA Product Feedback


Status No status
Created by Guest
Created on Aug 20, 2022

User-defined functions

Allow arguments/parameters to be passed to variable definitions, effectively creating user-defined functions. For example, suppose that I want to define the function TagSum, which adds the values at all events in a time range. Then: TagSum(tag, start, end) = TagMean(tag, start, end) * EventCount(tag, start, end) https://pisquare.osisoft.com/thread/7591
  • Attach files
  • Guest
    Reply
    |
    Aug 20, 2022
    Would be nice to provide a plugin interface similar to user defined data refences. Currently we are doing this via our own background service reading from attributes and writing calculated results back to PIPoint data references.
  • Guest
    Reply
    |
    Aug 20, 2022
    In the question linked below, Asle Frantzen brings up a good point that functions should be treated as first-class citizens. This would be useful to be able to define a function in a variable. https://pisquare.osisoft.com/s/question/0D51I00004UHkGQSA1/personalized-functions
  • Guest
    Reply
    |
    Aug 20, 2022
    I would like to enhance rollups analysis so I can perform more complex calculations. Ideally I would like to be able to build my own functions for example sum of squares...
  • Guest
    Reply
    |
    Aug 20, 2022
    I agree and support this enhancement request. At present, I work around the above shortcoming by creating helper child elements that have the sole role of implementing one or more analyses. I define generic input and output attributes on the helper and then wire up by reference these generic attributes to corresponding particular attributes in the parent element. So, the generic attributes play the role of input parameters in a true function interface. I use configuration item attributes to set the parent attribute names needed to reference, and string builder attributes to interpret these strings. It is a compromise and a bit wieldy, but it gets me by.