# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## How to convert comma-separated-string into numeric-array?

Hello,

my 34401 returns 200 values in a string with this format:

-1.42979706E-03,+4.46900451E-03,-8.48235088E-04,-2.17539596E-03,-1.34144462E-03,+4.50590958E-03,-9.78340028E-04,-2.31519575E-03,-1.10844497E-03,+4.70200416E-03,-9.83187455E-04,-2.45499555E-03.....

So the numbers are comma-separated and the doubles have a point.

How can i now move this values into a double-array?

Thanks for the help

Message 1 of 12
(9,531 Views)

## Re: How to convert comma-separated-string into numeric-array?

Hi OnlyOne,

easy like this:

Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 (+ LV2016 sometimes) on Win7+cRIO
Kudos are welcome

Message 2 of 12
(9,521 Views)

## Re: How to convert comma-separated-string into numeric-array?

Thx for the fast answer but its not working corectly.

The numbers are wrong converted:

For example a:

+2.93120677E-03 is converted to 2 instead of 0,00293120677

Whats wrong here?

Message 3 of 12
(9,505 Views)
Solution
Accepted by topic author OnlyOne
08-27-2015 04:09 PM

## Re: How to convert comma-separated-string into numeric-array?

Hi OnlyOne,

you should note that you configured your computer wrongly You use German/East Europe regional settings with "," as decimal separator and try to convert measurement data using "." instead...

Well, try a format string of "%.;%f" - and read the help for format strings!

When the different format string also fails, you may try this one:

Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 (+ LV2016 sometimes) on Win7+cRIO
Kudos are welcome

Message 4 of 12
(9,502 Views)

## Re: How to convert comma-separated-string into numeric-array?

Thx for the solution. Both things are working.

Message 5 of 12
(9,485 Views)

## Re: How to convert comma-separated-string into numeric-array?

Hello,

I was working on similar project.  I got to separate two string number as (25 , 124) where first number is temp and second is pressure read from arduino device.  I need to separaye these two numbers and put it into graph as well as store the results in a file.

24,124

25,167

33,234

and so on...

i could separate using your vi but it puts both in array  .  I was trying to separate it out and put in graph .

I look forward for anyone's help.  If I could get he Vi or detail information on it, I would really appreciate it.

Message 6 of 12
(8,348 Views)

## Re: How to convert comma-separated-string into numeric-array?

Use Index Array to get two different 1-D arrays of each column.

Message 7 of 12
(8,344 Views)

## Re: How to convert comma-separated-string into numeric-array?

Thank you for the reply. To be honest i am new to this labview . If you could show any example Vi i would really be so thankful.
Message 8 of 12
(8,341 Views)

## Re: How to convert comma-separated-string into numeric-array?

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 9 of 12
(8,335 Views)

## Re: How to convert comma-separated-string into numeric-array?

Thank you for this post. I had the reverse problem, converting a numeric array to comma separated list of strings.

Message 10 of 12
(7,430 Views)