LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Precision loss for float in cluster

Solved!
Go to solution

The data in question is not actually a measurement of sorts at all. It is two 16-bit integers stuffed into a 32 bit float, that is then unpacked again in labview into two 16-bit integers. So that the values look very suspicious is not that wierd.

I finally managed to find the root cause of my problem in a completely different part of the whole program. When converting the float to two integers, someone had decided to do a numeric conversion instead of a type cast. I was just led astray by the front panel resolution on the float-values, and ended up in the completely wrong place.

Message 11 of 12
(69 Views)

@ThomHell wrote:

I then take an array of these and shove them into a cluster using BundleByName. This causes the values to be truncated(?) to zero. Somehow, the data changes when it gets added to the cluster..


I can guarantee that bundling will not touch the data. If you don't believe me, just unbundle it again and compare, e.g. as follows:

 

altenbach_0-1763151419292.png

 

Depending on what kind of typedef the cluster is, you might have to use the controls editor

 

0 Kudos
Message 12 of 12
(37 Views)