
Re: Convert 4 integers value to double float value
Syahril Aug 15, 2018 7:24 AM (in response to Syahril)Hi all,
Hopefully can get some reply from expert member. Got urgent case.
Thank you. 
Re: Convert 4 integers value to double float value
tramachandran Aug 15, 2018 2:10 PM (in response to Syahril)It seems like you are asking about IEEE 754 doubleprecision binary floatingpoint format.
The IEEE 754 standard specifies a binary64 as having:
Sign bit: 1 bit
Exponent: 11 bits
Significand precision: 53 bits (52 explicitly stored)
The bits are laid out as follows:
Source: Doubleprecision floatingpoint format  Wikipedia
I don't completely get your question. Are you planning on doing the conversion or are you asking for the functionality in PI OPC UA client?

Re: Convert 4 integers value to double float value
Syahril Aug 16, 2018 2:47 AM (in response to tramachandran)Yes, you are correct. I asking for the functionality in PI OPC UA client to do the conversion. Example do the arithmethic operation.


Re: Convert 4 integers value to double float value
Roger Palmen Aug 16, 2018 5:44 AM (in response to Syahril)I short, the first 3 bytes of the first number give the exponent, except the first bit for sign. So it should be arithmetic to derive the floating point.
The fraction is easy:
 fourth number
 + third number multiplied by 10^4
 + second number multiplied by 10^8
 + last four bits of the first number
It's a bit early to do the math for the first number, and likewise for stripping the sign. I'll need a coffee first. Shifting or subtracting powers of two, but my binary math is a bit rusty...

Re: Convert 4 integers value to double float value
Syahril Aug 16, 2018 6:26 AM (in response to Roger Palmen)Thanks for your feedback. I already know how to do the calculation for this conversion. But i want to know if the PI POC UA Client have function/features to do this conversion directly. For example. the PI OPC UA Client get the data in 4 integer. How can i do the conversion?

Re: Convert 4 integers value to double float value
Roger Palmen Aug 16, 2018 9:18 AM (in response to Syahril)2 of 2 people found this helpfulAssuming you use the PI Connector for OPC UA:
The connector does not have provisions to change the data received. Thus if your source system presents 4 integers, then 4 integers is what you get. The integrator cannot change this, so you must transform the data afterwards.
Best case you can detect these situations in your asset data, and extend the asset model by the integrator to add this automatically (watch limitations: https://livelibrary.osisoft.com/LiveLibrary/content/en/conopcuav4/GUID15663C0E146B43A49A25E17514B97296)
