ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Floatingpointnumber

Hi there!
How can I get a floatingpointnumber out of four bytevalues?
I am working with an thirdhand vi and the calculate an measurevalue which
you can get out of an array. This value exists out of four bytevalues like
IEEE
standard. But I must have a real floatingpointvalue. But how?????

Thanx for you Ideas

Oli
0 Kudos
Message 1 of 2
(2,630 Views)
Oli wrote:
>
> Hi there!
> How can I get a floatingpointnumber out of four bytevalues?
> I am working with an thirdhand vi and the calculate an measurevalue which
> you can get out of an array. This value exists out of four bytevalues like
> IEEE
> standard. But I must have a real floatingpointvalue. But how?????
>
> Thanx for you Ideas
>
> Oli
Oli,

LabVIEW stores value in IEEE. But 4 bytes is a single precision float.
Just type cast your 4 bytes to SGL type. If it's not the value that you
expect, try to swap bytes and words to see if your value is big/little
endian bytes oprder. If not, send to me your bytes and number you want
to see. Rarely need to convert bytes to IEEE format programmatically,
but possible.
--
Sergey Krasnishov
________________________
____________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru
0 Kudos
Message 2 of 2
(2,630 Views)