LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to split a string whenever it find a comma?

Hi,

 

   I had a string with 8 numbers among commas, example: "12.3, 21.5, 13, 18, 4.2, 5.11, 7, 8". I need to split it and separate the numbers in 8 different indicators.

 

indicator a: 12.3

indicator b: 21.5

indicator c: 13

indicator d: 18

indicator e: 4.2

indicator f: 5.11

indicator g: 7

indicator h: 8

 

How can I do it in LabView? I need to create a code in C? Because I tried to use some string functions and it's not running.

 

Thanks

0 Kudos
Message 1 of 4
(8,371 Views)

Spreadsheet string to Array using comma as the delimiter.

 

Then a single Index Array stretched downwards will give you each element that you can wire an indicator to.

0 Kudos
Message 2 of 4
(8,366 Views)

format.png

 

sorry for the iconic look...just updated LV to 2013 and have not configured

0 Kudos
Message 3 of 4
(8,343 Views)

@RavensFan wrote:

Spreadsheet string to Array using comma as the delimiter..


Spreadsheet string to array is the way to go. Are the indicators numeric or strings? You can don either by selecting the correct output type an format.

 

If the indicators are similar, you should also condisder an array indicator directly. Much less mess on the diagram! (Of course you can index out the element if really needed.)

 

 

Message 4 of 4
(8,328 Views)