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);
The block switches pumps or other aggregates on a periodical basis, and automatic changeover if one pump fails.
|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|
|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)|
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.
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.