Control Sequence Pump

ConNhaNong

Member
Join Date
Jun 2023
Location
Ho CHi Minh city
Posts
8
Hi everyone, I am a newbie and I have trouble in the control sequence. I have a system with 4 pumps. The required:

Ex: Push a button to start in order 1,3,4,2 -> pump 1, 3, 4 and 2 will work in order. When push the stop button: Pump 2,4,3,1 will stop in order.

Please help me. TIA
 
What PLC are you using ? (this helps us as we can tailor ways to do it easier)
How long between each pump starting & stopping i.e. is it secons or minutes.
Do you need to change the order at anytime.
perhaps the best way is use an up/down counter driven off a timer i.e.
When button is pressed to start (suggest a toggle i.e. push to latch push again to unlatch).
There are probably many ways but this works if you need a different time delay then replace the clock with a timer that just resets itself
 
As I said, we need more information.

But it is sometimes possible to create timed logic using atomic instructions. Here is @parky's logic in a slightly different form, starting or stopping one more pump every 2s. The SCAN_TIME_10KHZ_TIKS is specific to some of the Allen-Bradley PLCs (i.e. S:35 on MicroLogix), but it could as easily be a constant of 1 that essentiall uses average scan duration (~1ms i.e. ~1kHz) as a poor-man's timer tick.
Untitled.png
 
A few important questions that will have an impact on the design of your logic: Is the sequence of starting and stopping always the same or will you need to change it from time to time? Do you need to remove any pump from service for maintenance? Do you always need four pumps, or are there times when three or fewer will be sufficient? What happens if any of the pumps fail to start?
 
@Steve: Yes I was going to add fields to allow changes to the order with checks so only one pump number per field, Also rather than use the built in time pulses just use a reciprocating timer so the delay between starts/stops could be changed byut one of those days, managed to tip a whole mug of coffee in my laptop, it died instantly so had to go & buy another only did an image of it yesterday but cannot use it so lost a bit of data, these were not backed up on onedrive what a disaster 🔨
 
As Cardosocea said use an array, for example and array of 4
then you can have values 0-4
0 = not enabled (will not run)
then 1-4 for the order of the pumps
use the timer to loop through the array (if array[x] = 0 then skip)
perhaps use some logic so you can only enter a pump number in one of the arrays.
examples:
Run all pumps in this order
array[0] 3
array[1] 4
array[2] 2
array[3] 1

Run all pumps in this order
array[0] 1
array[1] 4
array[2] 2
array[3] 3

Run all pumps in this order except for pump 4
array[0] 3
array[1] 0
array[2] 2
array[3] 1
 
@parky
- I use PLC s7-1200,
- The second pump will work after 30s the first pump worked
- Yes, If I choose the different in order button, the order will change

@Steve Bailey
- It will change as I want
- If I just push 3 buttons, 3 pumps works
- I didn't think about that case


From the original post, I thought there were only two buttons: start button; stop button. The start button would start the motors according to some sequence.

But from the responses quoted above, it appears there may be more buttons, perhaps one per pump. Are these other buttons used to start or stop the pumps, or are they used to define the sequence, or are they used for something else?
 
From the original post, I thought there were only two buttons: start button; stop button. The start button would start the motors according to some sequence.

But from the responses quoted above, it appears there may be more buttons, perhaps one per pump. Are these other buttons used to start or stop the pumps, or are they used to define the sequence, or are they used for something else?

- The buttons are used to start and stop, they also are used to define the sequence
 
Normally, you would have enable selectors i.e. HAND/OFF/AUTO
So in hand it will run when switched to that position OFF is disabled & AUTO is controlled by the program i.e. in your case cascaded start/stop.
 
Here is one approach. It separates the pump sequencing logic from the physical pump logic.

The FC Run_Sequence block determines which of the four internal bits gbl.runseq1 through gbl.runseq4 are "on,", which bits represent the running state of the "First logical pump to start," through the "Fourth logical pump to start" where "First logical pump to start" may, or may not, be the physical "Pump 1." FC Run_Sequence implements inter-pump delays both when starting and when stopping the system. If the delays when stopping the system are not desired then eliminate the TOF instructions.

The FC Run_Pumps block maps gbl.runseq1 through gbl.runseq4 maps the logical pump states to the physical pump states, via the mapping array gbl.sequence_array.

The values of elements gbl.sequence_array[1] through gbl.sequence_array[4] are the physical pump number of the first pump to start through the last pump to start. So to start Pump 1, then Pump 3, then Pump 4, then Pump 2:

  • gbl.sequence_array[1] = 1
  • gbl.sequence_array[2] = 3
  • gbl.sequence_array[3] = 4
  • gbl.sequence_array[4] = 2
I realized too late that the FCs should be FBs with Start and Stop push buttons as Inputs, and the Run bit as an InOut, to the Run_Sequence*; I need to read that best-practices-programming-with-TIA document. But it works.

* or extract the Start/Stop Circuit pattern entirely and only input the Run bit
 

Similar Topics

i need to control six pump sets. initially 2 pump sets will run after two hours another two will run and later the third pair. 5 bar pressure...
Replies
26
Views
13,631
Hi, I am new on RSLogix 5000 programming. Now I am starting a auto machine project and want to control machine process sequentially. I prefer to...
Replies
6
Views
1,609
I have been learning to program an Allen Bradley PLC by having it control a model railroad layout. Right now I am using a Micrologix 1000 but will...
Replies
34
Views
11,918
We have a ref. rack that has 6 compressors. Each compressor is 3cyl with 2 unloaders. We therefore have 18 discrete "power" stages. Currently...
Replies
7
Views
3,309
hello every one, i need a control circuit which can make a changeable sequence with 3 motors by any device for example i need to start pumps with...
Replies
33
Views
9,809
Back
Top Bottom