12-07-2017 02:26 PM - edited 12-07-2017 02:32 PM
Hi all,
I am having issues representing data in floating point format.
Here is an example:
The code above yields the following results:
Every value displayed is as expected except for single precision float. That bit array, converted to float, should be 33.5:
It appears that LabVIEW retains the decimal value of the int and converts that to float rather than the bit string, although I wasn't able to verify that for sure because I don't know how to see the bit string used for a float without converting it to int first.
How can I modify this code to generate the actual float value (33.5) of the bit string rather than the decimal value of the int represented in float form?
Thank you,
Amanda
Solved! Go to Solution.
12-07-2017 02:37 PM
Instead of looking for an answer on the Conversion sub-palette, look at the "Data Manipulation" palette where you will find the Type cast.
Wire a single precision float to the top input and give that a try.
Ben
12-07-2017 02:51 PM
Yes! That is exactly what I was looking for. And you were quick! Thank you 🙂
Amanda
12-07-2017 02:53 PM
@AmandaBacala wrote:
Yes! That is exactly what I was looking for. And you were quick! Thank you 🙂
Amanda
When you do something for 20 years...
Ben