From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

problem splitting a string to array elements

Solved!
Go to solution

Hello, I'm working on a small LabVIEW project and I searched the web to divide a string into an array, the problem is not the string, I can change the delimiters at will, but when I want to see the contents of the array with an indicator always give a zeros....

 

As you can see in probe the spreadsheet string to array is 0.Captura.PNG

 Arduino program.png

 

Thanks!

 

0 Kudos
Message 1 of 4
(2,364 Views)
Solution
Accepted by topic author Sebass

Is your delimiter a space or a tab?  Since it is unwired, Spreadsheet String to Array assumes it is a tab.  I can't tell from your probe whether you are getting tabs or spaces.

 

Also, I suspect the quotes.  You have "%d",  but you have quotes only around the whole line.  Strip off the quotes before passing it in.  Then just use %d as the format string.

0 Kudos
Message 2 of 4
(2,356 Views)

Thank you!!, it was the quotes, the truth is that im feel a half stupid after the time i'm lost with this mistake jaja ....

0 Kudos
Message 3 of 4
(2,348 Views)

Get rid of the quotes in your format specifier. By including the quotes the VI is looking foe a string that looks like this: "206" "207" "208", not one that looks like yours that does not have the quotes around the numbers.

 

ETA: Looks like Ravens_fan beat me to it. I got distracted as I was replying.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 4
(2,338 Views)