find minimum working time between 4 pump

unclehamid

Member
Join Date
Feb 2007
Location
shiraz
Posts
79
we have 4 pump and we should know working time of them
each time we start the system , a pump with minimum1 time should start if we need much perssure min2 and...
I use timer and counter and convert time to a INT value
I write a complecated program to find minimum 1 to 4
(just by comperator )
but I don't like it .If there is SFC or SFB that help us to save time of each pump and find out minimum and max between several time suggest me please
If you have same project plase help
 
let's see:

32-bit integer can represent 2^32=4294967296.
if you want one second resolution this would be good for some 136 years.
i suppose your pumps don't need to run that long...

to find minimum of four values, one needs only three comparisons.
 
the problem is we should sort all 4 pumps , each time we should find and start least duration time pump
(example pump3<pump1<pump4<pump2)another problem is counting
imagin count 2^32 with redicuolus siemens S_CU!!!!
I found FC27 min IEC but it can find min between 3 input
and you know for minimum of 4 items you can't use it twice!!!
 
let's see:

32-bit integer can represent 2^32=4294967296.
if you want one second resolution this would be good for some 136 years.
i suppose your pumps don't need to run that long...

to find minimum of four values, one needs only three comparisons.


Hmmmm... I see a chance to learn something here. I can only get the number of comparison instructions down to 6.

1 to 2
1 to 3
1 to 4
2 to 3
2 to 4
3 to 4

After that one needs only logic to "select" the lowest number and take action.... such as starting a pump.

I'm interested to see how you do it with three comparison instructions.

Stationmaster
 
Initialization: 'Lowest' = 1

1. If 2 < 'Lowest' then 'Lowest' = 2
2. If 3 < 'Lowest' then 'Lowest' = 3
3. If 4 < 'Lowest' then 'Lowest' = 4

Thanks Bernie. But with the OP's description and my (occasional) application, you also have to know which pump is 'second lowest' and 'third lowest' so you can start the lag pumps in the proper sequence. Again I'm back to 6.

Once again the issue of WHETHER to start your pumps this way arises, but that's what he wants.
 
Initialization: 'Lowest' = 1

1. If 2 < 'Lowest' then 'Lowest' = 2
2. If 3 < 'Lowest' then 'Lowest' = 3
3. If 4 < 'Lowest' then 'Lowest' = 4

OK - for a routine you can call each time a pump needs to start:

Lowest = 5
If 1 is not running then if 1 < lowest then lowest = 1
If 2 is not running then if 2 < lowest then lowest = 2
If 3 is not running then if 3 < lowest then lowest = 3
If 4 is not running then if 4 < lowest then lowest = 4

On exit, if lowest = 5 then all pumps are running else lowest = lowest time of non running pumps. Just call this each time you need an additional pump. It's a quick routine. It really doesn't matter which one is 2nd, 3rd etc.
 
OK - for a routine you can call each time a pump needs to start:

Lowest = 5
If 1 is not running then if 1 < lowest then lowest = 1
If 2 is not running then if 2 < lowest then lowest = 2
If 3 is not running then if 3 < lowest then lowest = 3
If 4 is not running then if 4 < lowest then lowest = 4

On exit, if lowest = 5 then all pumps are running else lowest = lowest time of non running pumps. Just call this each time you need an additional pump. It's a quick routine. It really doesn't matter which one is 2nd, 3rd etc.

Very helpful Bernie. I know I'll use it, hopefully the OP will find it useful too. (y)

Stationmaster
 
Bernie

If I understand correctly
As the OP stated the problem the question is to start the lowest of four pumps with no pumps running.

Simulated in Excel and can be done with only 3 comparisons. If PLC can do a minimum of the four values (as can Excel) and then do a comparison between the minimum value and each to select or "deselect" it start then you would be there
BUT
PLCs are not excel and do they have the capability to calculate the minimum of 3 or more values?

