Level Alarm
medium
Generates high and low alarms based on a level input, configurable setpoints, and a deadband to prevent chatter.
What it teaches
Two independent latched alarms, one on each side of the process. The Hi alarm raises at its setpoint and only clears once the level falls a deadband below it; the Lo alarm mirrors that, clearing once the level rises a deadband above. That gap is what stops a level parked on a setpoint from reporting over and over.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Level | REAL | 50 | Process variable level |
| Cfg_HiSP | REAL | 80 | High alarm setpoint |
| Cfg_LoSP | REAL | 20 | Low alarm setpoint |
| Cfg_Deadband | REAL | 5 | Deadband applied to clearing alarms |
| Sts_HiAlarm | BOOL | — | High alarm flag |
| Sts_LoAlarm | BOOL | — | Low alarm flag |
Required behavior
- Cfg_Deadband must be 0 or greater.
- Cfg_LoSP must be less than Cfg_HiSP.
- Sts_HiAlarm sets to 1 when In_Level is greater than or equal to Cfg_HiSP.
- Sts_HiAlarm clears to 0 when In_Level is less than Cfg_HiSP minus Cfg_Deadband.
- Sts_HiAlarm remains unchanged between its clear threshold and Cfg_HiSP.
- Sts_LoAlarm sets to 1 when In_Level is less than or equal to Cfg_LoSP.
- Sts_LoAlarm clears to 0 when In_Level is greater than Cfg_LoSP plus Cfg_Deadband.
- Sts_LoAlarm remains unchanged between Cfg_LoSP and its clear threshold.