LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

float to hex string

dear sir,
 i want to convert a float number to hexdecimal string so that i can transfer it on my communication bus. so please help me
my float number will be any type i.e 10.00. 320.11111,...... like this
 
 
 
 
thanking you
 
yours falgandha
0 Kudos
Message 1 of 25
(4,404 Views)

Hi Falgandha,

Use the Number to Hexadecimal String conversion function from the String -->> String to Number Conversion palette.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 25
(4,396 Views)

dear sir

i want float number to hex not simple

0 Kudos
Message 3 of 25
(4,394 Views)
Then use the "number to fractional String", same menu...
0 Kudos
Message 4 of 25
(4,389 Views)

Hi Falgandha,

Do you mean that you want to convert Float into Hex in the form of BCD?

Then see here.

Put the output data string into Hex format, that comes from the Flatten to String function in the Data Maniulation palette.

Hope this helps...

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 5 of 25
(4,383 Views)

dear sir,

 i am not getting what u write. i want a simple thing that if want a hex string for 45.56 float value how can i get that. Please send me that idea

 

regards

0 Kudos
Message 6 of 25
(4,349 Views)
Hi mom,

could you provide examples of what your float is and what the results should be?

There are several possibilities for "hex string". Usually this only refers to integer numbers - so do you want your float rounded to next integer or do you want an hexadecimal representation of your float or do you need BCD string (or array of u8) or ...???

Please provide examples, maybe a vi with controls containing the desired values (right-click-> make current default!)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 25
(4,345 Views)

Hi Falgandha,

If you flatten your Dbl [Float] to String, you ll get the desired result. Smiley Happy

This is what I meant by that link. Smiley Wink

Also, see the attached picture.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 8 of 25
(4,342 Views)

dear sir,

 i want a hexadecimal representation of my  float number. Consider a float value=51.20 now i want to send  this value using rs232 communication so for that only i required to convert this float value into hex. So please help me

 

regards

 

falgandha

0 Kudos
Message 9 of 25
(4,341 Views)
Sorry attachment missed out. Smiley Sad
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 10 of 25
(4,336 Views)