As an electrical circuit, a comparator is an analog circuit with two input voltages: a reference voltage, sometime referred as a threshold, and an input voltage. When the input voltage is above or below the reference voltage, the output of the comparator change its state.
You can emulate or even create versatil a comparator in LabVIEW by comparing the input voltage against a constant using the most adequate comparison function in the function palette. For example, you may want to use the "Greater?" vi to compare the input voltage (the x input) against a constant value (the y input). If x > y, the output is a boolean TRUE, if not, is a boolean FALSE. You can use this output to determine your output voltage. A good function to do so is the "Select" vi, which wil
l allow you to select between two options depending on the boolean state.
Best regards;
Enrique
www.vartortech.com