|
|
Rank: Newbie Groups: Member
Joined: 8/3/2010 Posts: 2 Location: Maine
|
Hi i'm relativity new to PI and I'm trying a average a PI calculation between -2months and -1 one month. If I type 60d in the interval text box it averages it to today. I would only like the average between 2 months ago and 1 month ago.
Can anybody help?
Thanks
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Hello, Welcome to the forum. What does your expression look like? You could do something like the following: TagAvg('your_pi_tag.pv','*-2month','*-1month') OR TagAvg('your_pi_tag.pv',BOM(BOM('*')-1),BOM('*')) It depends on what you want the monthly average to be relative to, now/current/snapshot or the beginning of the month (e.g. BOM PE function) Cheers. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 8/3/2010 Posts: 2 Location: Maine
|
Thanks for getting back to me,
I'm just trying to show the average values of a tag for 30 days ago, 60-30 days ago so on a so forth. Basically monthly averages from present day. What should I use for an interval?
thanks
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
The interval to use depends on your definition of a month. If you just want the 30 day average then you can use the day interval, e.g. TagAvg('sinusoid','*-60d','*-30d') Some people would consider a monthly average to be from the 1st to the last day of the month, in which case you would have a different syntax. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
|
Guest
|