05-03-2022 04:16 AM
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!
Solved! Go to Solution.
05-03-2022 04:42 AM
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…
05-03-2022 07:53 AM
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
05-03-2022 08:00 AM
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.
05-03-2022 08:42 AM
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.
05-03-2022 01:55 PM
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 - ?
05-03-2022 02:00 PM
@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.
05-04-2022 04:08 AM
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
05-04-2022 04:25 AM
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
I've put the Start and Stop out of the Tab Control to be sure you can stop the VI anytime.
05-04-2022 04:48 AM
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?