Unity Pro XL 7 Pump Sequence

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 would never code something like this in ST. Especially not using repeat loops.

I would start again, using FBD or LAD. I prefer FBD myself.

Those repeat loops for the drive control are going to be executed in a matter of milliseconds. I doubt thats what you want. You should take a look at the RAMP function.

Remember, the PLC executes this logic in a never ending loop. So setting your outputs to zero at the start will make your output contactors chatter on and off several times a second and your motors will trip or burn out.

What you want for that is an initial condition. I would look at mains power restored, or the first scan bit (look in the help file under system bits)
 

Similar Topics

Hi all. Recently i convert a program from unity pro XL v2.3 to Unity Pro v13.0, by changing the extension from .STU to .STA. The program was...
4
Replies
564
Views
Hello everyone, I'm a Master's student in industrial electrical engineering, and I'm currently working on a PLC project as part of an academic...
5
Replies
811
Views
Hello everyone, I'm using Unity Pro XL v13.1 and working with Program Units to organize my project. I need to use some of the variables inside...
3
Replies
1,166
Views
I am working with some old Modicon Premium PLCs in Unity Pro and I am trying to do the same as the COP instruction in AB or the MOV_BLK in...
4
Replies
2,199
Views
Hello, I am experimenting with using specific time and dates to control various actions and I have created a variable with data type DATE in a...
6
Replies
2,476
Views
Top