Example Code

Numeric Range Based Case Structure

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
Coding that exemplifies how to run a specific code for each possible range of an input value.

 

Description
Often times you need to perform different actions based on the value of a number. This is easy enough if discrete values correspond to cases. However floating point ranges can be slightly more difficult. This example code implements a solution to this problem.

 

Requirements
LabVIEW Base Development System (or compatible)

 

Steps to Implement or Execute Code
1. Edit the ranges to the ones you would like.
2. Run the VI


Additional Information or References
Snippet.png
**This document has been updated to meet the current required format for the NI Code Exchange.**

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