How to preview values for a given tag

Discussion created by IOMHouston on May 7, 2011
Latest reply on May 9, 2011 by



For a given tag, if I wanted just to see the last 20 values (e.g., preview),


What is the best way to do this.




In OleDB, we can specify

select top 20….

But it is not obvious how this could be done through the PISDK.


It seems we have to specify an arbitrary end date, and hope there is at least 20 values.




Or specify a specific end date and keep executing (looping) with earlier dates until we have enough values.




Is there something like, get last 20 values for a given tag.




If I pick an arbitary far end date, will this have a significant performance impact?


In orther words, does the RecordedValues api return all the values or is the implementation optimizaed so the PIValues collection only contains a key to the PIValue. And the PIValues are loaded as the collection is iterated.