04-19-2016 05:53 PM
Thanks Jamiva,
Yes, for mantissa I haven't looked for negitive as our solution mainly deal with 31-42 deg C. I believe we can easily change the VI with the solution as suggested by you. But the -ve exponential is taken care in the present VI.
04-19-2016 06:05 PM
Hey GerdW,
I would like to point out few things in your solution.
1. It wont work using Join Numbers function, as it joins the decimal number not Hex numbers. i.e say to join hex 0xF and 0xF , we need solution to be 0xFF not 1515. So I felt converting it to Hex string would be easy job.
I believe there could be other solutions too.
2. For Exponential we can use you soultion, but instead of U32 we need to use I8 as it is signed 8 bit.
Thanks for the solution.
I believe sample Hex array which I had given should work
Note: 4 Byte Array(Hex) would be in BigEndien IEEE 11073 . i.e value of 24.25 would be 79 09 00 FE
04-19-2016 07:54 PM
@kiran.holla wrote:1. It wont work using Join Numbers function, as it joins the decimal number not Hex numbers. i.e say to join hex 0xF and 0xF , we need solution to be 0xFF not 1515. So I felt converting it to Hex string would be easy job.
Join Number joins two bytes to form a U16. So your two 0xF will turn into 0x0F0F. The simple solution to join two nibbles (4-bit numbers) is to do a logical left shift on one so that it is now using the upper nibble and then OR the two numbers. So your shifted number goes from 0x0F to 0xF0. Then you do 0xF0 OR 0x0F and you get 0xFF.
04-19-2016 08:18 PM
Sorry GerdW,
I reapplied your solution, it works fine.
only change is for Exponential instead of U32 we need to use I8 as it is signed 8 bit.
Sorry my mistake, Last time I had applied Join Number's it din't work, so I responded you with the last post. But today I reimplemented it with your solution, it worked fine.
Thanks again for the solution.
04-20-2016 08:50 AM
I worked up a slightly different algorithm for FLOAT (which is defined as an 8 byte (32 bit) number). Your example of 0x790900FE is 8 bytes, bigendian. I believe this will work for negative numbers too.