To download NI software, including the products shown below, visit ni.com/downloads.
Overview
There may be two thresholds to consider when analyzing data: one to monitor when the data is rising, and one to monitor when the data is falling. This VI analyzes the data of a generated signal and indicates to the user if the values are "high" or "low" according to user defined thresholds and the trend of the data.
Description
A sine wave is generated and the data is read 100 samples at a time. The mean and least squares slope of the data is calculated for each read. If the values are rising (positive slope) the LEDs will be set to "high" if the mean is above the rising threshold. If the values are falling (negative slope) the LEDs will be set to "low" if the mean is below the falling threshold.
Requirements
Steps to Implement or Execute Code
Additional Information or References
Front Panel
VI Block Diagram
**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.