Control systems / Project 01

Water level.
Under control.

A virtual tank, one pump and a ladder holding circuit. Change the demand, interrupt the supply and watch how the controller responds.

WT-01 / Automatic fillingPaused · 0.0 s simulated

Receiving tank · 100 L capacity

50.0 %
Automatic disabledPump1 stopped
Inlet 0.0 L/sDemand 1.0 L/sPump starts 0

Operator controls

Test a condition

Tank level over time

Last 180 simulated seconds · limits at 20% / 80%

Control events

  1. Ready. Run a filling cycle to begin.

Inside the rung.

AutoEnabledFALSE
SourceAvailableTRUE
LowLevelFALSE
HighLevelFALSE
Pump1FALSE

The control design

Start low. Stop high.

The pump starts at or below 20%. Its own holding contact keeps the filling request active as the level rises. At 80%, the high-level contact breaks the circuit. Filling starts again only when the level returns to 20%.

Automatic permission and available supply are common conditions for both parallel paths. Removing either permission stops the pump. Restoring permission restarts it only if a low-level request exists.

View the OpenPLC ladder

Original ladder screenshot from the OpenPLC project. The animated process above is a separate browser model of this rule.

Read the equivalent Structured Text
PROGRAM WaterLevelController
VAR
    AutoEnabled     : BOOL := FALSE;
    SourceAvailable : BOOL := TRUE;
    LowLevel        : BOOL := FALSE;
    HighLevel       : BOOL := FALSE;
    Pump1           : BOOL := FALSE;
END_VAR

(* Equivalent of the LD rung; Pump1 on the right is its prior value. *)
Pump1 := AutoEnabled AND SourceAvailable AND NOT HighLevel
         AND (LowLevel OR Pump1);
END_PROGRAM

Reference translation of the rung, not an exported native OpenPLC project. This controls a pump command; the tank model is separate.

Model assumptions and next build
  • 100 L tank; a linear level-to-volume relationship.
  • Pump capacity: 4 L/s. Outlet demand: 0–5 L/s.
  • The supply is available until its switch is cleared; its volume is not modelled.
  • Ideal sensors, no pipe losses, motor feedback or starting delay.
  • 50 ms numerical integration steps or smaller; browser timing is illustrative.
  • Next: add a numerical level in OpenPLC, then a second pump, alternation and pump-failure feedback.

The software command interlocks in this project are teaching examples. No physical safety circuit or safety PLC is represented.

Verification

Test the behaviour.

Run the browser model's checks for holding, upper-limit priority, supply loss and a complete refill cycle. Use the same conditions to compare your OpenPLC project.

Checks have not been run.

    The CSV records this browser session. Add the native OpenPLC project and a short recording of its tests to complete the portfolio evidence.