schutcw

Scheduling of Custom Data Reference

Discussion created by schutcw on May 4, 2014
Latest reply on May 7, 2014 by Beth McNeill

I have been implementing my own custom data reference in AF (with a lot of help from your feedback) using AFSDK v4.0 and the calculations are producing the expected values in AF. However, I have run
into a few problems and I am hoping to get some feedback from other developers.

 

An introductory note to my problem is that we use AF in almost all our applications. The custom data reference cannot be used in ProcessBook (RDA methods) and I am also having problems with all the data retrieval methods in DataLink except for CurrentVal(). (The DataLink compression retrieval is one problem I'd be happy to talk about).

 

The other problem is that we are thinking of running the calculations at a scheduled time each day. I have implemented a windows service to do this, but this is just one more thing the department needs to keep track of. Instead, we were hoping of utilizing the PI Analytics scheduler. Not seeing a way to tie directly into the scheduler (please correct me if I'm wrong), we decided we could use an Expression Analysis with Scheduling in PI Analytics to trigger the attribute that has the custom data reference. Therefore, the Expression is simply the AFAttribute's name and the output gets mapped to a separate PI Point attribute. This solution, while it doubles the number of AF attributes, ensures proper scheduling and also saves the output of the custom data reference to a PI point which can be used in both AF and DataLink. However, when the PI Analysis runs it produces a 'CalcFailed' error. When designing the expression, on the other hand, I select an example element, press the Evaluate button and it produces the correct result. Does anyone have any idea as to why the expression properly Evaluates when designing the Analysis but produces a CalcFailed error when actually run?

Outcomes