Showing results for 
Search instead for 
Did you mean: 

Not able to remove spaces from ASCII code Hex string

Go to solution

Hello, Good Evening

I have am facing problem with this VI i am trying to remove space from the concatenated string i have used many ways to remove space but i am not able to remove space someone please help me with this errorCapture5.PNG

0 Kudos
Message 1 of 22

Hi Anjaney,


point 1: enable the "display style" indicator on each string control, indicator and constant!

point 2: then choose either "\-display" or "hex display" mode!


There are mostly tabs in your string, and only one space left from your " 2C " string constant!!!


But more important:

What is your requirement for this VI? How should the resulting string look like in "normal display mode" and how should it look like in "hex display mode"???

All those string to byte array to hex-formatted numbers to apply a CRC, followed by byte array to formatted string back to byte array again to hex-formatted string looks VERY fishy to me…

Best regards,
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 22

This is the output i am getting

24 2C 30 31 30 30 2C 41 41 41 41 2C 2B 30 30 2E 30 30..... and so on

and i wan to remove those gaps


I want this output so further i can continue my process

the CRC function is generating a value for the string that got converted into ASCII then the value is added to the string which will be compared on the other side and verify the string transmitted is correct or not

0 Kudos
Message 3 of 22

Wire the U8 array to a Number To Hexadecimal String function instead of Array To Spreadsheet String.

However I suspect that the whole job should require less processing.

LV 7.1, 2011, 2017
0 Kudos
Message 4 of 22

Can you please explain with an example

0 Kudos
Message 5 of 22

You should first give an example of a typical initial String and explain why you need to replace spaces with commas.

Formatting strings with %f does nothing. Furthermore, Array To Spreadsheet String calls continuously inject tabs you probably don't want in the result.

LV 7.1, 2011, 2017
0 Kudos
Message 6 of 22


i have taken this string and converting it to ASCII in hex format for that i need to use that function

but problem i want to solve is i don't want gaps in result string


0 Kudos
Message 7 of 22

You don't have spaces. Your are getting the default delimiter which is a tab character. An empty string is not a valid delimiter for "array to spreadsheet string", even though some ideas along these lines exist. Smiley Very Happy You can remove all tabs using this function. Make sure to wire replace all=true.


Yes, I too have the feeling that all this could be done with significantly less code. Smiley Wink

LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 8 of 22

can you please help me with what will be the solution of this to get desired output

0 Kudos
Message 9 of 22

Please attach the latest VI again, but with your typical data as default values in the string control so we have something to play with.

LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 10 of 22