Hello..I want to drop by and ask a technical question about PI AF, it is possible to make your own function on PI AF (not via Analysis Template), function configured like Abs, coth...etc. ? Thanks
If you're talking about expanding the function library available within the analyses, this is unfortunately not yet possible. 1st class citizen integration into the PI AF function library has been on many developers wish list since the introduction of AF analytics some 7-8 years ago.
What would be possible today is to create your own custom data reference, which would integrate nicely into PI AF, similar to the built-in data references, such as PI Point DR, Table Lookup DR, StringBuilder DR, etc.
Data References are deployed to the PI AF Server, and distributed + executed in the client computers connecting to the AF Server.
Another not well known solution could be to create your own web service to do the calculations or data processing of your desire, and have that be called from a PI Notification through the use of the Web Service Delivery Channel. The output from that web service could in turn be read back to AF through a table lookup DR, or simply be written directly to an AF attribute from the web service itself.
Thanks, it's clear.
Out of curiosity, what would you like to achieve? There might be other ideas that could help you solve your case.
There is a suggestion on OSIsoft UserVoice for user-defined functions. Please consider voting for it:
User-defined functions – User Feedback for OSIsoft Products and Services
Here's the original suggestion on extensible analytics:
Extensible analytics – User Feedback for OSIsoft Products and Services
This might not be what you need at all, but there is way to call those functions you've mentioned. Just as a disclaimer: Think really, really hard if you want to do it this way - there are probably a million reasons its a bad idea.
You can use Units of Measurement conversions to call all math functions in the DotNet Framework. This is described (with an example) in the Live Library: UOM conversion calculation with a formula. So you could create an appropriate Unit of Measurement, and then create an Attribute accessing a PI Point with a certain UoM and then give the Attribute the newly created Attribute to do the calculation.
Again, probably not what you need, still quite limited, and one should be careful with abusing it, but I thought it worth mentioning.
Retrieving data ...