LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split 1D array of string with spaces into solitary segments

Solved!
Go to solution

Hello ppl,

 

I wanted to post it because it took me a while to do this thing. I have array with spaces and I make 2D array. For instance:

?NM 100.0 ok ->

?NM

100.0

ok

 

Take a look. maybe somebody will find it helpful.

0 Kudos
Message 1 of 13
(5,575 Views)
Why not just use the Spreadsheet String to Array function? You can use a space as a delimiter.
0 Kudos
Message 2 of 13
(5,569 Views)
Nor do you have am array with spaces or are you creating a 2D array.
0 Kudos
Message 3 of 13
(5,568 Views)

can you please give me an example?

thanks

0 Kudos
Message 4 of 13
(5,565 Views)

that's what I have in the exit of the device. I need to check if there is ok there and the wavelength number...

0 Kudos
Message 5 of 13
(5,561 Views)

all is lack  here is after your string should be Trim white space.vi and then it works good. 🙂

0 Kudos
Message 6 of 13
(5,557 Views)

There is a primitive for empty string and your array building can be replace by an autoindexing tunnel at the loop boundary. 

 

Also, your code does NOT make a 2D array but a 1D array. What do you actually want to achieve?

0 Kudos
Message 7 of 13
(5,556 Views)

nothing to achieve only to share my solution.. because I searched in internet and found nothing.

0 Kudos
Message 8 of 13
(5,549 Views)
I don't understand your comments. Please explain how your code relates to a string array input and a 2D output. And why you think it is better than the LabVIEW primitive function I mentioned.
0 Kudos
Message 9 of 13
(5,544 Views)

if you want to remove it.. remove it.. I didnt find that option here... just I've searched through the internet and didn't find nothing to answer my needs. I didnt know about that primitive function that you've mentioned.. now I'll know.... sorry for bothering with my "good will".

0 Kudos
Message 10 of 13
(5,532 Views)