PmpTankSimu (FB)

FUNCTION_BLOCK PmpTankSimu EXTENDS AbbLConC3

The function block PmpTankSimu is used to simulate the water tank.

  • This simulation can be used in all the three process control modes:
    • Pressure

    • Flow

    • Level

Note

Use this function block only for simulation testing and not with critical hardware in loop.

InOut:

Scope

Name

Type

Initial

Comment

Input

Mode

INT

1

2: The input Mode selects the pumping operation mode. Range-[1 to 2]
  • 1 = Emptying.

  • 2 = Filling.

TankHeight

REAL

20.0

3: The input TankHeight defines the Height of Tank in meters. Range-Value>0.0

TankDepth

REAL

10.0

4: The input TankDepth defines Depth of tank in meters. Range-Value>0.0

TankWidth

REAL

5.0

5: The input TankWidth defines the Width of tank in meters. Range-Value>0.0

SetInitialLevel

BOOL

FALSE

6: The input SetInitialLevel allows to set the initial level for tank simulation.
  • When input is TRUE, initial level setting for tank simulation is allowed.

  • When input is FALSE, initial level setting for tank simulation is not allowed.

InitialLevel

REAL

10.0

7: Initial value of tank level in meter. Range- [0.0 to TankHeight]

TankOutletDiameter

REAL

0.25

8: The input TankOutletDiameter defines the Outlet diameter of pipe in meter. Range-Value>0.0

PumpActFlow

ARRAY [1..4] OF REAL

9: The input PumpActFlow is an array of actual flow in cubic meters per hour. Range-Value>0.0

Note

At the first index of array PumpActFlow[1] connect the actual flow of the pump with PumpID = 1. This pattern must be followed for all pump IDs.

Inout

TankInletFlow

REAL

10: The input TankInletFlow defines the Inlet flow into the tank in m3/sec, for simplicity it is assumed that inflow is constant.

TankOutletFlow

REAL

11: The input TankOutletFlow defines the Outlet flow into the tank in m3/sec, for simplicity it is assumed that outflow is constant.

Output

ErrorID

ERROR_ID

3: Error code.

WaterLevel

REAL

0.0

4: The output WaterLevel indicates the Level of the tank in meter.

WaterLevelPercent

REAL

0.0

5: The output WaterlevelPercent indicates the Level of the tank in percentage. Range-[0 to 100]

WaterVolume

REAL

0.0

6: The output WaterVolume indicates the Actual water volume in m3.

TankVolume

REAL

0.0

7: The output TankVolume indicates the tank volume in m3.

TankPressurePercentage

REAL

0.0

8: Pressure in percentage at the bottom of tank. Range-[0 to 100]

TankPressurePascal

REAL

0.0

9: The output TankPressurePascal indicates the Pressure at the tank bottom in Pascal.

TankPressurePSI

REAL

0.0

10: The output TankPressurePSI indicates the Pressure at the tank bottom in PSI.

OutletPressurePascal

REAL

0.0

11: The output OutletPressurePascal indicates the Pressure at the outlet pipe in Pascal.

OutletPressurePSI

REAL

0.0

12: The output OutletPressurePSI indicates the Pressure at the outlet pipe in PSI.

Methods:

A_StartAction

B_CyclicAction

C_CleaningAction

D_AbortAction

E_ResetAction

Structure: