temp409x Posted December 19, 2005 Report Share Posted December 19, 2005 Hi, I'm trying to take the following string and convert it into a byte array. "01 01 13 FF 14" But what happends is that each char gets converted into an element in the array, including spaces : [0][1][ ][0][1][ ][1][3][ ][F][F][ ][1][4] Where I really wanted : [1][1][13][FF][14] Is there a way to do this that I have not found ? I tried lots of different search/replace/index stuff but can't seem to get it right, Very new to LabView btw, Thanks! Quote Link to comment
Louis Manfredi Posted December 19, 2005 Report Share Posted December 19, 2005 Hi Temp: Try "Hexadecimal String To Number" (easiest) or "Scan From String" (more versatile) both of them are in the String menu. Let us know if you need further clues Best Regards, Louis Quote Link to comment
tnt Posted December 19, 2005 Report Share Posted December 19, 2005 Hi, to convert a long space delimeted string: use spreadsheet string to array, format string = %02X (hexadecimal), wire a space to delimiter and a 1D I32-array [i32] to array type. To view your data as hex, just select Radix visible on the [i32] and choose hex good luck tnt Quote Link to comment
Jim Kring Posted December 20, 2005 Report Share Posted December 20, 2005 Here is a solution: Download File:post-17-1135059066.vi Quote Link to comment
temp409x Posted December 20, 2005 Author Report Share Posted December 20, 2005 Wow, Thanks everyone, got it working great. Now I just need to figure out how to add Input and Outputs to my subVIs and I'm good to go. I'll make a post about that. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.