LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Password application and linking VIs.

 Hey there guys,

 

 My friend and I are trying to make a labview program that is able to firstly do a "Log-in" process and secondly link to another VI. 

 

 So our program works this way: The user will enter his username and password, and the VI will search through an excel(.xls) file to verify it. We found one similar VI here(http://forums.ni.com/ni/board/message?board.id=170&message.id=417266&query.id=655804#M417266), but we can't seem to get the excel part right.

 Once the user has successfully logged in, the VI is supposed to automatically bring out the front panel of another VI which will be the main VI where all the main procedures will take place.

 

 So, can anyone help us? Thank you in advance. 

 

 Yours Sincerely,

 Nabil Fadhil

 

 

 

Message Edited by fadhil on 11-07-2009 06:43 AM
Message Edited by fadhil on 11-07-2009 06:44 AM
0 Kudos
Message 1 of 7
(3,227 Views)

that would be pretty simple.. Call the Main VI in the subvi (your log in VI)...Set the property "show front panel when called "and "close afterward if originally closed"  of the Main vi under vi properties.

 

 

guru

Regards
Guru (CLA)
0 Kudos
Message 2 of 7
(3,205 Views)

First of all, Read From Spreadsheet File.vi doesn't read MS Excel files; it reads from delimited text files. I took a few liberties with your VI and believe I've returned it to you functioning the way you want. 


  • I put your writing stuff into the Case Structure because you don't need to write if the username/password are invalid
  • I changed a few BD constants
  • I added a case for your Stop boolean.  Your way required hitting both Stop and OK.

 

I'd prefer to write this as a State Machine, considering all of the things you're doing.  Take a look at what I've changed; you weren't too far off but you missed a few key items.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 3 of 7
(3,181 Views)

 Thank you jcarmody. The password part of the VI now works. Is there a way to automatically bring out another VI's front panel if the Username and Password is correct? I've tried Guruthilak's method, but I can't seem to pull it off. I've attached the two VIs that I'm trying to link.

 

 

Thank you again. 

 

 

 

 

Yours sincerely,

 

Nabil Fadhil  

 

Download All
0 Kudos
Message 4 of 7
(3,172 Views)

You have not tried Guruthilak's method. To repeat, go into the subVI and select File>VI Properties>Window Appearance Customize. Select 'Show front panel when called' and 'Close  afterwards if originally closed'.

 

Also, clean up the code in the Main VI. Three separate case statements is too many. You can use one (wire the string into the case selector) and write the program without local variables. The sequence structure in the login VI is completely unnecessary.

0 Kudos
Message 5 of 7
(3,158 Views)

I've tried changing the main.vi as Mr Knutson has suggested, so that there's only one case structure. But it seems that no matter what, the second case "L2" will not seem to activate. Can anyone point out my mistake? 

Thank you in advance.

 

Yours Sincerely,

Nabil Fadhil

 

 

 

 

 

0 Kudos
Message 6 of 7
(3,146 Views)
In login2.vi, you don't need the Case Structure with the True constant, nor do you need the one around Main.vi.

As for your second case, I'm guessing that your VISA Read is returning something more than "A2".  Perhaps it contains some control characters.

You should not configure and close the Serial port inside your While Loop (without a very good reason).  Take them outside the loop and wire the reference to the Read function.

Try cleaning up your code, implement the suggestions Dennis made and probe the data you're reading.

undefined
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 7 of 7
(3,133 Views)