Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

Comparator Device

The Comparator Device compares two input and generates an on or off output value, depending on how the two values compare.

The Comparator Device has two inputs, "plus" and "minus", and a single output, "out. In its default configuration, the Comparator Device generates an on output, if the "plus" is greater than the "minus", and an off if the "plus" is less than the "minus". If the two inputs are equal, it will leave its output unchanged. If either of the two input values are not numeric, it will also leave its output unchanged.

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 off, and less than 2.5 to switch the output on.

Creating a Comparator Device

A Comparator Device is created by running the Comparator Script. The Comparator Script takes the following parameters:

  • hysteresis : a number value which sets the hysteresis value between the "plus and "minus" inputs. A value of zero means there will be no hysteresis.

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Mon Dec 2 00:03:05 2013 (UTC)