LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Password Protection: Controls, etc

Hi everyone, I was just wondering if anyone had any ideas regarding password protection of controls.

More specifically I am interested in "protecting" these values while the VI is NOT running.

I have developed one or two methods to do this, but both require excessive controls, event cases, etc.

So basically I was just wondering if someone has a simple method of "protecting" a value of a control from being edited while the VI is not running (aka the previous "run" value is loaded at next start etc)

Any input would be great

Thanks,
Ryan
Ryan

LV 7.1
0 Kudos
Message 1 of 7
(3,186 Views)
You can save the values of all the controls of interest to a file as you shut down the vi, and have an initialization state at start up that reads them back in. I'm assuming that you are concerned about someone editting the controls and changing the default conditions, as that is what they will revert to when the program is reloaded, or are you talking about having the vi left open but not running? Making an exe will resolve the ability to change the edit the defaults. What situation are you envisioning?


Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 7
(3,184 Views)
The second scenerio - leaving the VI open but not running.

When I create an .exe file, the user has an "EXIT" option. If they choose the exit option, the VI remains open but not running. They can then change any front panel values, and then restart the application. This kind of circumvents my password protection.

The way I did it was made 2 sets of controls, one visible on the front panel, and one not visible. the program operates off of the hidden controls. when a visible control is changed, the user is prompted for a password. to fix teh above mentioned case, i load the hidden values to the visible controls at the start of the program.

I was just curious if anyone else had tried to fix this issue...a file to reload the values would probably work well too i would think, however then someone could just edit the text or excel file right?

Message Edited by esa_paranoid on 05-26-2005 12:51 PM

Ryan

LV 7.1
0 Kudos
Message 3 of 7
(3,174 Views)
When you click the exit button, the VI should close and not leave the panel visible. Putting a Quit LabVIEW function in your exit state will fix that. Be sure to test for app kind with the application property App.Kind to determine development or run-time environment. Otherwise, the Quit LabVIEW will close LabVIEW when you are in development mode. There are also a couple of ways to handle ini files. One way is to have a VI that encrypts the data. Your main VI would then read and unencrypt it.
Message 4 of 7
(3,160 Views)
Dennis, that would be great; however, I am unfamiliar with "App.Kind" and am not sure where to find it or how to use it. If you could give me a few pointers I would appreciate it.
Ryan

LV 7.1
0 Kudos
Message 5 of 7
(3,152 Views)
It's a property node on the application palette. Put it on the block diagram and right click on it. Then Select Class>VI Server Application. Right click again and select Properties>Application>Kind. The value of the property retruned is an enum. One of the enum labels is Run Time System. Wire the output to a case statement and create a Run Time System case. In this case, put the Exit LabVIEW. Your other case is the default case and should be empty.
Message 6 of 7
(3,149 Views)
Dennis, thanks a ton. That works perfectly.

Everytime I post a question here, you give a reasonable solution; its nice to see someone take the time to help people with less experience in this area.

Thanks again
Ryan

LV 7.1
0 Kudos
Message 7 of 7
(3,141 Views)