LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with text parsing application

Solved!
Go to solution

Hello,

 

I'm a beginner in labview and i have some problems with my application.

I have at my VI's front panel  an input text box  and two  arrays of strings : one which contains a couple of words that i have to tell if they can be found in the text.

And the other array contains the search results : found or not found

 

I made my version of the block diagram ( i attached it )  but i noticed that it only works only  the first time that i run the VI , afterwards it displays the same results despite the input text or the words. I find out the my array continued to append new entries each time my for loop runs so i  try to reinitialize the array with constant strings at the beginning but i guess i haven't been doing it properly because i have the same problem.

 

And i also have another problem : my array of words has it's size = 7 , and if i fill it with less words than it's size , in the results array empty boxes appear as found.

 

Can anyone gve me a suggestion ?

 

The first VI attached is my original application where i found the described problems  and the second one contains what i tried in order to fix them 

Download All
0 Kudos
Message 1 of 2
(2,144 Views)
Solution
Accepted by Laur

Autoindexing if your friend here (and makes things A LOT simpler).

 

Also know that the "offset past match" will be -1 if the word was not found.  So you can just do a simple check for the number being greater or equal to 0 to see if it was found.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,121 Views)