Relay Block
Hysteresis switch: toggles between on/off values based on input thresholds
Open Relay in BlockWerk →# Relay Block
Description
A hysteresis switch that toggles between two output values. Turns on when input rises above the switch-on point, and turns off when input falls below the switch-off point. The gap between the two thresholds creates hysteresis, preventing chattering around a single threshold.
Mathematical Model
- If off and input >= switchOnPoint → output = onValue
- If on and input <= switchOffPoint → output = offValue
- Otherwise: maintain current state
Parameters
switchOnPoint / switchOffPoint
Threshold values for switching. switchOnPoint should be >= switchOffPoint for proper hysteresis.
onValue / offValue
Output values for the on and off states.
Remarks
- Hysteresis gap: The gap between switchOnPoint and switchOffPoint prevents chattering around a single threshold; a wider gap means more noise immunity
- State memory: The relay remembers its current state (on/off) and only transitions when the thresholds are crossed
- Initial state: When the input starts between the thresholds, the relay stays in its initial off state
- Comparator vs Relay: Use Comparator for noise-free digital signals; use Relay when you need hysteresis to suppress noise on a real sensor signal
- Inverted logic: Swap onValue and offValue to create an inverting relay (normally-on behaviour)
See Also
- Comparator: Single-threshold comparison (no hysteresis)
- DeadZone: Continuous nonlinearity
- Switch: Signal routing based on selector