LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make operator/admin mode in a VI

Solved!
Go to solution

Hello, i wanted to make this project but have no idea from where to start.

Basically there is a log in interface and once you log in there will be a simulated temperature reading. I wanted to make it so that, based on the username/password you put in, there will be 2 separate modes you can go into, them being the operator mode (in it you can only see whats happening without editing the parameters) and an admin mode that can edit the parameters (like the temperature ranges/how often the temperature is being read and the threshold at which a led will turn on if the temperature exceeds it.

I already know how to make the temperature reading part of the vi but have no idea on how to realize the operator/admin section.

Thank you very much for the help!

0 Kudos
Message 1 of 17
(3,146 Views)

Hi dom,

 


@domcorrado wrote:

I … have no idea on how to realize the operator/admin section.


Basically you use a case structure. The condition is the result of your logon routine…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(3,131 Views)

Yeah I got up to that part, but I have no idea on how to make the controls not usable when I’m on operator/usable when I’m on admin mode

0 Kudos
Message 3 of 17
(3,091 Views)

Use a property node with the property "Enable" to set the state between "Enable" and "Disable and Greyed out".

You can group your controls in a cluster to do it for a whole cluster instead of each control one by one.

Message 4 of 17
(3,088 Views)

In addition to Defaphe's cluster trick I often put all my basic controls on page one of a tab control and advanced controls on other tabs.  When I want a simple interface for an operator I use the tab property node called "Tabs Visible?".   When it's off the basic operators never even see that there are any other options available since those pages and their tabs can't be seen.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 17
(3,080 Views)

thank you, gonna try that later tonight and see how it works! Another quick question, since i will have two sets of passwords and username (one for admin and one for simple operator) how do i want to structure my code? Do I have to make two separate case structures? Or just one is enough with different cases? If it’s the last options how do I make a single case structure have 2 separate conditions - them being the strings for the admin username/psw and the operator ones - ?

0 Kudos
Message 6 of 17
(3,042 Views)

@domcorrado wrote:

thank you, gonna try that later tonight and see how it works! Another quick question, since i will have two sets of passwords and username (one for admin and one for simple operator) how do i want to structure my code? Do I have to make two separate case structures? Or just one is enough with different cases? If it’s the last options how do I make a single case structure have 2 separate conditions - them being the strings for the admin username/psw and the operator ones - ?


You don't need two passwords and usernames. The default user is an operator, only when they enter the correct password do they become an admin. Once that password is entered correctly you can then enable controls, show tabs, etc.

0 Kudos
Message 7 of 17
(3,038 Views)

Hello, i have this VI here and i want to add a (technically) simple feature. I want to make all the controls unusable and, when i put in the correct password and username, they become usable and i can edit the values in them. I was told its possible to do so with property nodes, but i never used them and im going crazy trying to figure out how it is done. Can you help me? thank you

0 Kudos
Message 8 of 17
(3,034 Views)
Solution
Accepted by topic author domcorrado

Question related to this thread :

https://forums.ni.com/t5/LabVIEW/How-to-make-operator-admin-mode-in-a-VI/m-p/4228218#M1227572

 

Using NIquist tab control solution you can have something like this 

enable_tabcontrol.png

I've put the Start and Stop out of the Tab Control to be sure you can stop the VI anytime.

0 Kudos
Message 9 of 17
(3,020 Views)

thank you so much! i've used the tab control and now it works. I have just a little question to finish up my project: i've made it so that the tab control its usable when i put the exact username/password and i press the log in button. What if now i wanted to make a log off button that clears my strings and disables the tab control again?

0 Kudos
Message 10 of 17
(3,001 Views)