mmm_ramadan1994
Member
Hello there,
I'm new to the PLC world, which I found pretty interesting but I'm having some difficulties getting things done for a project of sequencing a multi-pump systems
The system is consisting of three pumps with one connected to a drive, and I'm Using a Schneider Modicon Quantum PLC to control the driver and pumps on-off operation according to a predetermined strategy, I've written the code in ST Language and what it is supposed to do is first to make sure all devices are off ( Pump 2 contactor(Digital Signal), pump 3 contactor (Digital Signal), pump 1 driver (0-5V) Analog ) then make pump 1 run on drive with 1 V signal then measure flow if its equal to the set point, a delay of 3 minutes will kick in untill the next set point check step comes, else , it will add one volt to the driver to increase the speed of pump 1 then if the flow is still below the set point the contactor of the pump 2 will be set , and if the flow is greater than the set point the drive will be reduced untill the flow set point is obtained, same thing goes with the second flow rate set point , if pump 3 is needed contactor of pump 3 is opened, then the system runs for another 3 mins at the second set point , then I close all the contactors and the drive
The code :
Output_Contactor:=FALSE ;
Output_Contactor2:=FALSE ;
Output_Drive_Control:=0;
Output_Drive_Control:=Output_Drive_Control+5530;
IF Input_Flow<500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control+5530;
UNTIL Output_Drive_Control=27650
END_REPEAT ;
END_IF;
IF Input_Flow<500 Then
Output_Contactor:=1 ;
END_IF;
IF Input_Flow>500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control-5530;
UNTIL Input_Flow=500
END_REPEAT ;
END_IF ;
TON (IN := TRUE,PT := T#3m,Q => Output_Contactor2);
IF Input_Flow<1500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control+5530;
UNTIL Output_Drive_Control=27650
END_REPEAT ;
END_IF;
IF Input_Flow>1500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control-5530;
UNTIL Input_Flow=1500
END_REPEAT ;
END_IF ;
TON (IN := TRUE,PT := T#3m,Q => Set_value);
Output_Contactor:=FALSE ;
Output_Contactor2:=FALSE ;
Output_Drive_Control:=0;
The code gives ( Halt ) when running on simulation mode and I'm afraid that it doesn't do what it supposed to do, so could it be a code error and does the code do the described operation ? or its the error of Unity PRO XL I'm Using Windows Vista Ultimate
Inputs are Water Flow Rate ( analog) Outputs are Driver , Contactor of pump 2 , Contactor of pump 3 , A value called (Set_value) just to help in the second delay
AVI 030 00 Analog Input -AVO 020 00 Analog Output - DDR 840 - DDI 353 - CPU 671 60 are used
Thanks in Advance
I'm new to the PLC world, which I found pretty interesting but I'm having some difficulties getting things done for a project of sequencing a multi-pump systems
The system is consisting of three pumps with one connected to a drive, and I'm Using a Schneider Modicon Quantum PLC to control the driver and pumps on-off operation according to a predetermined strategy, I've written the code in ST Language and what it is supposed to do is first to make sure all devices are off ( Pump 2 contactor(Digital Signal), pump 3 contactor (Digital Signal), pump 1 driver (0-5V) Analog ) then make pump 1 run on drive with 1 V signal then measure flow if its equal to the set point, a delay of 3 minutes will kick in untill the next set point check step comes, else , it will add one volt to the driver to increase the speed of pump 1 then if the flow is still below the set point the contactor of the pump 2 will be set , and if the flow is greater than the set point the drive will be reduced untill the flow set point is obtained, same thing goes with the second flow rate set point , if pump 3 is needed contactor of pump 3 is opened, then the system runs for another 3 mins at the second set point , then I close all the contactors and the drive
The code :
Output_Contactor:=FALSE ;
Output_Contactor2:=FALSE ;
Output_Drive_Control:=0;
Output_Drive_Control:=Output_Drive_Control+5530;
IF Input_Flow<500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control+5530;
UNTIL Output_Drive_Control=27650
END_REPEAT ;
END_IF;
IF Input_Flow<500 Then
Output_Contactor:=1 ;
END_IF;
IF Input_Flow>500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control-5530;
UNTIL Input_Flow=500
END_REPEAT ;
END_IF ;
TON (IN := TRUE,PT := T#3m,Q => Output_Contactor2);
IF Input_Flow<1500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control+5530;
UNTIL Output_Drive_Control=27650
END_REPEAT ;
END_IF;
IF Input_Flow>1500 Then
REPEAT
Output_Drive_Control:=Output_Drive_Control-5530;
UNTIL Input_Flow=1500
END_REPEAT ;
END_IF ;
TON (IN := TRUE,PT := T#3m,Q => Set_value);
Output_Contactor:=FALSE ;
Output_Contactor2:=FALSE ;
Output_Drive_Control:=0;
The code gives ( Halt ) when running on simulation mode and I'm afraid that it doesn't do what it supposed to do, so could it be a code error and does the code do the described operation ? or its the error of Unity PRO XL I'm Using Windows Vista Ultimate
Inputs are Water Flow Rate ( analog) Outputs are Driver , Contactor of pump 2 , Contactor of pump 3 , A value called (Set_value) just to help in the second delay
AVI 030 00 Analog Input -AVO 020 00 Analog Output - DDR 840 - DDI 353 - CPU 671 60 are used
Thanks in Advance
Last edited: