|
|
Rank: Newbie Groups: Member
Joined: 2/16/2011 Posts: 3 Location: Sutton Bridge, Lincs, UK
|
OS: Windows XP App: Excel 2003 SP3
Hello
I have a problem with extracted PI Sampled data that changes values when PI is queried, say, an hour later. I should be able to extract 12 hours of data and not find that a 1/3rd of the data changes values when the same data is extracted sometime later.
The Sampled Data criteria is: Tag (GC_2), Start Time (09/02/2011 09:00) , End Time (16/02/2011 12:00) , Interval (30m)
Results at 9am, 10am, 11am & 12pm
hh----09----10----11----12 09----100--102--101----102 10----------114--111----113 11----------------122----121 12------------------------130
I wish I could attach a 24 hour snapshot graphically explaining the problem. Basically a value displayed at 9am of 100 is 102 at 10am, 101 at 11am, 102 at 12pm. If interpolation is being applied by PI how do I get a consistent value?
Regards Mike
|
|
|
|
|
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: 617 Location: Cheshire, United Kingdom.
|
Hi Mike, Do you have the 'step' attribute turned on for the tag? How often is the tag receiving data? Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 2/16/2011 Posts: 3 Location: Sutton Bridge, Lincs, UK
|
Hello
The Attributes for the Tag (GC_2) are as follows and appear in the Tag's Display Category.
1. Display Digits: -5 2. engunits: GJ 3. Step: 0
Unfortunatley I don't know how often the Tag recieves data. I run my VBA 24/7 starting 00:05:00
Regards Mike
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
When you say you run your VBA, are you pulling the sampled data out via PISDK or refreshing the cells containing the PI-Datalink sampled data function? Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 2/16/2011 Posts: 3 Location: Sutton Bridge, Lincs, UK
|
Hello
VBA Module References PISDK 1.3 Type Library & PISDKCommon 1.0 type Library
MS Access 2003 SP3 ============= Set pt = srv.PIPoints("GC_2") Set pdata = pt.Data Set ipid2 = pdata Set vals = ipid2.InterpolatedValues2(strStartTime, strEndTime, strDuration) For intCounter = 1 To vals.Count dteDateTime = Format(vals(intCounter).TimeStamp.LocalDate, "dd-MMM-yyyy hh:mm:ss") dblValue = vals(intCounter).Value strMsg = "INSERT INTO tbl_PI_GC_2 ( [DateTime], [GC_2] ) SELECT '" & dteDateTime & "' AS Expr1, " & dblValue & " AS Expr2;" DoCmd.RunSQL strMsg Next intCounter
Excel 2003 SP3 ========== {=PISampDat(Criteria!$E$10,Criteria!$E$7,Criteria!$E$8,Criteria!$E$9, 1,"sutemap1")}
Regards Mike
|
|
|
|
Guest
|