Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Code in PIACE for PIACEPoint is not retrieving exact value at time

$
0
0

Hi PI gurus,

I am creating a PIACEPOINT and setting the exetime, then retrieve the value, but the value being retrieved is not the value in the archive.  I suspect it is interpolating it somehow.

 

The code I have is:

 

ExeTimeExtended.ExeTimeSeconds = ExeTimeSec;
ExeTimeExtended.SnapTime();  // just a little function to put the time right on the hour, 00 mins or 00 seconds.
ExeTimeSec = ExeTimeExtended.ExeTimeSeconds;

 

input = new PIACEPoint(Context + Path, tag, TagAliasUsedType.TagAliasAsInput); 
input.ExeTime = ExeTimeSec;
inputs15minSums += (double)(float)input.Value;

 

My pi archive has values:  ** NOTE ALL DATES IN dd/mm/yyyy

VS-PI-4, UTD012, 0.09754037, 1/04/2014 10:30:00 PM, False, Not Annotated, False
VS-PI-4, UTD012, 0.02556984, 2/04/2014 12:00:00 AM, False, Not Annotated, False
VS-PI-4, UTD012, 0.09612005, 2/04/2014 1:30:00 AM, False, Not Annotated, False

When I step through my code the value of input.value = 0.0254562013

the value for exetimesec = 1396360800.0 (2/4/2014 at 12:00 AM)

which is pretty close to the midnight value but not exact.

 

Any thoughts would be greatly appreciated.

Peter
 


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>