LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric Array to String

Hi,

I have an array of U8 data that I need to convert to a single string of numbers.

The array is quite large and I can convert to a single string of numbers by looping through the array and converting each element to a numeric string & concatenating each converted element to string.

I am wondering what is the most efficient/faster way of converting?

 

Thanks & Regards,

Shane.

 

 

0 Kudos
Message 1 of 10
(15,935 Views)

Please attach your VI instead of a picture.

 

There are many ways to do that. What other methods have you tried? How do you measure speed?

0 Kudos
Message 2 of 10
(15,927 Views)

If you want space padded to 3 digits, just wire the array to the primitive and insert a "concatenate string" to the output. No loop needed.

 

If you want zero padded to 3 digits, I would recommend a LUT if the array is large. There are only 256 different strings.

 

U8ArrayToString.png

Message 3 of 10
(15,915 Views)

There is also the Array To Spreadsheet String.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(15,891 Views)

@crossrulz wrote:

There is also the Array To Spreadsheet String.


except you would need to get rid of the delimiters later. 😄 (see also)

0 Kudos
Message 5 of 10
(15,889 Views)

@altenbach wrote:

@crossrulz wrote:

There is also the Array To Spreadsheet String.


except you would need to get rid of the delimiters later. 😄 (see also)


Yeah, unfortunately you can't use "Empty string" as delimiter.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 10
(15,851 Views)

@Yamaeda wrote:

@altenbach wrote:

@crossrulz wrote:

There is also the Array To Spreadsheet String.


except you would need to get rid of the delimiters later. 😄 (see also)


Yeah, unfortunately you can't use "Empty string" as delimiter.

/Y


Borderline bug if you'd ask me. Totally no need for it not to work.

0 Kudos
Message 7 of 10
(15,840 Views)

wiebe@CARYA wrote:
Borderline bug if you'd ask me. Totally no need for it not to work

So why did my idea only get 28 votes since 2009 😞

0 Kudos
Message 8 of 10
(15,821 Views)

@altenbach wrote:

wiebe@CARYA wrote:
Borderline bug if you'd ask me. Totally no need for it not to work

So why did my idea only get 28 votes since 2009 😞


+1 on that. I also don't understand why my ideas don't get votes (especially my new find and replace ideas 1 and 2 (plug)).

 

It seems most people only watch the "hot ideas", so only few new and hot ideas ever get noted. I think it should go.

0 Kudos
Message 9 of 10
(15,810 Views)

wiebe@CARYA wrote:
+1 on that. I also don't understand why my ideas don't get votes (especially my new find and replace ideas 1 and 2 (plug)).

 


Yes, the IPE is a bit crippled when it comes to indexing. there is also this very old idea, of course. 😄

 

(But yes, ever since the page redesign, I rarely browse the ideas exchange anymore.)

0 Kudos
Message 10 of 10
(15,803 Views)