AnsweredAssumed Answered

How to retrieve time range data for each Attribute in bulk?

Question asked by PraveenCTS on Nov 27, 2015
Latest reply on Dec 1, 2015 by PraveenCTS

Hi all,

I am trying to retrieve bulk data using AF SDK every five seconds.

 

Since i need to retreive data corresponding to each attribute, What i am doing is..

First i am getting all the elements then, i tried to get attribute list corresponding to each element, then i tried to get 5 seconds data for each attribute as below:

 

foreach (var element in elements)
                {
                    AFAttributeList attributes = new AFAttributeList(element.Attributes);
                    var afvalues = attributes.GetValue(myTimeRange);
Parallel.ForEach(afvalues, afValue =>
                    {
Console.WriteLine("TagName" + afValue.Attribute.Name);
                            Console.WriteLine("Tagvalue" + afValue.Value); 
                            Console.WriteLine("Timestamp" + afValue.Timestamp.ToString());
}

 

Now i am passing timerange of five seconds to get AFValues from my Client

var afvalues = attributes.GetValue(myTimeRange);

.. That means for each attribute i should get 5 records but instead i am getting single record only..

 

Also in System Explorer there is setting button from where you can set the Data Reference configuration to get bulk data based on time range..

 

What should be my configuration so that when client passes the timerange, he should get the pi point data based on that time range..

 

Looking forward to your solutions. Thanks in advance.

 

Message was edited by: Praveen Odughat

Outcomes