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: 

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,084 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,078 Views)
Nor do you have am array with spaces or are you creating a 2D array.
0 Kudos
Message 3 of 13
(5,077 Views)

can you please give me an example?

thanks

0 Kudos
Message 4 of 13
(5,074 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,070 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,066 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,065 Views)

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

0 Kudos
Message 8 of 13
(5,058 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,053 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,041 Views)