08-06-2015 05:08 PM
Hello guys,
I know that is already a lot of posts regarding this issue, but I couldn't find exactly what I need and also couldn't manage to solve it myself...
I need to convert a string with ASCII characters to a string containing HEX representation of these characters.
What I did was:
Apparently it works very well, but only for a limited numbers of characters, defined by data representation of the 0 constant (U64). It allows me to convert only 8 ASCII characters, as you can see on the image below:
So, it converted from 0 to 7, but not the remaining characters (8 and 9).
Any ideas??
Thanks in advance!
Solved! Go to Solution.
08-06-2015 05:18 PM
What is the data type of the constant wired into the typecast. My guess is it is a U64. So it will only typecast the first 8 bytes of your string to a number, then you are doing hex on those 8 numbers.
Use the function String to Byte Array. Or you could also typecast where an array of U8 integers is wired into the typecast function.
08-06-2015 05:21 PM
08-07-2015 07:20 AM - edited 08-07-2015 07:21 AM
Raven and Omar,
Both solutions worked!
Thank you a guys, I have a lot to learn in labview programming.
Best regards!