3/26/2023 6:56 AM | |
Joined: 11/23/2017 Last visit: 10/24/2024 Posts: 2 Rating: (0) |
Good Morning All, I have project for Water Pumping Station, which has 3 Pump which works by its Run Hours and controlled by the Flow Demand. It goes in this way. When the Start Push Button is pressed one of the Lowest Run Hours Pump Will Run. After that when the flow increase to particular range the second Lowest in Run Hour Pump will Kick In and further more increase in flow will kick the 3rd Pump. and while stopping also the same 3rd will stop first and the 2nd and finally full stops. One Catch is, if any one is pump is in fault then the Immediately the next pump should start according to the logic. the Logic i made is attached with this post if any can anybody help with this. // diMotor1Hours := D600; diMotor2Hours := D602; diMotor3Hours := D604; Pump_Ready[0] := M600; Pump_Ready[1] := M601; Pump_Ready[2] := M602; HDmd := D900; Flow Demand adiMotor[0] := diMotor1Hours; adiMotor[1] := diMotor2Hours; adiMotor[2] := diMotor3Hours; FOR Input_i := 0 TO 2 BY 1 DO; adiNo[Input_i] := Input_i; //adPumpOutput[Input_i] := FALSE; END_FOR; FOR Input_i := 0 TO 2 BY 1 DO; FOR Input_j := (Input_i+1) TO 2 BY 1 DO; IF adiMotor[Input_i] > adiMotor[Input_j] THEN; temp_Motor := adiMotor[Input_i]; adiMotor[Input_i] := adiMotor[Input_j]; adiMotor[Input_j] := temp_Motor; temp_No := adiNo[Input_i]; adiNo[Input_i] := adiNo[Input_j]; adiNo[Input_j] := temp_No; END_IF; END_FOR; END_FOR; MotorNoSorted[0] := adiNo[0]; MotorNoSorted[1] := adiNo[1]; MotorNoSorted[2] := adiNo[2]; IF HDmd = 1 AND Pump_Ready[0] THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := TRUE; ELSIF HDmd = 1 AND NOT Pump_Ready[0] AND Pump_Ready [1] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := TRUE; ELSIF HDmd = 1 AND NOT Pump_Ready[0] AND NOT Pump_Ready [1] AND Pump_Ready[2] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := TRUE; ELSIF HDmd = 0 THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := FALSE; END_IF; IF HDmd = 2 AND Pump_Ready[1] THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := TRUE; ELSIF HDmd = 2 AND NOT Pump_Ready[1] AND Pump_Ready [0] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := TRUE; ELSIF HDmd = 2 AND NOT Pump_Ready[1] AND NOT Pump_Ready [0] AND Pump_Ready[2] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := TRUE; ELSIF HDmd = 0 THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := FALSE; END_IF; IF HDmd = 3 AND Pump_Ready[2] THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := TRUE; ELSIF HDmd = 3 AND NOT Pump_Ready[2] AND Pump_Ready [0] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := TRUE; ELSIF HDmd = 3 AND NOT Pump_Ready[2] AND NOT Pump_Ready [0] AND Pump_Ready[1] THEN adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := TRUE; ELSIF HDmd = 0 THEN; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+1]] := FALSE; adPumpOutput[MotorNoSorted[PriorityNoMotorToActivate+2]] := FALSE; END_IF; doMotor1 := adPumpOutput [0]; doMotor2 := adPumpOutput [1]; doMotor3 := adPumpOutput [2]; M200 := doMotor1; M201 := doMotor2; M202 := doMotor3;
------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 03/27/2023 11:52:06New subject after splitting |
|
Follow us on