3 pump lead/lag program

GLPLC

Member
Join Date
May 2006
Location
Sydney
Posts
11
Need help writing a program for a 3pump system with 3 level switches. I need to alternate the pump that turns on each time the first level switch comes on. Also need to make sure that two pumps turn on when there are two switches activated and three pumps for three switches.
I am programming on a mitsubishi plc but any general tips would help.

Thanks in advance,
GL
 
Start with a counter set to 3 (4 steps, 0-3). All 3 switches off increments the counter. If counter=3 then reset it.

Write 3 equal subroutines with outputs alternated.
Counter=0:
S1=P1
S1*A2=P2
S1*S2*S3=P3

Counter=1:
S1=P2
S1*A2=P3
S1*S2*S3=P1

Counter=2:
S1=P3
S1*A2=P1
S1*S2*S3=P2

The subroutine idea makes the logic easy to follow, but the program is small enough where you don't need subroutines. You can combine the logic, and test for the counter status on each leg.
 
i can't figure out how to use counters in mitsubishi software.
A previous program with two pumps used alternating contacts.
Any ideas?
 
A shift register or Set/Reset relays with oneshots. Both of those methods may be trickier. Use Set/Rest to create State Logic.
Is Switch1 always the first switch? If so, then:
S1 AND Not State2 AND Not State3 AND OneShot = State 1
etc.

What type of software are you using? MEDOC? Are you having trouble setting up the counter, or testing it's current count?

Put 3 normally closed contacts in series to incriment the counter. You'll need to check to see if counters incriment on the opening or closing of the contact.
Not S1 AND Not S2 AND Not S3 = Increment Counter 1

To reset it, add the counter coil to the string:
Not S1 AND Not S2 AND Not S3 AND Counter1 = Reset Counter 1
 
i'm using GX developer.
How do i ensure that the three pumps turn on when all three switches are activated?
at the moment, i'm having trouble testing the value of the counter.
 
Last edited:
I see a typo in the original. Sorry. A2 should be S2. Corrected logic:

Counter=0:
S1=P1
S1*S2=P2
S1*S2*S3=P3

Counter=1:
S1=P2
S1*S2=P3
S1*S2*S3=P1

Counter=2:
S1=P3
S1*S2=P1
S1*S2*S3=P2

If you follow the logic, you will see that all three pumps will be on with three switches. S1 turns on Pump1. S1 AND S2 turn on Pump 2. S1 AND S2 AND S3 turn on pump 3.
This works, now switch the outputs (Pumps) around to alternate usage.

I don't know GX Developer. Read the details about Counters. There should be a register that holds the current count. Compare that register to a constant. Use 3 internal coils to set your 'States':

If Counter1Register = K1 then reset State 3, set State 1.
If Counter1Register = K2 then reset State 1, set State 2.
If Counter1Register = K3 then reset State 2, set State 3.
 
thanks keithkyll,

i like your idea but am clueless about getting counter registers in mitsubishi software(newbie)
 
To check the value of the counter, use a Compare instruction. Compare sets 3 bits, <, =, and >.
1) Set up Counter 0 to Constant 3. C0, K3.
Increment it when any of the 3 switches are on (OR'ed), unless S1 is always the first float switch. Then you could just use S1.
2) Reset C0 when it goes true and all switches are off.
C0*Not S1*Not S2*Not S3 = RST C0.
3) Use a Compare (Function 10) instruction. The beauty is you only need 1 compare.
CMP, K2, C0, M0. This compares Constant 2 to the counter.
M0 will be on if it's less than 2 (equal to 1).
M1 will be on if it's equal to 2.
M2 will be on if it's greater than 2 (equal to 3).

There's your 3 States.
 
GLPLC,

I decided to post this to the site rather than private email.

The logic is basic, but it should be a good starting point.
It does not contain any manual starting/stopping or any operator interface.
It does contain one method for sequencing and a possible way of starting and stopping your pumps.
You will need to translate over the bits to Mitsubishi format.
I would suggest try this on a test bench, not on your live application. You will also need to add any manual interfacing you may need.

Good Luck,

Doug
 
Thanks for your help guys,

In the end, I incremented a data register each time the pumps came on and that way the pumps were turned on at a different value of the data register (0,1,2).
 
Fip flops are so easy for this type of application. Use them all the time for fuel pumps. Really simple logic.
 

Similar Topics

To begin, before the Trolls pop out, I know you get your tools/test your tools/find the right tools. Thats great, but at this point Im on a...
Replies
15
Views
5,212
Two identical sized vertical turbine pumps in a water pit. Both on VFDs. My plan is to use 1 control loop targeting water pressure. The...
Replies
15
Views
8,096
Hi All Can anyway shed some light on Lead/Lag/lag1 for Pump operation based on level setpoint? Where can i find a simple project about this? Any...
Replies
4
Views
6,816
Does any-one know of a quick/easy way to collate 4 registers into order of highest number to lowest number. I have 4 pumps each with their own hrs...
Replies
3
Views
1,776
Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
89
Back
Top Bottom