Compare Input
Overview
A Compare Input produces a boolean by comparing a source input against a value. The result follows the standard convention: true = 1024, false = 0. Use it to turn a measurement into an on/off condition — for example "oil pressure is below the warning limit" or "speed is inside the shift window" — that other logic, outputs or maps can act on.
Prerequisites
You need:
- A source input to compare — any existing input, referenced by its alias.
- The value to compare against. This can be a fixed number, or you can point the source/value at a Constant Value Input if you want a tunable threshold.
Add it in the app
- Add a new input and choose Compare Input as the type.
- Choose the source input.
- Give it a clear alias (e.g.
Low Oil Pressure). - Set the compare mode, the value, and a deviation for hysteresis.
- Enable the filter and set the debounce timings if the result still chatters.
Settings reference
| Setting | Meaning | Unit | Range / values | Notes |
|---|---|---|---|---|
| Source input | The input being compared | — | an existing input (by alias) | The value tested against Value. |
| Compare mode | How the comparison is made | — | Equal, LessThan, GreaterThan, WindowCompare |
See below. Result is 1024 (true) or 0 (false). |
| Value | The value to compare against | source's unit | int32 | The threshold/reference point for the comparison. |
| Deviation | Hysteresis band around the threshold | source's unit | int32 | Adds hysteresis so the result doesn't chatter as the source crosses Value — it switches at one edge of the band and clears at the other. (In WindowCompare it also sets the half-width of the in-range window.) |
| Enable filter | Turns on debounce of the boolean result | — | on / off | Recommended when the source hovers near the threshold. The three timings below apply when on. |
| Delay | Time the new result must be stable before it is accepted | ms | sint32 | Suppresses brief flips around the threshold. |
| Hold | Minimum time a result is held once accepted | ms | sint32 | Stops rapid re-triggering. |
| Interspace | Minimum gap between result changes | ms | sint32 | Ignores changes that arrive closer together than this. |
Compare modes: Equal, LessThan and GreaterThan test the source against
Value. WindowCompare is true while the source sits within Value ± Deviation — handy for "in range" checks.
Hysteresis vs debounce: Deviation is the first defence against chatter — it gives the threshold a dead-band so the result doesn't flip rapidly as the source hovers around Value. The Delay / Hold / Interspace debounce timings are a time-based backup if the result still chatters.
Common settings
Compare Input also uses the shared setting — alias. See Common IO Settings.
Example — low oil-pressure warning
- Type Compare Input, alias
Low Oil Pressure. - Source input = your
Oil Pressureinput. - Compare mode
LessThan, Value100(your low-pressure limit), Deviation10so it trips below 90 and clears above 110 (hysteresis). - Optionally Enable filter, Delay
200, Hold500so a momentary dip does not trip the warning. The input now reads1024(true) whenever oil pressure is below the limit,0otherwise.
Troubleshooting
- Result chatters on/off: increase Deviation for more hysteresis; if it still flips, enable the filter and raise Delay / Interspace.
- Always true or always false: check the compare mode and that Value is in the same units as the source input.
- Window Compare never true: Deviation is too small, or Value is not the centre of the band you expect.
Related
- Constant Value Input — a tunable threshold to compare against.
- Math Input — derive a value to compare.
- Counter Input — count how often a compare result fires.