LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

converting 4 bytes to float

Solved!
Go to solution

Wow, I must be onest. I didn't expect solving of my problem so fast.

 

Many thanks to crossrulz. His vi works 100% correct.

 

Regards to all!

 

Vlado

0 Kudos
Message 11 of 18
(974 Views)

Back again.

This time I need help with oposite conversion from float to 4 byte array.

It should be used Microchip conversion where from MSB side eight bits are used for exponent, then one bit for sign and rest of 23 bits for mantissa.

So question, how to modify attached example to get desired result?

 

Regards, Vlado

0 Kudos
Message 12 of 18
(885 Views)
Solution
Accepted by topic author California_J
03-13-2016 01:12 PM

California_J wrote:  This time I need help with oposite conversion from float to 4 byte array.

All you actually have to do is change the Rotate Left on the MSB to a Rotate Right.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 13 of 18
(865 Views)

Can you make that work for LV 2013??

 

I can not ID what those elements are and when I drag the snippett, written in 2015, it will not convert...

0 Kudos
Message 14 of 18
(222 Views)

Here you go.

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 15 of 18
(208 Views)

You ROCK!

 

Thanks a million!

 

How did you figure that out??

 

I have never used those structures!


VERY VERY cool!

0 Kudos
Message 16 of 18
(198 Views)

@davekorpi wrote:

How did you figure that out??


It's called a snippet.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 17 of 18
(191 Views)

I got the snippet thing... The MAGIC is that structure! VERY VERY cool!


@crossrulz wrote:

@davekorpi wrote:

How did you figure that out??


It's called a snippet.


 

0 Kudos
Message 18 of 18
(189 Views)