To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example is intended to read in two Analog Input Voltage channels and compare analog input channel 2 to a set voltage.
Description
If the voltage on analog input channel 2 is greater than or equal to 2.2 Volts a digital signal of true will be sent. If the voltage on analog input channel 2 is less than 2.2 Volts a digital signal of false will be sent. This program will continue to acquire the two channels of data until the stop command has been pressed.
This program is intended to use whenever you need to compare a voltage on a channel to a set voltage and if that voltage is greater than act upon it. This corresponds to the digital signal of true being sent when the value of analog input channel 2 is greater than or equal to 2.2 Volts. The original intention of this product was to close a relay if the voltage exceeded a 2.2V threshold.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**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.