Protect My Control Button to Ensure the Value Doesn't Change When Running VI

Updated Dec 8, 2023

Environment

Software

  • LabVIEW

I have a control button in my LabVIEW project and I want it to be protected from changing to any value until I insert a password to enable controlling it, how can I do that?

Follow the steps from the picture below to create the program : 
 

In the Front panel, create three control button : 
  1. Numeric control : Control button that need to be protected
  2. Boolean control : Unlock button to be able to enter the password to enable changing the value of numeric control
  3. Boolean control : Stop button to stop the program


In the Block Diagram :
  1. Create a Flat Sequence Structure, then right click on the numeric control button in the Front Panel that need to be protected, select Create >Property Node >Disable. Then, right click on the Disable property node and select Create >Constant. Select Disable on the constant to disable the numeric control from changing value when the program runs.
  2. Create a While Loop and and Event Structure inside the While Loop. For the Event Structure, create two event for blank button (unlock button) and stop button. Right click on the Event Structure, select Add Event Case and add Value Change event for both numeric control and stop button.
  3. To make a dialog box to enter the password, find the Prompt User for Input Express VI and enter the following information like the picture below :
  1. Wire the password that need to be match to the equal function and connect it to the case structure.
  2. In the true case structure, create another Disable property node and connect it to enable constant. If the password enter is correct, the numeric control will be enable and you can change the control button value.
  3. Lastly on the stop event, wire the stop button to stop the program if the button is pressed.