Example Code

Enable or Disable Controls Based On the Physical Channels that are Selected

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 shows how to programmatically enable or disable controls based on the physical hardware channels you've selected. This example covers two methods for achieving this, by using either implicit or explicit property nodes.

 

Description

It can often be useful to enable or disable certain controls and indicators based on the number of physical channels that a user has selected. The following two methods, using implicit and explicit property nodes, respectively, provide two options for implementing code.

 

 

 

Requirements

 

Software

  • LabVIEW 2012 or compatible

Hardware

  • No physical hardware is needed to test this code as it is simply comparing the channel strings and isn't querying the hardware.

 

Steps to Implement or Execute Code

 

  1. Download one of the attached examples.
  2. Select the hardware channels you'd like to use.
  3. Run the code.

 

Additional Information or References

 1.png2.png

 

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

Regards,

Sara Lewandroski
Applications Engineer | National Instruments

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