Example Code

Custom Color Ramp in 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 allows you to easily set the colours and scale for a colour ramp control using the color box constants.

 

Description

Using property nodes it is possible to modify the appearance of front panel objects. By creating a custom cluster containing scale and colour values for ease of use and then restructuring it into individual cluster pairs it is possible to add as many points to the scale with different colours as required.

 

 

Requirements

  • LabVIEW 2013 (or compatible).

 

Steps to Implement or Execute Code

  1. Choose the colors for High Value, Mid Value and Low Value.
  2. Choose the corresponding values for these colors.
  3. Run the program.
  4. Use the Value In knob to see how the color changes accordingly.
  5. Press the stop button to exit.

Additional Information or References 

 capture.JPG

 

 

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

 

National Instruments - Tech Support

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