Example Code

Output Boolean if Signal is Less Than Threshold

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

Download All

Overview

In certain tasks, it is important to know if a set of data falls below a certain limit, and to know which points are below that limit.

 

Description
This document covers two options for testing the limits of signals. Option 1 is to take in the data that is produced from a signal and use a for loop to iterate through each point and check if it is below a threshold and output a Boolean TRUE it is it. Option 2 is to take in the data that is produced from a signal and use the Mask and Limit Testing VI to check it a signal is above or below a threshold. The second option has the added ability to display where in the signal the values are above or below a threshold.

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

  1. At block diagram is to reset the Boolean indicators.
  2. Run the VI
  3. data is produced using the Simulate Signal Express VIs. After the data is generated the flow goes to either Option 1 or Option 2 where the limit testing is done.

 

Additional Information or References

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

 

Joshua B.
National Instruments

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