Example Code

Highlight Lower Values on a Gauge or Meter 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

1. Overview:

This VI can modify a gauge or meter to highlight values lower than the current value. The VI can also add limits or values of interest to the gauge or meter as well.


2. Description: 

This example shows how you can highlight the values that are less than the current value of a gauge or meter.  This allows for faster reading of the value when viewing the indicator.  This VI also shows how you can add limits or values of interest to the scale. This can be seen in the VI with the use of the Upper Limit and Lower Limit controls and are show in the gauge or meter as the color which was chosen for the Limit Color. The code creates ranges for the Scale Marker Values and mantains them updated in a Functional Global Variables.  It compares the value of the marker with the value of the Gauge or Meter, and sets the color. The example uses the color properties of the markers to set the color of lesser values.

   

3. Requirements

  • LabVIEW 2012 (or compatible)

4. Steps to Implement or Execute Code

  1. Extract the files from "Highlight Gauge Values LabVIEW 2012 NI Verified.zip"
  2. Open "Highlight Gauge Values LabVIEW 2012 NI Verified.vi"
  3. Set the Scale Maximum and Scale Minimum for the scale desired on the gauge or meter
  4. Set the Upper Limit and the Lower Limit to indicate your values of interest on the gauge or meter
  5. Select the colors for the Greater Than Color, Less Than Color, and Limit Color as desired
  6. Run the VI
  7. The meter and gauge indicators will update when changing the parameters in the front panel

5. Additional Information or References

VI Block Diagram

 

Block Diagram.JPG

 

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

Bryan H.

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