Training Simulator – Tank System
The training simulator represents a simplified process consisting of one storage tank, three feed pumps, and two valves (supply and drain). The purpose of the simulator is to provide a realistic, but easy-to-understand, process that students can use to design and test their own SCADA applications.
The simulator listens on opc.tcp://localhost:4845
You can add this simulator as a PLC to the OPC UA devices, and browse and imports its variables. The current application is a pump/tank application.
Process Overview
Tank 1 holds liquid up to 10,000 liters.
Pumps (1–3) can be started and stopped individually and deliver flow into the tank when the supply valve is open. Each pump is equipped with:
Start/Stop command (0 = Stop, 1 = Run)
Speed reference (0–1500 rpm)
Actual speed (simulated ramping behavior)
Status bits for Run, Error, and Maintenance.
Supply Valve must be open for inflow to occur.
Drain Valve allows outflow when open.
Both valves support Auto/Manual/Off modes, Error, and Maintenance states.
Control Logic
When the simulator is in Automatic mode, it maintains the tank level around a setpoint using a deadband of ±50 liters:
If the tank level falls below (SetLevel – 50) → Pumps start at 1500 rpm, supply valve opens, drain valve closes.
If the tank level rises above (SetLevel + 50) → Pumps stop, supply valve closes, drain valve opens.
If the tank level is within ±50 liters of the setpoint → All pumps stop, both valves close.
This prevents constant switching and gives stable level control.
Dynamics
Pump speeds are not instantaneous: they accelerate and decelerate with a short ramp, but shut down quickly when stopped.
Flow into the tank is proportional to pump speed, with a small random variation to mimic real process noise.
The drain valve discharges a fixed outflow when open.
The tank is perfectly sealed: no leakage occurs when valves are closed.
Tank level is limited between 0 and 10,000 liters.
Exposed Variables
The simulator publishes all process variables over OPC UA. Important tags include:
Tank1_LevelTransmitter – current tank level (liters)
Tank1_SetLevel – desired setpoint (liters)
Tank1_InFlow / Tank1_OutFlow – current inflow and outflow rates (L/s)
Pump1/2/3 variables – Start/Stop, Speed, Run, Error, Maintenance
SupplyValve and DrainValve variables – Position, Auto/Manual mode, Error, Maintenance
SimulatorRandom – a random integer for testing and demo purposes
Purpose
This simulation is designed for SCADA training and exercises.
Students can connect their SCADA application to the simulator and practice:
Designing faceplates for pumps, valves, and tank instruments
Implementing trends and historical logging
Setting up alarms (high/low tank levels, pump errors, valve faults)
Testing automatic vs. manual control modes
Creating operator screens for setpoint entry and monitoring
The simulator runs continuously and reacts in real time, allowing students to test their SCADA logic, graphics, and alarms against a safe but realistic process.
Tag List – Training Simulator
Below is the complete list of OPC UA variables exposed by the training simulator.
Each variable includes: Name, Data Type, Unit, Range, and Description/Usage.
General
Variable | Type | Unit | Range | Description |
---|---|---|---|---|
SimulatorRandom | Int32 | – | 0–100 | Random integer updated every cycle. Used for demo/testing purposes (e.g., random animations, value changes). |
Tank 1
Variable | Type | Unit | Range | Description |
---|---|---|---|---|
Tank1_LevelTransmitter | Double | L | 0–10,000 | Current measured tank level. Always within physical limits. |
Tank1_SetLevel | Double | L | 0–10,000 | Desired tank level setpoint. Used by automatic control logic. |
Tank1_AutoManual | Int32 | – | 0=Auto, 1=Manual, 2=Off | Control mode for the tank system. |
Flows
Variable | Type | Unit | Range | Description |
---|---|---|---|---|
Tank1_InFlow | Double | L/s | 0–5000 | Calculated inflow based on pumps running and supply valve open. |
Tank1_OutFlow | Double | L/s | 0–5000 | Calculated outflow when drain valve is open. |
Pumps
Each pump (1–3) has the same set of variables.
Example: Pump 1
Variable | Type | Unit | Range | Description |
---|---|---|---|---|
Pump1_StartStop | Int32 | – | 0=Stop, 1=Run | Command to stop or run the pump. |
Pump1_Run | Bool | – | false/true | Status: true when the pump is actually running. |
Pump1_Error | Bool | – | false/true | Error/fault flag. When true, pump cannot run. |
Pump1_AutoManual | Int32 | – | 0=Auto, 1=Manual, 2=Off | Pump control mode. |
Pump1_Maintenance | Bool | – | false/true | When true, pump is in maintenance (cannot be used). |
Pump1_SetSpeed | Double | RPM | 0–1500 | Speed reference (setpoint for VSD). |
Pump1_Speed | Double | RPM | 0–1500 | Actual simulated speed (ramps toward setpoint). |
Pump 2 and Pump 3
Same structure as Pump 1, but with Pump2_ and Pump3_ prefixes.
Valves
Both the Supply Valve and Drain Valve use the same structure.
Example: Drain Valve
Variable | Type | Unit | Range | Description |
---|---|---|---|---|
DrainValve_Position | Int32 | – | 0=Closed, 1=Open | Valve position command/state. |
DrainValve_AutoManual | Int32 | – | 0=Auto, 1=Manual, 2=Off | Control mode. |
DrainValve_Error | Bool | – | false/true | Error/fault flag. |
DrainValve_Maintenance | Bool | – | false/true | When true, valve is unavailable. |
Supply Valve
Same structure as Drain Valve, with SupplyValve_ prefix.
Notes on Limits & Behavior
Tank Level is strictly bounded between 0 L and 10,000 L.
Pump Speeds ramp up/down to mimic real VSD drives, but stop quickly once commanded to stop.
Valves switch instantaneously between open and closed in this version.
Auto/Manual/Off Modes:
Auto = controlled by simulator logic.
Manual = SCADA/operator can directly force commands.
Off = safe state (device not available).
Maintenance Flags simulate equipment lockout for service.