Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Calculate the average of a tag within a time interval

$
0
0

Hello everbody,

 

i hope someone can help me. I´m a beginner in programming PI and VBA. As part of my bachelor thesis i need to calculate the average of a PI-Tag within a time interval.

 

For example:

 

PI-Expression: sinusoid (for example)

Starttime: 3.08.2014 00:00

Endtime: 4.08.2014 00:00

Time interval: 1 Day

Calculation Mode: average

 

The Result has to be written in a VBA-variable like

 

Dim average as double.

 

I tried already to help with the manual and google, but it doesn´t worked. So, i ask here after.

 

It would be very helpful if someone can show me the code.

 

Thanks a lot.


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>