From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,413 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,412 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,401 Views)
0 Kudos
Message 4 of 7
(1,395 Views)
Solution
Accepted by 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,394 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,391 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,386 Views)