LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do password protection in tab control?

Solved!
Go to solution

Hi, 

 

My version of Labview is 8.6.

I'm  using a 'tab control' to create a GUI of two tabs. I'm trying to protect one of the tab for authorized operators only. So what's the easiest way to do that? I don't actually need another password GUI but just a simple pop-up will be great. Alternatively, what else could I use to achieve the protection? 

The structure of my program is a case selection within a while loop. The while loop is for button detection as well as continuous run while the case structure is for selection of the modes.

 

I'll appreciate your advice a lot.

 

Cheers,

Nicholas 

0 Kudos
Message 1 of 23
(6,579 Views)
Solution
Accepted by SSR_Nicholas

Put a string indicator on the tab they can always get to.  Use and Event structure in a loop to detect the vale change event on that string.  If the string matches the secret password, enable the other tab.  If it doesn't, disable the other tab.

 

Initialization code for your program should clear the string by writing an empty string to the Value(signalling) property node of that string.

 

EDIT:
 Dropping that VI snippet in a blank VI causes problems.  The property nodes were unlinked from the controls and replaced with references.  And the controls themselves were dropped on the front panel in a reverse order causing the string to be under the tab control rather than on the first table.  Here is a better image and the example in LV2009
Message Edited by Ravens Fan on 08-27-2009 10:17 PM
Download All
Message 2 of 23
(6,574 Views)

Hi Ravens, 

Thanks a lot for the simple but decent solution. Then may I ask you two further questions?

 

1. What's the simplest way of replacing the typed-in numbers with '*****' concurrently?

2. How did you create the ' Page Enable' property node? Because I was using an LED indicator to show a boolean result. I wanted to disable&grey the LED while it's in IDLE state. I was trying to create something similar to the enable note in the property node list but seemed it was not available there. Could you please show me an example of that? i.e. an 'boolean indicator enable node' that accepts an enum input to control 

 

Thank you.

SSR 

 

0 Kudos
Message 3 of 23
(6,513 Views)

SSR_Nicholas wrote:

 

What's the simplest way of replacing the typed-in numbers with '*****' concurrently?


Right click on the indicator on the front panel.

There should be some options like 'normal' , 'hex', 'password' .... select 'password'

 

Cory K
Message 4 of 23
(6,511 Views)
hey cool...thx... do you know how to solve the query 2?
0 Kudos
Message 5 of 23
(6,508 Views)

To get to Page enable, go down the path I show there.

 

Tab control property node, Pages

Index Array on pages so you get a page instead of an array of pages.

Right click the page wire and get property node for page enable.

 

For a Boolean, it is slightly different and easier.  Right click on the boolean and Create > Property Node.  Pick the Disabled property.  Then you can create a constant of that.  In LabVIEW2009, the property is an enum.  Pre 2009, it is a constant where 0 is enabled, 1 is disabled, 2 is disabled and grey.

Message 6 of 23
(6,501 Views)

Yup..I have explored that. But the problem is that the 'disable property node' is a source. It only has one output note. i.e. I couldn't connect the constant enum to it to control over.

 

Thx.

SSR 

0 Kudos
Message 7 of 23
(6,487 Views)
Right click.  Change to Write.
0 Kudos
Message 8 of 23
(6,485 Views)

Hi Ravens,

 

The previous example is pretty good.  But I am thinking make it better by prompting a window for the user to input password once he clicks the grey-out(by default) tab.

I was trying to find something in the 'invoke node' but seemed no available one. Could you please show me an example of how to do that? 

 

Cheers,

Sirui 

0 Kudos
Message 9 of 23
(6,411 Views)

maybe this will help?

 

I made it to where it worked off of a constant path so you would have to change that, but you may be able to make this a sub-vi and have it pop up

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Download All
Message 10 of 23
(6,409 Views)