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

Update pipoints? Options · View
einaradolfsen
#1 Posted : Wednesday, May 11, 2011 11:19:31 AM
Rank: Newbie
Groups: Member

Joined: 5/11/2011
Posts: 1
Location: Stavanger
I'm trying to get points from server, update the points in parallel locally and send the list/points to the server.

Do PI server have such functionality for sending a list of updates for points to the server?
In this example when looping though the points updating each point one by one is a bit slow.
Our need is to be able to update 50000 points at least.

void UpdatePoints(string query)
{
PointList pl;
Random value = new Random((int)DateTime.Now.Ticks);
Double dValue;

pl = myServer.GetPoints(query);
_watch.Start();
foreach (PIPoint n in pl)
{
dValue = value.NextDouble();
UpdatePoint(n.Name, dValue);//Timestamp is added in Uptadte point rutine.
}
_watch.Stop();
Console.WriteLine("{0} values was updated, time elapsed:{1}", pl.Count, _watch.Elapsed);
_watch.Reset();

}

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.
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.