05-06-2015 09:37 AM
Hi everyone,
I'm new to LabView so this may be a trivial question but i'm a bit lost there.
I'm trying to program a communication protocol between a microcontroller and my VI.
A function i need to realise is to send unsigned interger numbers up to 4E+7. The format used is therefore U32.
However, when i try to convert these numbers in hexadecimal to write in my buffer, i get different results in Labview (using "number to hexadecimal string") than in an internet converter.
Plus, it seems like the result of the conversion run in Labview is composed by more bytes than needed (4 bytes for a U32)
Thank you by advance,
Clement Z.
the indicator is in Hex Display
Solved! Go to Solution.
05-06-2015 09:42 AM - edited 05-06-2015 09:43 AM
Hi Orbieu,
first: when you convert your number to an OCTAL string you surely will get different results (instead of HEXADECIMAL representation).
Plus, it seems like the result of the conversion run in Labview is composed by more bytes than needed (4 bytes for a U32)
Sure. You convert to a string consisting of chars 0-F.
Instead you should TypeCast the number to a string:
Don't forget to switch the string indicator to "Hex display" mode…
05-06-2015 09:50 AM
Hi again,
The number to octal was a try i did because i noticed that the "number to hexadecimal string" never gets something else than 0..8 so i thought the fonctions were maybe inverted.. silly 😄
Anyway thank you for helping me so quickly that's exactly what i wanted !
Have a nice day sir