Comparator DeviceThe Comparator Device compares two input and generates an The Comparator Device has two inputs, "plus" and "minus", and a single output, "out. In its default configuration, the Comparator Device generates an When the Comparator Device's Script is run, it has an optional hysteresis parameter. The hysteresis value affects the comparison of the two inputs. The default value of hysteresis value is 0, but if it is greater than 0, the difference between the two inputs will have to be greater than 1/2 the hysteresis value before the output switches. Hysteresis is useful when there is "noise" on the inputs that causes them to wiggle around their actual value, and Comparator Device wants to ignore it. If the hysteresis value is greater than the noise, the Comparator Device will only react to the signal of interest. As an example, if the "plus" input were 3 and the hysteresis were 1, the "minus" input would have be greater than 3.5 to switch the output Creating a Comparator DeviceA Comparator Device is created by running the Comparator Script. The Comparator Script takes the following parameters:
|