How can I alternate two pumps using a Logo! PLC and a 4 to 20 mA pressure transducer?

LuisOr92

Member
Join Date
Nov 2022
Location
Bogotá
Posts
1
Good morning everybody, I hope you are very well.

I share with you the information of the PLC LOGO! Siemens and expansions that we have installed.

It is a Logo! PLC model 230 RCE 6ED1052-1FB08-0BA1, to which we have installed two expansions (from left to right):

1) The first expansion: DM16 230 R
6ED1055-1FB10-0BA2 (Siemens)


2) The second and last expansion: AM2
6ED1055-1MA00-0BA2 (this expansion we have it with its independent source at 24 Volts) (Siemens).

Then:

We have a pressure transducer of the brand Pnomek, which sends an analog signal from 4 to 20 mA, we have it correctly connected to the expansion AM2 because in the display (the little screen of PLC Logo!) we can appreciate the pressure values when changes occur in the discharge line of the pipes; that is, the pressure transducer is installed is at the outlet of the pumps.

What happens, is that we want to configure/program the PLC, yes it is already a programming issue, to perform the following.

Normal operation:

We call normal operation that which will happen at least 90% of the time, I explain it below:

1. The range of the transducer is from 0 to 101 PSI, having this in mind in the building must be maintained a minimum pressure of 50 PSI and a maximum of 100 PSI, then

2. When water consumptions occur in the piping system, the pressure should decrease, let's assume the pressure is at 60 PSI (as an example), then they start washing, cooking, etc., and the pressure then drops to 50 PSI, the transducer sends that signal to the PLC and starts the pump.

2.1. At this point I comment again that there are two pumps, both are identical, 10 HP.

3. Then when the pressure drops to 50 PSI, pump #1 should be started, when it turns on and after some time (it varies and is not constant) it reaches 100 psi, at that moment the PLC should order pump #1 to turn off.

4. Then the pressure will decrease from 100 PSI to 50 PSI, again product of the consumptions (understand that we do not want to keep the pressure constant).

5. When the pressure drops again from 50 PSI, then the transducer sends again the signal for the PLC to activate pump #2, not pump #1.

5.1. It is at this point that we have not been able to program the PLC, so that from the same input (in this case the pressure transducer) it alternates the pumps each time the cycle of start (at 50 PSI) off (at 100 PSI) is fulfilled.

6. Because the objective is that, always alternate the pumps, between pump #1 and pump #2.

Thanks in advance. :geek:🤞🏻
 
Welcome to the forum!

The way to do this is to separate the goals in the program:

  • one goal is when to turn a (i.e. any) pump on
    • On when pressure is at or below 50PSI
    • Off when pressure is at or above 100PSI
    • I assume you have discovered the Start/Stop Circuit pattern to do this; usually this is done in ladder logic, but I am sure there is an equivalent in the LOGO! language.
    • So there is a bit, call it Run_A_Pump, that
      • has a value of 1 when a pump should run, and
      • has a value of 0 when no pump should run.
  • a second goal is which pump to turn on.
    • For this you need to designate each pump as either a primary pump or a backup pump,
      • and that designation needs to be able to change
    • In this case, you only have two pumps, so this primary/backup designation needs only one bit, call it Two_Is_Primary
      • The Two_Is_Primary bit
        • will have a value of 0 when Pump 1 is primary, and
        • will have a value of 1 when Pump 1 is backup.
      • The designation of Pump 2 is then implicit in the designation of Pump 1:
        • Pump 2 is backup when the Two_Is_Primary bit value is 0, and
        • Pump 2 is primary when the Two_Is_Primary bit value is 1.
So with that, the data model is in place (all programs are models of some real-world process). All that remains is to write the code. The key thing to understand here is that the logic to assign values to the Run_A_Pump bit and to the Two_Is_Primary bits are separate, and should be coded as such.

