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
ModeINT1
- 2: The input Mode selects the pumping operation mode. Range-[1 to 2]
1 = Emptying.
2 = Filling.
TankHeightREAL20.0
3: The input TankHeight defines the Height of Tank in meters. Range-Value>0.0
TankDepthREAL10.0
4: The input TankDepth defines Depth of tank in meters. Range-Value>0.0
TankWidthREAL5.0
5: The input TankWidth defines the Width of tank in meters. Range-Value>0.0
SetInitialLevelBOOLFALSE
- 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.
InitialLevelREAL10.0
7: Initial value of tank level in meter. Range- [0.0 to TankHeight]
TankOutletDiameterREAL0.25
8: The input TankOutletDiameter defines the Outlet diameter of pipe in meter. Range-Value>0.0
PumpActFlowARRAY [1..8] 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
TankInletFlowREAL10: The input TankInletFlow defines the Inlet flow into the tank in m3/sec, for simplicity it is assumed that inflow is constant.
TankOutletFlowREAL11: The input TankOutletFlow defines the Outlet flow into the tank in m3/sec, for simplicity it is assumed that outflow is constant.
Output
ErrorID3: Error code.
WaterLevelREAL0.0
4: The output WaterLevel indicates the Level of the tank in meter.
WaterLevelPercentREAL0.0
5: The output WaterlevelPercent indicates the Level of the tank in percentage. Range-[0 to 100]
WaterVolumeREAL0.0
6: The output WaterVolume indicates the Actual water volume in m3.
TankVolumeREAL0.0
7: The output TankVolume indicates the tank volume in m3.
TankPressurePercentageREAL0.0
8: Pressure in percentage at the bottom of tank. Range-[0 to 100]
TankPressurePascalREAL0.0
9: The output TankPressurePascal indicates the Pressure at the tank bottom in Pascal.
TankPressurePSIREAL0.0
10: The output TankPressurePSI indicates the Pressure at the tank bottom in PSI.
OutletPressurePascalREAL0.0
11: The output OutletPressurePascal indicates the Pressure at the outlet pipe in Pascal.
OutletPressurePSIREAL0.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: