LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Array of dec values in string

Solved!
Go to solution

Hello,

i search the siplest way to convert array with dec values (ascii coded) in a string.

For example Array with 50 46 49 to string 2.1

 

Thanks

Sepp

 

 

0 Kudos
Message 1 of 7
(1,432 Views)

@sepp70 wrote:

Hello,

i search the siplest way to convert array with dec values (ascii coded) in a string.

For example Array with 50 46 49 to string 2.1

 

Thanks

Sepp

 

 


Talking about ASCII or hex conversions is always confusing.  As a result, I'm not quite sure what you are trying to do.  Don't those ASCII values already correspond to the string you want to convert to?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 7
(1,431 Views)

Hi Bill,

content of array is for example 50 46 49 and i will convert in string "2.1"

Input array with dec values, output correspond ascii characters in a string.

 

Regards Sepp

0 Kudos
Message 3 of 7
(1,420 Views)
0 Kudos
Message 4 of 7
(1,414 Views)
Solution
Accepted by topic author sepp70

@sepp70 wrote:

Hi Bill,

content of array is for example 50 46 49 and i will convert in string "2.1"

Input array with dec values, output correspond ascii characters in a string.

 

Regards Sepp


I get it now; I should've gotten it the first time, sorry.  Just use the "Byte Array to String" function found in the Numeric --> Conversion palette.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 7
(1,413 Views)

wiebe@CARYA wrote:

Decimal Strng To String.png


I think he meant he has an array of u8.  Talking about these kinds of conversions are always tricky to me.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 7
(1,410 Views)

@billko wrote:

Talking about these kinds of conversions are always tricky to me.


Agreed.

 

If the input is an array of numerics, there's no point (or difference) in mentioning that it's decimal encoded.

 

If the input is an array of decimal encoded strings, it's quite different.

 

It would be better to have a VI with input\output specified.

Message 7 of 7
(1,405 Views)