Example Code

Adding Security to Front Panels

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This VI forces user to enter a valid password before the program executes.


Description
This VI was created to add a password string to stop people viewing the front panel data until the password was correct. Initially the user can only see a password field. Once they enter the correct password (in this case "labview"), a graph appears and begins updating. Since the password is visible in the block diagram code, this method will only be useful with a password-protected block diagram or a deployed executable.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

  1. Click the Run arrow
  2. Notice that the front panel displays nothing
  3. Type "labview" into the string control
  4. Notice that the front panel now displays

Additional Information or References
VI Block Diagram 

 1.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

 

 

Ashish Naik
Automotive Business Development Manager
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.