To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI shows how to disable the control signal to a device if a measurement from the device falls outside of a user-specified range.
Description
This VI takes a device control signal (a boolean) and a numeric value. The VI compares the numeric value against a user-defined range. If the value falls within the range, the VI outputs the current value of the device control signal. If the value falls outside of the range, the VI outputs a false value for the device control signal. By default, the lower limit of the threshold is included in the range, while the upper limit is excluded.
Requirements
Steps to Implement or Execute Code
Additional Information or References
NOTE: If the user wants the comparison happen continuously, the user should place this code within a loop.
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.