05-13-2015 12:13 AM
As tittle, my code doesnt work if the first time is wrong or to be accurate after a wrong search, it wont able to search anymore. Below are my code, when i tried to remove the outside while loop and run it in countinously mode It work just fine but after i do it with while loop, it just dont work.
05-13-2015 01:56 AM
Try to run your code in 'Highlight Execution' mode (5th icon in the toolbar). This will help to understand how it executes. I suspect that you are trying to handle multiple 'Login' button clicks, but now the event structure executes just one time. Take a look at the 'event structure' help. Usually (not always) the event structure resides in a loop.
In the 'login' subVI, the first 'match regular expression' function including that feedback node is probably not exactly what you need. Just replace them with a 'trim whitespaces' function if you are trying to remove the 'line feed' from the input
05-13-2015 06:30 AM
The Match Regular Expression and feedback node in your subVI are actually clearing out your list. You should just get rid of the feedback node so that you always have the full list.
05-13-2015 06:42 AM - edited 05-13-2015 06:43 AM
After looking at the problem a little more, I think what you really want is something like this:
05-13-2015 08:50 AM
If something works correctly in "run continuously," but fails in the while loop you know you've coded it to work correctly once. Run continuously starts the code over after it runs and continues to run it as if it were the first time, every time. It looks like it's working correctly because it's always running the first iteration. You can never test the second iteration doing this.
Right now, get into the habit of never using that button. You've just found one, of the many, reasons it's bad to do so.
05-13-2015 09:34 AM
Sorry to ask but could i have the .vi file for the code? because i have no idea what is going on ><
05-13-2015 09:41 AM
That is a VI snippet. Drag it to your desktop, then drag that file into your block diagram.
05-13-2015 09:45 AM
aw >< im using 2010 cant perform so ><