Example Code

Hide Clusters on the Front Panel Using "Visible" Property Node Using LabVIEW

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 example program allows you to hide and bring back clusters using event structures and the implicitly linked "Visible" property node.  This program could be useful when trying to create a program that only has certain functionality available to the user when necessary. Another option would be to use tab controls.


Description
This example initially hides two clusters on the front panel during runtime when the user presses the reset button. When the user presses "Generator 1," the Signal Generator 1 cluster appears. When the user presses "Generator 2," the Signal Generator 2 cluster appears. This all occurs with an event structure and implicitly linked property nodes. The visible property node can be used for any front panel object and can be implemented in the same manner as this example. It is found by right clicking on the control, Create>>Property Node>> Visible.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the program
  2. Press the reset button and both clusters will be hidden.
  3. Press the Generator 1 button and the Signal Generator 1 cluster appears. You can change the values of frequency etc.
  4. Press the Generator 2 button and the Signal Generator 2 cluster appears
  5. Hit the stop button to complete your test

Additional Information or References
VI Block Diagram

 5-309.png

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

 

 

Applications Engineer
National Instruments

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