YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Summing daily totals Options · View
MartiG
#1 Posted : Thursday, August 11, 2011 11:29:21 PM
Rank: Newbie
Groups: Member

Joined: 8/11/2011
Posts: 2
Hi All,

I have a tag set up that totals the number of events that occured through each day, i.e. counts up events starting at from 00:00, and resets to zero at 23:59. I wish to use a Performance Equation to give me a running total, sum of, these 23:59 values from the beginning of each month, i.e. a Month To Date value.

Does anybody have any idea how I can achieve this using a PE.

Thanks
Sponsor  
 

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.
ktram
#2 Posted : Tuesday, August 16, 2011 1:23:04 AM
Rank: Newbie
Groups: Member

Joined: 8/16/2011
Posts: 1
Location: San Leandro, CA
I recommend contacting OSIsoft Technical Support for assistance with this question. Have you thought about using a totalizer to accomplish this?
milesUK
#3 Posted : Tuesday, August 16, 2011 1:27:54 PM
Rank: Advanced Member
Groups: Member

Joined: 5/28/2009
Posts: 75
Location: Cheshire, UK
How often do need to acquire this data? Could you use Excel to retrive the max for each day then summate those values?
MilesUK
ProcessBook v3.0.15.3
squatty
#4 Posted : Tuesday, August 16, 2011 3:06:08 PM
Rank: Advanced Member

Groups: Member

Joined: 4/7/2011
Posts: 137
Location: KZN, South Africa
This is similiar as calculating and eventweighted total over a time period, as far as I know the PI-CALC subsystem doesn't support this, but I can be corrected on this. You will have to build a totalizer tag with the following attributes

CALCMODE=ChangeEvents
FILTEREXPR=('tag')="YOUR STATE"
FUNTION=Events
OFFSET=+0h
PERIOD=+1mo
RATESAMPLEMODE=Natural
REPORTMODE=Ramping ->This will give you a sawtooth trend
SOURCETAG=enter you tag here
TOTALCLOSEMODE=clock

The only problem with this tag configuration is that you have create this tag the day before the month ends, it will start "sampling" from midnight for 1month (1mo), if you want to create the tag now you will have to be more creative, I know on the Techsupport site there was a document that refered to this.
squatty
#5 Posted : Wednesday, August 17, 2011 10:22:42 AM
Rank: Advanced Member

Groups: Member

Joined: 4/7/2011
Posts: 137
Location: KZN, South Africa
Just an update: I don't think you would be able to use +1mo as a PERIOD, try and see if you have any issues and let us know.
MartiG
#6 Posted : Saturday, August 20, 2011 12:50:50 PM
Rank: Newbie
Groups: Member

Joined: 8/11/2011
Posts: 2
Thanks for the replies,

milesUK wrote:
How often do need to acquire this data? Could you use Excel to retrive the max for each day then summate those values?


I am attempting to use the data in some shift logging software, which is interfaced with PI, so would not be able to use Excel for this. The software allows the use of performance equations. I also do not have admin rights to set up new tags, and getting tags set up always takes an age.

I was hoping to just set up an equation that totals the values at 23:59, or alternatively the days Max values, between the start of the month and the current time.
squatty
#7 Posted : Monday, August 22, 2011 9:23:14 AM
Rank: Advanced Member

Groups: Member

Joined: 4/7/2011
Posts: 137
Location: KZN, South Africa
You can use Bom('*') for your StartTime (ST) and Bonm('*') for your End Time (ET)

Your expression should look like this:

TagTot('YOUR TAG',Bom('*'),Bonm('*'))*Conversion Factor

Give it a try and keep us updated.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.