Example Code

Search 2D Array and Change Background of Individual Cells 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 VI shows how to convert a 2D array into a table, and change the background color of the cells whose values are greater than a set limit.

 
Description

It is not possible to manipulate the properties of a single element in an array. It is possible to convert the array into a table and manipulate the properties of a table to highlight individual cells. This could be useful for performing a limits test in which you want to highlight data points that are outside of a certain range. This example shows how to convert a 2D array into a table, perform a limit test on the array, and change the background color of the cells whose values are greater than a set limit.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Initialize the array on the front panel and set a limit.
  2. Run the VI, you can see the background color of the cells whose values are greater than a set limit is changed.

Additional Information or References
VI Snippet

004.png

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

Stephanie A.
Americas Marketing Manager
National Instruments

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