|
|
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
|
|
|
|
|
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: 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?
|
|
|
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
|
|
|
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.
|
|
|
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.
|
|
|
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.
|
|
|
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.
|
|
|
|
Guest
|