What are your thoughts on how this can be achieved? Since you are posting this, I can imagine you already tried something.
What issue do you have with this? I can for instance imagine you want to 'page' your results. Is there a fixed start date for the data?
Depending on the frequency of the data, you could try to retrieve the data one fixed timeslot at a time (for instance a month at a time) untill you reach the current date.
I'm curious if you already have tried something! Maybe we can go further from there.
To add to Michael's point, you may want to go through the PI Application Development course in vCampus Training Center. It teaches you the basics of how to use the SDKs and much more including your original question.
I have used below code to retieve complete history. But is there any method by which I can remove the duplicate data from the items?
ptPoint = srv.PIPoints["sinusoid"];
dbStartTime = Convert.ToDouble(textBox6.Text);
startTime = DateTime.Now.AddHours(-dbStartTime);
endTime = DateTime.Now;
myValues.ReadOnly = false;
//curTime = startTime.AddSeconds(intervalSeconds);
curTime = startTime;
while (curTime < endTime)
pv = ptPoint.Data.ArcValue(curTime, PISDK.RetrievalTypeConstants.rtAtOrBefore, null);
strValue = pv.Value.ToString();
strTimestamp = pv.TimeStamp.LocalDate.ToString();
curTime = curTime.AddSeconds(intervalSeconds);
pv = ptPoint.Data.ArcValue(endTime, PISDK.RetrievalTypeConstants.rtAtOrBefore, null
Binesh - please take a look here: vcampus.osisoft.com/.../5025.aspx - what you are doing is retrieving a single event per call and then moving in time. this is expensive as it requires a roundtrip per event, while recorded value returns you all data stored for the point in a particular time frame.
Thanks Andreas for this information.
I will work on this.
Thanks for your support.
Retrieving data ...