Interval Test
LogicTests whether the input signal falls within a specified interval. Outputs 1 if inside, 0 if outside.
Mathematical Model
where L is the lower limit, U the upper limit. Inclusivity of each bound is configurable via the inclusive parameter (both, lower, upper, neither).
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
In | number | Required |
| ← Out | out |
Out | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
lowerLimit |
Lower Limit | number | -1 |
|
upperLimit |
Upper Limit | number | 1 |
|
inclusive |
Inclusive Bounds | select | both |
|
trueResultMode |
True Output | select | constant |
|
trueValue |
True Constant | number | 1 |
|
falseResultMode |
False Output | select | constant |
|
falseValue |
False Constant | number | 0 |
Usage Examples
- Zie de ingebouwde voorbeelden in de handleiding voor een demonstratie van dit blok.
Remarks & Best Practices
- Boolean output: Output is 1 (inside) or 0 (outside); suitable as a logical signal for Switch blocks
- Bound inclusivity: The
inclusiveparameter controls whether each bound is open or closed - Edge cases: When lower = upper, only
bothinclusive mode can produce a 1 - Performance: Trivial computational cost; no state or memory required
Related Components
- Comparator: Single-threshold comparison
- DeadZone: Outputs zero inside band, shifted value outside