Overview
This example illustrates a very simple threshold technique.
Description
This simple VI displays how to detect when the analog waveform passes a certain threshold. It has three options, a rising edge detection, a falling edge detection and then anytime the value passes through the threshold. The important part of this VI is that the true value only occurs only for the iteration that the threshold is passed. This is valuable if you are controlling cases that you only want to occur at the moment the threshold is passed, without worrying about what happens after that.
An interesting challenge would be to add hysteresis to this to help avoid false detections due to noise.
Requirements
- LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
- Download and run.
- Exercise the Detection Type and Threshold controls.
Additional Information or References
Front Panel


VI Snippet


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