pump sequence selection

irfan22in

Member
Join Date
Aug 2002
Location
FRANCE
Posts
14
hi every body
i am working for a project where i have to control 5 pumps.

control logic is as follows

i have 5 auto selection switches each for one pump.
if i select 3,4,1,2,5 while selecting the pumps thrugh switches (i.e puting pump 3 switch first in auto mode then pump4 in auto mode then pump 1 in auto mode and so on) then pumps should run in that sequence i.e first pump to start is pump 3 .second pump to start is is pump 4 and so on .

if at any time while running if i put any pump switch in maual mode for example say pump 1 i put in manual mode then seq should should adjust to 3,4,2,5.
.

i have done this using add instruction for every selction of pump and subtract instruction while delselction of pump.

i have not able to obtain prfect control for this.
any new ideas of implementation of this logic will be appreciated.
 
Last edited:
How about loading a table with the pump numbers in the sequence that they are switched to auto. Then use that table for the pump start sequence. If a pump is selected to manual then use a find or compare instruction to remove it from the table and shift the remaining numbers up. If the pump is switched to auto again it comes back in at the end of the sequence.
Use an up/down counter as a pointer to determine which pump is started next, as each pump is started then the pointer is incremented and decremented when one stops.
 
Irfan,
What a challenge! I used John W's suggestions and put together a quick-and-dirty method. I am sure it can be refined. A Sequencer instruction could be used, but it appeared to me that the problem is re-ordering the sequence when a pump is removed. I could see no way to do that efficiently, so I used the brute-force manual method. Here is a *.pdf file of my original RSLogix program.
 
i have just made a similar program and i used fifo instructions amd table instructions


i made a table of the available pumps and the on pumps

when a i have a request for pump i make a fifo instruction for the available table and add the result to the on table




for your example that u need to delete a pump if is not in auto
this comes in two steps


first u must find the pump in the list using table find instruction
then use blokmove instruction

(these fucntions are available in ti library in siemens s7-300 and also available with s7-200
)
 
You have the habit always direct for functions. Should evaluate the cost.
Also, in these panels the PLC can be simple, absent of instructions adv.
Challenge do make in ladder.
 
moggie,

I think your program is a good one, but I had trouble figuring out how it works, because we only have memory addresses with no symbols. Would you please go into your Siemens S7 and click "View", then press "Symbolic Addressing". Then upload it again and it would be easier to follow.
 
Here it is again with some comments.
Basically i load a counter with the "position number" of the pump when it is turned to auto.
If a pump is turned off; then any pump with a position number higher than that of the one turned off has its position number "decreased" by one.
 
Lancie1 said:
Irfan,
What a challenge! I used John W's suggestions and put together a quick-and-dirty method. I am sure it can be refined. A Sequencer instruction could be used, but it appeared to me that the problem is re-ordering the sequence when a pump is removed. I could see no way to do that efficiently, so I used the brute-force manual method. Here is a *.pdf file of my original RSLogix program.

MMMM Took a quick look at the program..I thought it was taboo to use the same outpur in more than one rung..Also i knew rslogix 5000 let you do it but i didnt think rs500 did??

D
 
Yes, you can use a coil on a memory location or output more than once. Lancie1's example has a common error when a coil is duplicated. It will always be set/reset according to the last rung its addressed in, rung 6. B3:1/6 thur b3:1/10 will always be false unless C5:1 happens to be equal to 5.
 
Hi every bosy,

thanks to all of you for your replies.
its really great to see diffrent ideas of implementing the logic and i welcome all your ideas.

keep posting the new designs
 
darrenj & jstolaruk,

Yes, you are correct. I spent all my time working on the sequence, and only threw in the START routine the last 5 minutes. I did take out the redundant outputs in the attached version. I think it would work, but there may be other errors. I have not tested this program.

Moggie's design is so much better than mine. I can tell that his is a working version.
 
Last edited:
Just couldn't resist trying to develop a manager for the Queue with as few rungs as possible.
The following is only for managing the queue.
There are other concerns such as...
...how the sequence is actually started,
...how the sequence transitions from one motor to the next,
...what happens if a running motor is dropped out of the queue, etc.

Although a long description... this is only describing 2 Rungs (shown later).

M# = Motor #
Q# = Queue #
Last_Q# = Last Queue # used

Queue_(1 through 5) = 5 words holding Pump #s...
i.e. Queue_(1) = Pump-X, Queue_(2) = Pump-Y, etc.

Motor_(1 through 5) = 5 words holding Sequence #'s...
i.e. Motor_(1) = Queue-A, Motor_(2) = Queue-B, etc.

