08-19-2013 12:19 AM
Hi All...
I am trying to convert a hex string to ascii but it's not working. I get nothing on the ascii output. what am I doing wrong?
Thanks...
Solved! Go to Solution.
08-19-2013 12:23 AM
You have set the display of your string control to show the hex equivilant of the input string. Your input string is a word, not a number. Therefore your scan string is returning 0 becaus the input value is actual the word "OVATION" and not an ASCII string representing a hex number.
08-19-2013 12:24 AM
Did you try to right click the indicator and select Normal display?
08-19-2013 12:53 AM
Thanks for reply...
so I changed the string control to normal display and entered the hex code again. this time I get only OV on the ascii output (indicator) .
still confused... still new to LabVIEW.
Thanks
08-19-2013 01:59 AM
Your code makes no sense. If you are scanning it as I32, the most you can keep is four characters. Your input string is also dirty and not all hex (characters 0..F exclusively), because it also contains spaces. All you get is the first four hex characters, translating to your two bytes, then padded with two \00 at the beginning..
Instead, you need to:
Here's one possible solution (LV2011). There are many ways to do all this.
08-19-2013 08:33 AM
Thanks altenbac.... much appreciated