I want to perform an calculation at the end of an event-frame.

the moment the event frame has the end-trigger I want to calculate the total ammount of product produced (ProduktRunHH)

I can calculate that by multiplying as follows:

A= GemiddeldeCapaciteit (Pi-point, Average capacity over the period)

B= Duration (PI-point, duration of the event)

C= ProduktRunHH (PI-point, where the result of the calculation must be stored)

Hoeveelheid: Contains the formula: C=A*B

I did a calculation C=A*B as a formula in the event but it does not update the pi-point ProduktRunHH.

What is wrong....

Is this the correct approach?

Hi Hans,

Unfortunately, it's not currently possible to achieve what you're looking to do from the Event Frame. The Enhancement Request is covered here: https://techsupport.osisoft.com/Troubleshooting/Enhancements/109090 . The reason why your AF Formula Data Reference attribute isn't updating the PI Point is because the AF Formula doesn't write values. It does a client-side calculation, and doesn't store any archive history.

If you like, you can also submit your enhancement request here: https://pisquare.osisoft.com/content?filterID=all~objecttype~objecttype%5Bidea%5D

However, all may not be lost. The calculation results are stored in the EF, and can be accessed via PI OLEDB Enterprise. You can then use this to query for the values in the EFs and come up with a more custom solution to write the values to a PI tag, either by the RDBMS interface or by scripts. Let me know if you have any questions about this.