LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple login but after it search for 1 wrong time, it wont search anymore

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. 

Download All
0 Kudos
Message 1 of 8
(3,431 Views)

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

0 Kudos
Message 2 of 8
(3,411 Views)

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.


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
0 Kudos
Message 3 of 8
(3,386 Views)

After looking at the problem a little more, I think what you really want is something like this:


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
0 Kudos
Message 4 of 8
(3,377 Views)

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.

0 Kudos
Message 5 of 8
(3,359 Views)

Sorry to ask but could i have the .vi file for the code? because i have no idea what is going on ><

0 Kudos
Message 6 of 8
(3,346 Views)

That is a VI snippet.  Drag it to your desktop, then drag that file into your block diagram.

0 Kudos
Message 7 of 8
(3,339 Views)

aw >< im using 2010 cant perform so ><

0 Kudos
Message 8 of 8
(3,334 Views)