BlockWerk Documentation
⊂

Interval Test

Logic

Tests whether the input signal falls within a specified interval. Outputs 1 if inside, 0 if outside.

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

y={1,L≤u≤U0,otherwisey = \begin{cases} 1, & L \le u \le U \\ 0, & \text{otherwise} \end{cases}

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 inclusive parameter controls whether each bound is open or closed
  • Edge cases: When lower = upper, only both inclusive 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