📄 Training simulator

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

VariableTypeUnitRangeDescription
SimulatorRandomInt320–100Random integer updated every cycle. Used for demo/testing purposes (e.g., random animations, value changes).


Tank 1

VariableTypeUnitRangeDescription
Tank1_LevelTransmitterDoubleL0–10,000Current measured tank level. Always within physical limits.
Tank1_SetLevelDoubleL0–10,000Desired tank level setpoint. Used by automatic control logic.
Tank1_AutoManualInt320=Auto, 1=Manual, 2=OffControl mode for the tank system.


Flows

VariableTypeUnitRangeDescription
Tank1_InFlowDoubleL/s0–5000Calculated inflow based on pumps running and supply valve open.
Tank1_OutFlowDoubleL/s0–5000Calculated outflow when drain valve is open.


Pumps

Each pump (1–3) has the same set of variables.

Example: Pump 1

VariableTypeUnitRangeDescription
Pump1_StartStopInt320=Stop, 1=RunCommand to stop or run the pump.
Pump1_RunBoolfalse/trueStatus: true when the pump is actually running.
Pump1_ErrorBoolfalse/trueError/fault flag. When true, pump cannot run.
Pump1_AutoManualInt320=Auto, 1=Manual, 2=OffPump control mode.
Pump1_MaintenanceBoolfalse/trueWhen true, pump is in maintenance (cannot be used).
Pump1_SetSpeedDoubleRPM0–1500Speed reference (setpoint for VSD).
Pump1_SpeedDoubleRPM0–1500Actual 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

VariableTypeUnitRangeDescription
DrainValve_PositionInt320=Closed, 1=OpenValve position command/state.
DrainValve_AutoManualInt320=Auto, 1=Manual, 2=OffControl mode.
DrainValve_ErrorBoolfalse/trueError/fault flag.
DrainValve_MaintenanceBoolfalse/trueWhen 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.