LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a string array to a BYTE array

Hi,
I want to convert a string array to BYTE array. I use the "Hexadecimal to number.vi", but the returned array is U32. How can I get a U8 array returned ? (can't find help in LV inline help)
Thanks.
0 Kudos
Message 1 of 4
(3,454 Views)
Use the "String to Byte Array" vi, located in the function palette:

Numeric -> Conversion

Best regards;
Enrique
www.vartortech.com
0 Kudos
Message 2 of 4
(3,454 Views)
You can use the String to Byte Array.vi that is included in LabVIEW, but that gives you the ASCII value of each digit.
Or you can use something like the library routine that I have included here. This is the one that I use all the time (and I have the reverse of it as well for specialty output formats).
Hope this helps.

Rob
0 Kudos
Message 3 of 4
(3,454 Views)
Excellent... I was considering writing a C DLL until I saw this
0 Kudos
Message 4 of 4
(3,454 Views)