LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Password Protect a Single Tab in Dialog Tab Control

I am building a vi using a 'Dialog Tab Control' and one of the tabs will have input paramters that should only be changed by approved personel.

Is there a method of putting a password protect on a single tab so when it is clicked then you have to enter the correct password in order to gain access to the tab.

Failing this is there a method of password protecting individual numeric digital controls.

Regards

Dave
0 Kudos
Message 1 of 24
(11,278 Views)
The way I think I'd do it would be to use the event structure to catch the change to a new tab. Check to see if the new value is equal to that of the protected tab, and if so, pop up your password dialog as a modal dialog box. If they pass, let the change stand, if the password fails, use a local variable to set the value of the tab control to the old value.
0 Kudos
Message 2 of 24
(11,278 Views)
While there are many technical ways to do what you want, I suggest a change to your program structure: authenticate users at program start up, before they start using the features of the program. Seriously consider this.

To give an ill advised answer:
Disable the tab page (just the page, not the whole tab control) with the "special" controls. Then, depending on your version of LV, either monitor the tab for change or set up a "Value Changed" event. When the change is detected pop up your custom written "log in" vi. (Be sure to spawn this with VI server or as a seperate thread or your application will 'hang' while it is present), run your authenication test (password check, retina scan, whatever) and if they pass, enable the tab page. Disable the page as soon
as they change tabs again.

Good luck.
0 Kudos
Message 3 of 24
(11,279 Views)
You can password protect controls or indicators (tab page, too) by means of disable/enable property nodes.
See attached samples.
Romek
Download All
Message 4 of 24
(11,283 Views)
Thank you very much, I am slowly beginning to understand this mad mad language. Graphical programming could be the way forward!!!

daev
Message 5 of 24
(11,283 Views)
This is usefull for me. As much as I used this language, the most i don't like it. Making good documentation for this sucks, and you can't copy and paste Local variable, is a hassle for me to go up and down on the graphical programming, i really hate it. But it's usefull at the same time, i got to live with th is bitch.
0 Kudos
Message 6 of 24
(10,927 Views)
The best thing you can do when authenticating (to echo and expand upon VI Guy's comments) is to check passwords when the program starts up. This allows you to disable - or even better make disappear - options that the user is not allowed to access. For example, if a particular user isn't all allowed to perform a particular task the control for accessing that task shouldn't even be visible to that user. To a malicious user the very presence of a control they can't (initially) access can give them insight into how the system works and so assist them in breaching the security.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 24
(10,913 Views)

Good design insight. Mike...

We normally gray-out many fields in our company.

Hightime we changed, I think...

- Partha ( CLD until Oct 2027 🙂 )
Message 8 of 24
(10,844 Views)
To address your issues - and the issues are with you and not LV...

1) Good code in LV is very easy to document because it needs so little added. True it is not as easy to document bad code, but the solution is to stop writing bad code.
2) This is easy to address - don't use local variables. Most of the time you shouldn't be using them anyway.
3) I have no idea what you even mean to "go up and down in graphical programing" are you talking about moving up and down through your code hierarchy? If so you need to find another line of work. Any good code written in any languge will be hierarchically organized in someway. LV lets you see the structure, whereas most languages hide it from you.
4) Knock off the profanity, an educated person has no need of it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 9 of 24
(10,833 Views)
Pardon me, for the profanity, you're very correct.

But well written code it really talks about re-usability, and good documentation, "hierarchically organized" it depends on the design you're working on. Including a "bad written code" can have hierarchy. I have more than 12 years experience writing code in C, C+, believe me writing good code is not a problem for me. I'll give you 5 principles that any good programmer need to have so you don't confuse hierarchy as your main goal on a program:

1) Always comment your code.
2) Small, and concise.
3) Good variable naming.
4) Solve the problem.
5) Avoid to be abstract.

As you see there's not hierarchy included in this, because that's part of number 4 (it depends on the problem solving), and also be polite the reason i'm new to the language and I disagree on many aspects of "graphical programming", doesn't mean that i'm a newbie on this field.
0 Kudos
Message 10 of 24
(10,815 Views)