LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IEEE 11073 32bit float format

Solved!
Go to solution

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.

0 Kudos
Message 11 of 15
(1,726 Views)

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

 

0 Kudos
Message 12 of 15
(1,721 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 15
(1,710 Views)

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.

0 Kudos
Message 14 of 15
(1,702 Views)

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.

 

FLOAT_snippit.png

0 Kudos
Message 15 of 15
(1,680 Views)