11-07-2009 06:41 AM - edited 11-07-2009 06:44 AM
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
11-07-2009 09:02 AM
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
11-07-2009 05:53 PM
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'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.
11-07-2009 08:05 PM
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
11-07-2009 10:19 PM
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.
11-08-2009 12:55 AM
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
11-08-2009 07:00 AM