|
|
Rank: Member
 Groups: Member
Joined: 11/25/2009 Posts: 11 Location: Aberdeen
|
Hi All! This forum is truly so so exciting!  I have been search high and low for such a forum for such a long time! I am new to PI-SDK but have a few years experience in VB.Net. After testing and using some code on this site, i have managed to connect, list tags in a listbox, show snapshot value and extract an archive value. However, I am looking to get compressed data of one tag and to use that time stamp to load up an archive value of another tag. How do I do it? How does the PI-SDK handle an array of data? Any help will be greatly appreciated. Cheers Ken
|
|
|
|
|
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: Member
 Groups: Member
Joined: 11/25/2009 Posts: 11 Location: Aberdeen
|
Is .RecordedValues the same as Compressed data?
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
Hi Ken, Welcome to the forum! RecordedValues will give you the values that are stored in the PI data archives - if you have compression switched on for a tag then the value retrieved will be those that passed exception/compression. In short, yes this is the call you need - as you probably spotted there is also RecordedValuesByCount. How to use them (where variale P & OtherP = PISDK.PIPoint)... Code: Dim PV As PISDK.PIValue Dim PVS As PISDK.PIValues Set PVS = P.Data.RecordedValues("*-1d", "*") For Each PV In PVS Dim OtherPV As PISDK.PIValue Set OtherPV = OtherP.Data.ArcValue(PV.TimeStamp, rtAtOrBefore) Next PV
In the above, you get values for one tag and for each value retrieved you get an archive value for another tag. Just note the Retrieval Type Constant that you need to use, I just use At or Before the timestamp passed. Cheers, Rhys. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member
 Groups: Member
Joined: 11/25/2009 Posts: 11 Location: Aberdeen
|
I have noticed that while calling a huge amount of data, the program tends to freeze (white screen) this happens to PI-Datalink and PI-Processbook. Does anyone have experience in using Background worker to run those threads so that the program will not freeze up?
Do you know by any chance what is the size limit in terms of datapoints i can pull our using this method? If i want to get the compressed data for 10years, is that too much for this subroutinue?
|
|
|
Rank: Member
 Groups: Member
Joined: 11/25/2009 Posts: 11 Location: Aberdeen
|
Oh and by the way Rhys, This is an AWESOME forum and I look forward to contributing to it. RJK Solutions wrote:Hi Ken, Welcome to the forum! RecordedValues will give you the values that are stored in the PI data archives - if you have compression switched on for a tag then the value retrieved will be those that passed exception/compression. In short, yes this is the call you need - as you probably spotted there is also RecordedValuesByCount. How to use them (where variale P & OtherP = PISDK.PIPoint)... Code: Dim PV As PISDK.PIValue Dim PVS As PISDK.PIValues Set PVS = P.Data.RecordedValues("*-1d", "*") For Each PV In PVS Dim OtherPV As PISDK.PIValue Set OtherPV = OtherP.Data.ArcValue(PV.TimeStamp, rtAtOrBefore) Next PV
In the above, you get values for one tag and for each value retrieved you get an archive value for another tag. Just note the Retrieval Type Constant that you need to use, I just use At or Before the timestamp passed. Cheers, Rhys.
|
|
|
|
Guest
|