The Run_A_Pump bit, as you already know, is coded with the Start/Stop Circuit pattern based on pressure. The result of a logical AND of [Run_A_Pump] with [Two_Is_Primary] will be 1 when Pump 2 should run; the result of a logical AND of [Run_A_Pump] with [NOT Two_Is_Primary] will be 1 when Pump 1 should run. When the value of Run_A_Pump is 0, we don't care what the value of Two_Is_Primary is, because both of those ANDs will evaluate to 0 and neither pump will run.

The Two_Is_Primary bit needs to have a different value each time the pump starts. For simplicity let's say we want to toggle (change either from 0 to 1 or from 1 to 0) the value of Two_Is_Primary each time a pump turns off, but only at that single event i.e. at the falling edge (0-to-1 transition) of Run_A_Pump. I am pretty sure that LOGO! has a pulse detector (it may be called a one-shot or a rising edge detector) block (instruction). If you feed an inverted Run_A_Pump signal into that pulse detector block, the result will normally be 0 but have pulse of 1 on any single scan the Run_A_Pump value transitions from 1 to 0 i.e. when the pressure reaches 100PSI and the pump turns off.

An exclusive OR (XOR) of that pulse value (normally 0 but 1 for single scan) with the current value of Two_Is_Primary will generate the desired value of Two_Is_Primary. If I remember correctly, LOGO! is finicky about looping a bit back to blocks that set the value of the that same bit, but it can be done.
 
I assume this is not a homework assignment:

  • The two blocks at upper left implement the Start/Stop Circuit; the output of the [Analog differential trigger] with a negative [Delta] is the Run_A_Pump bitbox.
    • The output value will become 1 when the input pressure [AI1] is at or below 50PSI
    • The output value will become 0 when the input pressure is at or above 100PSI
    • The output value will not change when the input pressure is between 50PSI and 100PSI.
  • The bottom four blocks implement the pump selection, triggered by the transition, from 0 to 1, of the Run_A_Pump bitbox value.
    • The two blocks on the left implement a falling edge detector; a Flag block is essentially a one-scan delay, so the output of the [&] block is
      • a one-shot (one-scan pulse) of a value of 1 on the scan when the pump stops, and
      • a value of 0 otherwise.
    • The two blocks on the left implement pump selection, with the output of the [=1] (XOR) block being One_Is_Primary bitbox, which value
      • is 1 when Pump 1 should run,
      • is 0 when Pump 2 should run, and
      • is toggled by the one-shot of the falling edge detector.
  • The remaining blocks at the upper right combine the Run_A_Pump bitbox value with the One_Is_Primary bitbox value to turn on the selected pump as commanded.
As noted earlier, the key to making this simple is to separate the [Run Any Pump] logic from the [Select Pump] logic, and then combining those results in the [Run Selected Pump] logic. Note that adding some more complexity would follow the same approach e.g. if there were inputs to indicate when either pump was out of service for maintenance, to run only the remaining in-service pump regardless of the [Select Pump] logic state.

This will work but it may be more complicated than necessary; I was hoping there would be be LOGO! built-ins that would combine two or more of these atomic blocks into single blocks, but the help is rather opaque so I chose not to waste the time.
Untitled.png
 

Similar Topics

i am struggling to alternate between two pumps in my lift station project. ( this is my first project so far ) whenever i test the whole...
Replies
22
Views
7,000
Hello all, I'm looking for a push in the right direction with this one. I'm in need to alternate two pumps using an Omron 10C3AR-A-V2 Zen...
Replies
9
Views
5,544
I need to be able to alternate between 2 pumps, wondering what is the best way to do this, using controllogix. If in auto and a start signal is...
Replies
1
Views
3,210
Hello All, I want to publish my data in sql server in Excel format as daily report. And xl reported pro version seem to be much expensive which...
Replies
1
Views
483
I'm looking for alternate module that I can use in place of Rockwell 5069-IO mainly for safety output card (OBV8S). Looking at the lead time, I...
Replies
2
Views
1,172
Back
Top Bottom