To further complicate what if the low value pump is running and I want the next lowest to start? ie
PUMP HOURS RUNNING
A 1000 YES
B 2000
C 3000
D 4000
In real world the hour values would be closer.

Is selecting second pump to start based on next lowest value ie B with 2000 hours worth the programming? If you always start the lowest pump first will they average out in long run? I think so,,, but want to ask anyway.

Dan Bentler
 
Last edited:
At the end of the routine it's not important to know what the minimum number of hours is, just which pump has it. The second example only selects form non-running pumps in case this is a lead-lag type situation. As long as at some point all the pumps stop then the hours will become roughly even. If two are the same it really doesn't matter which is chosen.

The problem is, if the first pump chosen continues to run for a considerable amount of time it may be necessary to do periodic checks and turn on another instead if the currently running pump's hours becomes significantly more than any of the others. But that's another problem.

Warning: my musings are just thought about the process. I haven't actually done this in a real world situation (though I have done selection by value implementations). There may be many more considerations to this problem I'm not aware of.
 
Bernie

I am only pipe dreaming also.
I suppose I changed criteria to a lead lag situation. In real world you are supposed to read hour meter and start unit with lowest hours. Some people do not know how to read run hour meters I guess so let the PLC do your math for you ??
Then just to confound the PLC sometimes you run equipment to overcome environmental problems ie
port 400Hz MG set under the lithium bromide plant - lots of steam and condensation - so we ran it almost year round - that way it did not ground out.

Dan Bentler
 
Bernie

If I understand correctly
As the OP stated the problem the question is to start the lowest of four pumps with no pumps running.

Simulated in Excel and can be done with only 3 comparisons. If PLC can do a minimum of the four values (as can Excel) and then do a comparison between the minimum value and each to select or "deselect" it start then you would be there
BUT
PLCs are not excel and do they have the capability to calculate the minimum of 3 or more values?

To further complicate what if the low value pump is running and I want the next lowest to start? ie
PUMP HOURS RUNNING
A 1000 YES
B 2000
C 3000
D 4000
In real world the hour values would be closer.

Is selecting second pump to start based on next lowest value ie B with 2000 hours worth the programming? If you always start the lowest pump first will they average out in long run? I think so,,, but want to ask anyway.

Dan Bentler

Dan, In post #4 the OP expanded his criteria to include starting the LAG pump with the least time also.

To answer your question, I suppose it would depend on the system. I've seen municipal water systems where the first pump NEVER goes off. If they want to equalize (or alternate) they have to do it by picking a time of day to switch leads.

With Bernie's latest proposed solution, the "extra programming" seems pretty minimal to me.

Stationmaster
 
I give up

port 400Hz MG set under the lithium bromide plant - lots of steam and condensation - so we ran it almost year round - that way it did not ground out.

OK Dan, which class boat.
 
port 400Hz MG set under the lithium bromide plant - lots of steam and condensation - so we ran it almost year round - that way it did not ground out.
OK Dan, which class boat.

USS Barb SSN 596

Back when boats were made of wood and manned by men of iron.
Kinda conflicts with fact I was a nuc I guess but still sounds good.

Dan Bentler
 

Similar Topics

I assigned different values to pump(1,2,3) and these numbers I assigned to pump is status of pumps.Now i want to do which comes in first will...
Replies
3
Views
1,605
Hi , Where i can find Mitsubishi PLC Card end of line & replacement model details. i am looking for Q02CPU replacement model. Please advice. thanks
Replies
2
Views
126
I have tested every screen and no single screen individually has this fault pop up, but when I compile and send to the PanelView it comes up. If I...
Replies
4
Views
172
Hi, One of my customers has an old fabric tensile testing machine. The IC # AD7501KN of its controller has malfunctioned. This IC is related to...
Replies
1
Views
77
Hello everyone, I am a student and would like to take the next step and learn FactoryTalk (Batch preferably) and how to create HMIs etc. Would...
Replies
4
Views
490
Back
Top Bottom