If "RESET", Zero-All
M# = 0
Q# = 0
Last_Q# = 0
Queue_(1 through 5) = 0
Motor_(1 through 5) = 0

RUNG-1: (Loading the Queue)
If input 1 just on... M# = "1"
If input 2 just on... M# = "2"
If input 3 just on... M# = "3"
If input 4 just on... M# = "4"
If input 5 just on... M# = "5"

INC Q# (Q# = Q# + 1)
INC Last_Q# (Last_Q# = Last_Q# + 1)
Copy M# to Queue_(Q#)
Copy Q# to Motor_(M#)
END OF RUNG-1:

If sequence = 3,1,2,5,4 then...

Sw# M# Q# Queue_(Q#) <= M# Motor_(M#) <= Q#
Initial 0 0 0
Sw-3 ON 3 3 1 Queue_(1) <= "3" Motor_(3) <= "1"
Sw-1 ON 1 1 2 Queue_(2) <= "1" Motor_(1) <= "2"
Sw-2 ON 2 2 3 Queue_(3) <= "2" Motor_(2) <= "3"
Sw-5 ON 5 5 4 Queue_(4) <= "5" Motor_(5) <= "4"
Sw-4 ON 4 4 5 Queue_(5) <= "4" Motor_(4) <= "5"


.
RUNG-2: (Unloading and Adjusting the Queue)
If input 1 just off... M# = "1"
If input 2 just off... M# = "2"
If input 3 just off... M# = "3"
If input 4 just off... M# = "4"
If input 5 just off... M# = "5"

