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

VBA code for Total calculations Options · View
Igor
#1 Posted : Friday, April 22, 2011 9:52:22 AM
Rank: Newbie
Groups: Member

Joined: 4/22/2011
Posts: 2
Location: Russia
OS: Windows XP SP3

Hello

Does anyone have some VBA code analog with DataLink formula?

Excel Cell formula =PIAdvCalcDat("ascue_3107";"22.04.2011 06:03:00";"22.04.2011 10:00:00";"1h";"total";"time-weighted";0;480;65;"pi")

TagName = 'ascue_3107'
StartDate = 22.04.2011 06:03:00
EndDate = 22.04.2011 10:00:00
Interval = 1h
Conversion Factor = 480
Calculation Mode = Total
Calculation Basis = time-weighted

I need get table (or string array)
22.04.2011 06:00:00 Sum of 3-min interval values from 06:03 to 07:00
22.04.2011 07:00:00 Sum of 3-min interval values from 07:03 to 08:00
22.04.2011 06:00:00 Sum of 3-min interval values from 08:03 to 09:00
22.04.2011 06:00:00 Sum of 3-min interval values from 09:03 to 10:00

Many thanks in advance

Regards
Mike Faulkner
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.
LyleM
#2 Posted : Monday, October 17, 2011 2:39:39 PM
Rank: Newbie
Groups: Member

Joined: 3/8/2010
Posts: 5
Can anyone suggest a C# equivalent to the Excel PIAdvCalcDat() function call? I'm also trying to do the same thing in C# that I do in Excel but can't figure out which PI SDK call duplicates the Excel function.

Thanks

Lyle

Igor wrote:
OS: Windows XP SP3

Hello

Does anyone have some VBA code analog with DataLink formula?

Excel Cell formula =PIAdvCalcDat("ascue_3107";"22.04.2011 06:03:00";"22.04.2011 10:00:00";"1h";"total";"time-weighted";0;480;65;"pi")

TagName = 'ascue_3107'
StartDate = 22.04.2011 06:03:00
EndDate = 22.04.2011 10:00:00
Interval = 1h
Conversion Factor = 480
Calculation Mode = Total
Calculation Basis = time-weighted

I need get table (or string array)
22.04.2011 06:00:00 Sum of 3-min interval values from 06:03 to 07:00
22.04.2011 07:00:00 Sum of 3-min interval values from 07:03 to 08:00
22.04.2011 06:00:00 Sum of 3-min interval values from 08:03 to 09:00
22.04.2011 06:00:00 Sum of 3-min interval values from 09:03 to 10:00

Many thanks in advance

Regards
Mike Faulkner

RJK Solutions
#3 Posted : Monday, October 17, 2011 9:39:27 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hello, PIAdvCalcDat() = Summaries2 in PI SDK.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
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.