Hysteresis
medium
Applies hysteresis to an analog input, setting the output true at the high limit and false at the low limit.
What it teaches
Use two different thresholds — one to turn on, a lower one to turn off — so the output doesn't flicker when the input wobbles near a single value. Picture an air conditioner: it switches on at 20 °C and keeps cooling until the room falls back to 18 °C.
Parameters
| Tag | Direction | Type | Default | Description |
|---|---|---|---|---|
| In_Value | Input | REAL | 0 | — |
| Cfg_HighLimit | Input | REAL | 20 | — |
| Cfg_LowLimit | Input | REAL | 18 | — |
| Out_Active | Output | BOOL | 0 | — |
Required behavior
- Cfg_LowLimit must be less than Cfg_HighLimit.
- Out_Active is set to 1 when In_Value is greater than or equal to Cfg_HighLimit.
- Out_Active is set to 0 when In_Value is less than or equal to Cfg_LowLimit.
- Out_Active remains unchanged when In_Value is strictly between Cfg_LowLimit and Cfg_HighLimit.