JPBarnard
My feedback

10 votes
An error occurred while saving the comment 
3 votesJPBarnard shared this idea ·

2 votesJPBarnard shared this idea ·

1 voteJPBarnard shared this idea ·

1 voteJPBarnard shared this idea ·

327 votes
Reopening this suggestion to collect additional feedback.
JPBarnard supported this idea ·An error occurred while saving the comment JPBarnard commentedHello
I support this feature request. In 2015, I developed a PI SystemMATLAB integration layer and wrote a generic analysis framework that could accommodate not only PI System but any other such asset framework that had a .NET code base.
The integration layer allowed the user to define an AF Analysis with AF Attributes as inputs and output. However, the actual calculation would be left out and done in MATLAB instead. I wrote a parser in MATLAB for the AF Analysis definition, which would then isolate the input AF Attributes, read their data with AFSDK calls over the MATLABNET API.
The framework allowed any number of analyses to be implemented in MATLAB as a library of analyses, using the MATLAB OOP semantics. The AF tree would store the name of the MATLAB analysis in an AF Attribute, which could be passed into the AF Analysis, parsed by the MATLAB framework and dispatched to the delegated analysis object in MATLAB. Results would be displayed in MATLAB figures.
The framework entry point was from the MATLAB side, since there was no facility to spawn the MATLAB framework from an AF Analysis. Ideally, one would want to spawn the MATLAB code from a custom user AF Analysis. It would save my many lines of MATLAB framework code, although it was fun creating the bridge pattern and object factories in MATLAB OOP semantics.
A similar thing may be done with Python.
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.