LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

single precision float to hexadecimal

Solved!
Go to solution

Hi everyone,

 

i have a question regarding the conversion of single precision float values to hexadecimal values. The other way around works just fine using the example of NI (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kKoNSAU&l=de-DE). But when i try to reverse the VI in order to convert a single precision float to a hexadecimal value it is not working.

For example if i want to convert the value 2.75 i get the hex value 40006000 (which is roughly 2) instead of the actual hex value for 2.75 which is 40300000.

Does anybody know a clever way to convert these values in the correct manner for both ways?

 

Thank you and best regards,

Marius

0 Kudos
Message 1 of 2
(152 Views)
Highlighted
Solution
Accepted by MariusPhilipp93

Just use the type cast function directly.

 

SGL_to_Hex.pngSGL_to_Hex_FP.PNG

 

Take note that the string indicator is in Hex display. If you need the string in normal display please refer to this link:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kIAVSA2&l=en-PH

Message 2 of 2
(141 Views)