PLC Programming for Pumping and Draining System

Create PLC programming for pumping and draining for 20 seconds to fill the tank and then drain valve open for 10 seconds.

Note: These PLC programs are designed for students and professionals to learn and practice the ladder logic.

Pumping and Draining System

Problem Statement:

Design a PLC ladder logic for the following application.

We are using two Push Buttons to control the Pump and Drain valve.

When the Start Push Button is pressed and released, the Pump should run for 20 seconds to fill the tank and then the Drain Valve should Open for 10 seconds to drain the tank.

When the Stop Push Button is pressed and released, then the system will stop immediately.

Industrial Automation Solution Videos

Instrumentation Tools prepares the best-in-class industrial automation solution videos for learning purposes for students and professionals.

This video explains the ladder logic programming for pumping and draining.

Inputs/Outputs

Digital Inputs:

Start Push Button: I0.0

Stop Push Button: I0.1

Digital Outputs:

Pump: Q0.0

Drain Valve: Q0.1

PLC Programming

PLC Programming for Pumping and Draining System

Program Description

We have used Normally Open Contacts for Start Push Button(I0.0), Stop Push Button (I0.1), and Memory Bits.

We have used Normally Closed Contacts for Memory Bit 2 (M1).

In Rung 0:

  1. Normally Open Contact is used for the Start Push Button (I0.0) to Turn ON Memory Bit 1 (M0).
  2. Memory Bit 1 (M0) is latched so that when the Start Push Button (I0.0) turns OFF, Memory Bit 1 (M0) still remains ON.

 In Rung 1:

  1. Normally Open Contact is used for the Stop Push Button (I0.1) to Turn ON Memory Bit 2 (M1).
  2. Memory Bit 2 (M1) is latched so that when the Stop Push Button (I0.1) turns OFF, Memory Bit 2 (M1) still remains ON.

In Rung 2:

  1. Normally Open Contact is used for Memory Bit 1 (M0) to Turn ON the outputs Pump (Q0.0) and Drain Valve(Q0.1). 
  2. Timer TP is used to Turn ON the output Pump (Q0.0) for a limited time.
  3. Timer TON is used to delay the turning ON time of the output Drain Valve (Q0.1) for some time.
  4. Timer TP is used to Turn ON the output Drain Valve (Q0.1) for a limited time. 
  5. Normally Closed Contacts are used for Memory Bit 2 (M1) to turn OFF the output Pump (Q0.0) and Drain Valve (Q0.1).

PLC Simulation

Let’s simulate our PLC program and analyze the results. Take note that we may show part of the logic instead of complete code.

When the Start Push Button is pressed and released

When the Start Push Button (I0.0) is pressed and released,  Memory Bit 1 (M0) turns ON. Memory Bit 1 (M0) is latched so that when the Start Button (I0.0) is released, Memory Bit 1 (M0) still remains ON.

fill the tank plc program

When Memory Bit 1 (M0) turns ON in Rung0, Normally Open Contact used for Memory Bit 1 (M0) will be in True state and pass the signal through it and the output Pump (Q0.0) turns ON but for a limited time as Timer Function Block type TP is used to Turn ON the output Pump (Q0.0) for a limited time and the time set to 20 seconds.

PLC system to drain water tank

In a false state, Normally Closed Contact used for Memory Bit 2 (M1) passes the signal to turn ON the output Pump (Q0.0). So after 20 seconds, the output Pump (Q0.0) will turn OFF.

Also, when Memory Bit 1 (M0) turns ON, the output Drain Valve (Q0.1) will turn ON after 20 seconds (i.e immediately when the output Pump (Q0.0) turns OFF) as Timer Function Block TON is used to delay the turning ON time of the output Drain Valve (Q0.1).

Automatic Pumping and Draining

The time is set to 20 seconds.  In a false state, Normally Closed Contact used for Memory Bit 2 (M1) passes the signal to turn ON the output Drain Valve (Q0.1).

So after 20 seconds, the output Drain Valve (Q0.1) will turn ON but for a limited time as Timer Function Block type TP is used to turn ON the output Drain Valve (Q0.1) for a limited time. The time is set to 10 seconds. So after 10 seconds, the output Drain Valve (Q0.1) will turn OFF.

When the Stop Push Button is pressed and released

When the Stop Push Button (I0.1) is pressed and released,  Memory Bit 2 (M1) turns ON. Memory Bit 2 (M1) is latched so that when the Stop Push Button (I0.1) is released, Memory Bit 2 (M1) still remains ON.

Drain valve ladder logic

When Memory Bit 2 (M1) turns ON in Rung1, Normally Closed Contacts used for Memory Bit 2 (M1) in Rung2 will be in a True state and will not allow the signal to pass through it and the outputs Pump (Q0.0), and Drain Valve (Q0.1) will turn OFF immediately.

If you liked this article, please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

1 thought on “PLC Programming for Pumping and Draining System”

  1. I worry sometimes about using latches in control circuitry. Primarily, my instructions
    for programming state. ” What will your Program do, when power goes out ” Do you want a machine to start again as if nothing has happened, or should you use Seal in circuits that necessitate someone re-establishing the machine operation ?

    Reply

Leave a Comment

Share via
Follow us and never miss an update!