====== Pump switch ====== {{:en:mervis-ide:35-help:t35.png}} ===== Block name ===== T35_PUMP_SWITCH ===== ST call ===== PROGRAM TEST_T35 VAR BOOL1,BOOL2,BOOL3,BOOL4: BOOL; UINT1,UINT2,UINT3,UINT4: UINT; INT1: INT; UDINT1,UDINT2: UDINT; FB: LIB.HVAC.V1_0.T35_PUMP_SWITCH; END_VAR FB(ENABLED:= BOOL1, BOK1:= BOOL1, BOK2:= BOOL2, SEC:= UINT1, MIN:= UINT2, HOUR:= UINT3, DAY:= UINT4, WHICH=> INT1, OUT1=> BOOL3, OUT2=> BOOL4, TRES=> UDINT1, TSHIFT=> UDINT2); END_PROGRAM ===== Library ===== LIB\HVAC ===== Version ===== V1.0 ===== Description ===== The block switches pumps or other aggregates on a periodical basis, and automatic changeover if one pump fails.\\ ===== Inputs ===== |Input |Type|Description |Default value| |ENABLED|BOOL|Demand to run a pump |False | |BOK1 |BOOL|Signal that Pump 1 is not in alarm, or that it is ready to operate|False | |BOK2 |BOOL|Signal that Pump 2 is not in alarm, or that it is ready to operate|False | |SEC |UINT|Seconds, definition of automatic changeover time |5 | |MIN |UINT|Minutes, definition of automatic changeover time |0 | |HOUR |UINT|Hours, definition of automatic changeover time |0 | |DAY |UINT|Days, definition of automatic changeover time |0 | ===== Outputs ===== |Output|Type |Description | |WHICH |INT |Pump which is active right now (1 or 2) | |OUT1 |BOOL |Command to run Pump 1 | |OUT2 |BOOL |Command to run Pump 2 | |TRES |UDINT|Time to the next changeover (s) | |TSHIFT|UDINT|Date and time of the last changeover (s since 1.1.1970)| ===== Function ===== If the //enabled// input is activated the first pump is switched on. Its activity time is cumulated, and after it reaches the changeover time, the first pump is switched off while the second pump is switched on. After its activity time reaches the changeover time, the pumps are changed again. The pumps are changed as soon as the cumulated operation time of the active pump is equal to the changeover time setpoint.\\ If a pump is active and its //BOK// signal goes to FALSE, which indicates a pump alarm, the pump is deactivated, and the other pump takes the duty.\\ //TRES// indicates time to the next changeover in seconds, //TSHIFT// indicates the absolute time of the last changeover. ===== Application example ===== {{:en:mervis-ide:35-help:t35_example.png}} The B31 block operates as commanding block for a twin DHW pump. Functions NOT, AND, Alarm and NOT create the OK signal of each pump from the pump operation demand (//PUMPX//) and pump operation feedback signal (//PUMPXFB//). If the pumps are enabled (the //ENABLED// input), a command is issued to start the lead pump. If the operation feedback command is not returned until the delay time (10 s), it means that the pump is in alarm or off on manual. Then, the corresponding signal //BOK1// or //BOK2// is //FALSE// and the lag pump is activated.