AnsweredAssumed Answered

What is the best way to get a Double value out of a Float32 PI point?

Question asked by MassimoSporchia on Feb 20, 2017
Latest reply on Feb 20, 2017 by gregor

Hello folks,

 

as the title implies, I'm asking if there is a definitive answer to the problem.

I've already read these links:

https://techsupport.osisoft.com/Troubleshooting/KB/1172OSI8

https://pisquare.osisoft.com/thread/11718

 

But I can't find a definitive answer.

My example case is this.

I'm extracting data from a Single (float32) PI point and I'm figuring out what is the most correct value out of it.

The values are the result of this calculation: "TimeMethod=NotSupported;TimeRangeMethod=Total;RateConversion=hour" and when "ByDay" is specified: "TimeMethod=NotSupported;TimeRangeMethod=Total;RateConversion=day"

 

1SingleToDouble(A)257.78872680664062
2Double257.78872373090849
Single(A)
257.788727
SingleByDay10.7411966
SingleByDayX24257.788727
3SingleByDayX24ToDouble

257.78871917724609

 

My C# program treats everything as Double and I used PI System Explorer 2014 R2 SP1 to make this example.

As you can see, I'm referring to the green highlighted values, I can get up to 3 different values from the same PI Point and I would like to know which of the 3 values is the most correct: 1, 2 or 3.

 

IMHO, my instinct says the most correct value is (1).

My logic says (2) or (3).

(3) is different to (2) due to how AF is probably handling it's internal totaling calculation, I've no basis to say which one of the 2 is better.

 

Anyone have a clue?
Thanks

Outcomes