Copy Motor_(M#) to Q#
If Q# < "2"... Copy Queue_(2) to Queue_(1)
If Q# < "3"... Copy Queue_(3) to Queue_(2)
If Q# < "4"... Copy Queue_(4) to Queue_(3)
If Q# < "5"... Copy Queue_(5) to Queue_(4)
Queue_(5) = "0"

DEC Last_Q#
Q# = Last_Q#
Motor_(M#) = 0
M# = 0
END OF RUNG-2:

If last entry was M# = 4 into Q# = 5 ...and then... Switch #2 goes OFF...M# = 2
Copy Motor_(M#) to Q#
Motor_(M#) = Motor_(2) = "3"... "3" is the Queue # for Motor-2
Copy "3" to Q#

Sw# M# Q# LQ# Q# <= Motor_(M#)
Initial 0 4 5 5
Sw-2 OFF 2 2 5 5 Q# <= Mtr_(2) <= "3"
2 2 3 5 If Q# < 2... Copy Queue_(2) to Queue_(1)
Q# is NOT < 2... so, no action here.
3 5 If Q# < 3... Copy Queue_(2) to Queue_(1)
Q# is NOT < 3... so, no action here.
3 5 If Q# < 4... Copy Queue_(3) to Queue_(2)
Q# IS < 4... Queue_(3) => Queue_(2)
3 5 If Q# < 5... Copy Queue_(4) to Queue_(3)
Q# IS < 5... Queue_(4) => Queue_(3)
3 5 ...and then... Queue_(5) = 0
3 5 ...and then... DEC Last_Q#
2 2 3 4 ...and then... Q# = Last_Q#
2 2 4 4 ...and then... Motor_(M#) = 0
2 2 4 4 ...and then... M# = 0
2 0 4 4

The next queue to be loaded is #5 (unless more queues are unloded).

Queue Adjustment...

Initial
Queue_(Q#) = M# Motor_(M#) = Q#
Queue_(1) = "3" Motor_(1) = "1"
Queue_(2) = "1" Motor_(2) = "3"
Queue_(3) = "2" Motor_(3) = "2"
Queue_(4) = "5" Motor_(4) = "5"
Queue_(5) = "4" Motor_(5) = "4"

Final
Queue_(Q#) = M# Motor_(M#) = Q#
Queue_(1) = "3" Motor_(1) = "1"
Queue_(2) = "1" Motor_(2) = "0"
Queue_(3) = "5" Motor_(3) = "2"
Queue_(4) = "4" Motor_(4) = "5"
Queue_(5) = "0" Motor_(5) = "4"


.
At this point, the only motor switch that can go ON is Motor Sw #2. If it goes ON then it will be logged into Queue_(5).

The following shows the two primary rungs which manage the queues...

RUNG-1:

SW-1 +--------+ +-----+ +---------+ +----------+ Dummy
---|/\|---+ M# = 1 +---+---+ INC +---+ INC +---+ COPY +----( )
+--------+ | | Q# | | Last_Q# | | M# to |
| +-----+ +---------+ |Queue_(Q#)|
| +----------+
SW-2 +--------+ |
---|/\|---+ M# = 2 +---+
+--------+ |
|
SW-3 +--------+ |
---|/\|---+ M# = 3 +---+
+--------+ |
|
SW-4 +--------+ |
---|/\|---+ M# = 4 +---+
+--------+ |
|
SW-5 +--------+ |
---|/\|---+ M# = 5 +---+
+--------+


RUNG-2:
ALWAYS
SW-1 +--------+ +----------+ +--------+ +----------+ OFF Dummy
---|\/|---+ M# = 1 +---+---+ COPY +---+--+ Q# < 2 +---+ COPY +---| |---+--( )
+--------+ | |Motor_(M#)| | +--------+ | QUEUE_(2)| |
| | to Q# | | | QUEUE_(1)| |
| +----------+ | +----------+ ALWAYS |
SW-2 +--------+ | | +--------+ +----------+ OFF |
---|\/|---+ M# = 2 +---+ +--+ Q# < 3 +---+ COPY +---| |---+
+--------+ | | +--------+ | QUEUE_(3)| |
| | | QUEUE_(2)| |
| | +----------+ ALWAYS |
SW-3 +--------+ | | +--------+ +----------+ OFF |
---|\/|---+ M# = 3 +---+ +--+ Q# < 4 +---+ COPY +---| |---+
+--------+ | | +--------+ | QUEUE_(4)| |
| | | QUEUE_(3)| |
| | +----------+ ALWAYS |
SW-4 +--------+ | | +--------+ +----------+ OFF |
---|\/|---+ M# = 4 +---+ +--+ Q# < 5 +---+ COPY +---| |---+
+--------+ | | +--------+ | QUEUE_(5)| |
| | | QUEUE_(4)| |
| | +----------+ ALWAYS |
SW-5 +--------+ | | +-----------+ +--------+ OFF |
---|\/|---+ M# = 5 +---+ +--+ Queue_(5) +--+ DEC +---| |---+
+--------+ | | = "0" | |Last_Q# | |
| +-----------+ +--------+ |
| |
| +-------+ +----------+ +------+ |
+--+ Q# = +--+Motor_(M#)+--+ M# = +-+
|Last_Q#| | = "0" | | "0" |
+-------+ +----------+ +------+


.
Rung-1 Loading:
Any switch going ON causes the particular switch# to be assigned to the Motor# (M#).
The Queue# is Incremented.
The Last Queue (Last_Q#) used is Incremented. (this is used for unloading)
The Motor# (M#) is copied to the current Queue# QUEUE_(Q#)

Rung-2 Unloading:
Any switch going OFF causes the particular switch# to be assigned to the Motor# (M#).
The Q# where the particular motor# is stored (in Motor_(M#)) is copied to Q#.
The Queue is adjusted according to Q#.
Whether or not one Queue is copied to another depends on the value of Q#.
In all cases, Queue_(5) will be set to "0".
In all cases, the Last_Q# will be decremented.
In all cases, the current Q# will then be set to equal the Last_Q#.
In all cases, the Queue # in the affected Motor queue will be set to "0"... it is out of the queue.
In all cases, the current M# is set to "0".
For those PLCs that bail-out at the first opportunity...
...the "ALWAYS OFF" bit ensures that all of the branches are executed before the rung is exited.
 
Safe Start-up following Power Loss

Hi All

I'm building a similar system for controlling pumps and monitoring alarm conditions.

I've got a basic system in place that is more or less there and just needs some final tweaks.

One big problem that I have is to do with the loss of power to the Allen Bradley SLC 500.

I have set-up my components, power supplies, etc to operate via a hard-wired master control relay so that in the event of power failure and subsequent re-power, all relays reset and return to the known start-up condition.

Unfortunetely when I power the AB down and switch back on, it continues where it was at power loss.

It would be safer and preferable to reset all conditions and outputs back to the start condition.

I have tried to use the MCR command but I was wondering if there was a better way to carry out this function, I fairly new to PLC controllers and not sure how the 'best practises' for these sort of things.

Does anyone have any ideas?

Simon
 

Similar Topics

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...
Replies
21
Views
2,758
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...
Replies
1
Views
2,067
so I have five running times on five pumps When these are started I want to know the start up sequence from lowest running time to highest Then...
Replies
2
Views
1,577
Hello I need help to program pump sequence using Delta CPU 14ss2 (14SS211R) The program in Auto mode will be Cycle A - Pump 1 and Pump 2 Run.(...
Replies
2
Views
1,864
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,623
Back
Top Bottom