LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

advanced password protection with a quit option.

Hi all.

I want to check the password of 5 differents users.
The password apears as ******.
But I want both a quit option.
The idea is : when a user enter "quit" or "QUIT" the vi stop and pass a boolean to 1 (used in an other vi...)
I have try to do this, but some problem appears.
***First : the vi run correctly till it but (run it 10 times and the problem will appears I think)
***Second : I try to display quit with normal letters and the correct passwords with *** letters... but it doesn't work : if I type quit, and then delete it and type my password, I see my password in normal letters...

Can you help me please?
I have search in the existing topics but find nothing corresponding exactly to what I wa
nt to do....

here the vi I made.
I think I'm not so far from the solution but .... 🙂

Thanks a lot in advance for your help.
0 Kudos
Message 1 of 6
(3,184 Views)
It's not common to use the password input to exit applications.

Sticking to a more standard behaviour and have an exit button instead is always good, it will make it easier for the user to anticipate how things are to work (no need to write an explanation on the panel...). I have attached a slightly modified version of the VI.

Some other tips:

Try to avoid the caps lock so much and stick to the dialog controls if you want the software to look professional.

Let the sub-VI connectors follow a from left to right design (inputs on the left, outputs on the right). It's often convenient to always use the same connector panel, e.g. to standardize on the 20 connector option. That way adding inputs and/or outputs later will not require a change.

On
ly use sequences when they are needed (lot's of messages on why here on the zone), in the password example you can use data flow instead.

Hightlight the password input so that the user can start typing in the password straight away. In the attached example highlighting when the password is found to be incorrect would also be nice, but hightlighting and events are not always good friends it seems.

Windows can often look better if you use the "Golden Cut" by the way, i.e. make the relationship between the width and hight of the windows equal to 1,618 ("Phi").
Message 2 of 6
(3,184 Views)
Thank you for the answer.

I explain why I use the quit to exit the programm.
The "password" vi is used as a sub-vi.
If the user is allowed to use the programm, then he have a password and enter the programm.
If not, I dont want him to close the windows till he have enter a correct password.
That's why i use the quit command.
When he enter "quit" the programm stop display a message that tell him to contact the author, and close labview.
Having a simple password checking is not a problem.
It's obvious that your programm is better than mine (sure !) but I really need this option to quit labview on the password vi.
If you know how to do, it will be very helpfull.
If not, can you explain me how to do what I want...

Thank a lot for your reply
0 Kudos
Message 3 of 6
(3,184 Views)
As the VI was he could still quit whenever he wanted by typing quit...the only difference now is that he can use the button instead.

However, perhaps I misunderstood the problem. Is the problem how to quit the application / LabVIEW? I though you read the output of the password VI and if the OK output was false you stopped the rest of the code...that's not what you do? To quit LabVIEW/the application you can run the Quit/Exit function on the application control palette. The downside to using that is that it just forces everything to quit, and that it makes the windows of the VIs temporarily go into edit-mode so you can see their LabVIEW icon etc. for a fraction of a second...neither of which are very professional....The best thing is to make sur
e all parts of the application is stopped in an orderly fashion and then you just make sure all windows are closed. The instant the last window closes (e.g. by using the front.panel.open property) the application will terminate nicely. I can make an example for you later if this is what you are looking for.
0 Kudos
Message 4 of 6
(3,184 Views)
mads.

You read in my mind.
Yes I use the stop/exit labview.
The people who use the programm are not ables to understand how it works ( 😉 ) but I just want to be sure that they cant edit the programm to print it for example.

I test your programm, and it work well ! ! !
Thank you !

If you have the time, I'm interrested in the other method to exit the programm corectly...
0 Kudos
Message 5 of 6
(3,185 Views)
Hello All,

STOP Function Stops the VI in which it executes, just as if you clicked the Abort Execution button on the toolbar.
EXIT Function Stops all executing VIs and ends the current instance of LabVIEW. This function shuts down only LabVIEW.

To be sure that people who use program are not able to edit program, you can use for example the EXIT function after stop to exit LabVIEW.
And you can change the VI properties (File>>VI Properties...) to customize the LV Windows Appearance.
Please see the attached file "Verify password".

Sanaa TAZI
Applications Engineer France
0 Kudos
Message 6 of 6
(3,146 Views)