LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing values using an event structure

Thank your for suggesting that i use the highlight step, from that i was able to figure out that my passwords for some reason weren't matching. After a couple hours i couldn't figure out what was wrong so i did it all again and it is working fine now. I am going to assume that i wired up something wrong somewhere. 

 

I do have one problem with it, for some reason it keeps on freezing when i'm trying to run it for testing. I can't explain why it does this. Like if i enter the password wrong a couple times and than try to enter it correct the next time it will freeze. 

My VI is attached 

Just a harmless student
0 Kudos
Message 11 of 16
(1,502 Views)

Consider what stops the loop: It only stops when the Username and Password both match the stored inputs. On the first iteration the value in the stored input is the value from the file. On all subsequent iterations the value from the file is ignored and the value in the feedback node is used. What is in the feedback node? An empty string.

 

So, if the initial match is not correct, it will be looking for empty strings in both Username and Password.

 

Also, if the user presses Login a second time, the front panel will be locked until the event structure executes again. But it will not execute again until the VI stops and is started again. 

 

Usually event structures are inside a while loop just to avoid that problem. 

 

Lynn

0 Kudos
Message 12 of 16
(1,489 Views)

i tried to apply the solution you gave me by inserting an event structure but it didn't work. I think i might have inserted it in the incorrect spot. I have uploaded my VI. 
Once again i appreciate you helping me. 

Just a harmless student
Download All
0 Kudos
Message 13 of 16
(1,453 Views)

I have to leave in a few minutes and will be gone most of the day. Your latest VI appears to be identical to the previous one except for the file path and the stop button. It does not change the fundamental logic of the program.

 

Further, it hints strongly that you do not understand the basic dataflow paradigm of LabVIEW prorgamming. The value of Login will always be the same inside the while loop.  If you want to operate on different values of Login, the terminal must be read inside the loop.

 

Hint: For this program nearly everythign will be inside the while loop.

 

Lynn

 

 

0 Kudos
Message 14 of 16
(1,426 Views)

 

I have solved the issue if you would like i can give you my solution. I don't want to post it on here right now because i know my class mates will be on here hahaha. 

Just a harmless student
0 Kudos
Message 15 of 16
(1,375 Views)

Thanks for guiding me to the correct answer :). I have solved the issue. Once again there was a problem with my wiring and not saving things correctly -_- but once again thank you for your guidance. 
I have reverted back to my old problem of the front panel, i have made significant prgoress on it (I would like to think) but just can't seem to go past the finishing line. Can you please help me?

Just a harmless student
0 Kudos
Message 16 of 16
(1,372 Views)