Table of Contents

Twin Pump Control (v1.4)

Full Name

Lib.Mervis.v1_4.TwinPump

Required Project References

Description

A block used for controlling twin pumps.

Usage in ST

program test
    var
        twinpump: lib.mervis.v1_4.TwinPump;
    end_var

    twinpump();
end_program

Inputs

Name Data TypeAllowed RangeRetainMust Connect Meaning
OperatingMode OperatingModeType Yes No Requested operating mode
PumpSelector SelectorFromTwoType Yes No Selection of which pumps are in operation
ChangeTime time Yes No Interval after which the pumps are alternated
Demand bool No Yes Demand in automatic mode
Feedback1 bool No No Feedback for the operation of the first pump
Feedback2 bool No No Feedback for the operation of the second pump
Failure1 bool No No Failure input for the first pump
Failure2 bool No No Failure input for the second pump
EmergencyShutdown bool No No Emergency shutdown
KickFunctionInterval time No No Interval for periodic start function (if zero, the function is inactive)
KickFunctionDuration time No No Run time for periodic start
RunDown time No No Requested run-down time (if zero, the function is inactive)
FailureTimeout time No No Interval waiting for active feedback
AlarmPriority AlarmPriorityType No No Class of the generated alarm

Outputs

Name Data Type Meaning
Command1 bool Command to the first pump
Command2 bool Command to the second pump
ManualMode bool Indication of manually selected operating mode (Off or On)
ManualOn bool Indication of manual on
AlarmsStatus Lib.Mervis.v1_0.AlarmsStatus Composite interface for alarm indication
CompositeState1 + CompositeState2uint Bit field describing the overall state of the first and second pump
BitMeaning
0 Command1 resp. Command2
1 Feedback1 resp. Feedback2
2 ManualMode
3 ManualOn
4 Demand
5 Periodic start active
7 Failure of the first or second pump
8-9OperatingMode

Blocks

Name Data Type Meaning
Alarms Lib.Mervis.v1_0.AlarmsExtender4 Alarm function of the block
Alarm InputPriorityMeaning
Alarm1 see AlarmPriority Failure of the first pump
Alarm2 see AlarmPriority Failure of the second pump
Alarm3 - Not used
Alarm4 - Not used

Detailed Function Description

The block is used for controlling twin pumps, with only one being active at any time. Through the operating mode, pumps can be manually turned off, turned on, or left in automatic mode. Using the parameter PumpSelector, it is possible to choose which pumps are in operation. If the operating mode is set to on, this parameter directly selects which pump is running. In automatic mode, it determines which pump is operational. The block integrates a failure function, and in case of a failure of one pump, it automatically switches to the other while also ensuring their alternation after the set operating time.

Each pump maintains a counter of consecutive alarms, and if the value exceeds a fixed value of 3, the pump is declared inoperable and excluded from alternation and user selection (setting PumpSelector to this pump has no effect on the state of generated commands CommandX). This counter is reset by resetting alarms or successfully starting the pump (setting FeedbackX to true or FailureX to false).

If both pumps are in an inoperable state, the active pump does not change, and the outputs CommandX maintain their state according to the input Demand and the last selected pump.

Versions