LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single Precision Floating Point Numbers to Bytes

Ok here is some code that i have written w hile back with some help from the support staff. It is designed to take in precision floating point numbers that are stored as 4 bytes and convert then to a decimal value. It works off of a udp input string and then also reformats the string. I have the ability to look at up to 4000 parameters from this one udp string. But now what i want to do is do the opposite of what i have written, and also perhaps get rid of the matlab i used in it as well. What i would like to be able to do is input a decimal value and then have it converted in to the 4 byte groupings that make up this decimal nd then have it inputed back in to a single long string witht hat grouping of bytes in the right order. A better explanation of what was done can be found on this website
 
 
as the original code followed the "Single Precision Floating Point Numbers and Bytes" example on that site but what i want to do is "Going from Single Precision Floating Point Numbers to Bytes". The site also explains the udp string that is being represented. Also attached is the original code that i am trying to simply reverse.
0 Kudos
Message 1 of 2
(3,333 Views)

Perhaps what you are doing is an exercise in the programming of the math conversion of the bytes.

But if you are just interested in getting the conversion done, why not use the typecast function?

If the bytes happen to be in the wrong order for wherever you need to send the string, then you can use string functions to rearrange them.

Message Edited by Ravens Fan on 10-02-2007 08:50 PM

0 Kudos
Message 2 of 2
(3,312 Views)