Tank Fill
medium
Open a fill valve until the tank level reaches the setpoint and close within deadband.
What it teaches
Latched bang-bang control: valve opens when level < setpoint - deadband, closes when level >= setpoint. The output is a latch driven by two thresholds. Teaches the canonical fill-controller pattern that every tank, hopper, and bin uses.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Level | REAL | 50 | Current tank level |
| Cfg_Setpoint | REAL | 100 | Target fill level |
| Cfg_Deadband | REAL | 10 | Deadband below setpoint to start filling |
| Out_Valve | BOOL | — | Fill valve command signal |
Required behavior
- Out_Valve turns on when In_Level drops below Cfg_Setpoint minus Cfg_Deadband.
- Out_Valve turns off when In_Level rises to or above Cfg_Setpoint.
- Out_Valve maintains its current state when In_Level is between the start-fill threshold and the setpoint.