Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Example PLC Program to Control a Pump based on Level Sensors
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Example PLC Program to Control a Pump based on Level Sensors

Example PLC Program to Control a Pump based on Level Sensors

Learn an example PLC program to control a pump based on level sensors using ladder diagram logic with a video explanation.

Last updated: April 10, 2024 11:15 am
Editorial Staff
PLC Tutorials
No Comments
Share
4 Min Read
SHARE

Learn an example PLC program to control a pump based on level sensors using ladder diagram logic with a video explanation.

Contents
PLC Program to Control a PumpPLC Learning SeriesInputsOutputsLadder Diagram LogicProgram DescriptionTest Case

Note: The PLC logic example is designed for beginners who are interested to learn the ladder diagrams.

PLC Program to Control a Pump

Problem Statement

Design a PLC ladder logic for the following application.

We are using two level sensors to control the pump. (You can also call them as Level switches in this case).

If the low-level sensor detects the tank is low, then the pump will run for 20 seconds.

If the high-level sensor detects the tank is full, then the pump will stop for 30 seconds.

PLC Learning Series

Our PLC learning series videos are useful for engineers to learn basic PLC programming.

PLC Programming Example for Low and High Level Switches

Inputs

The required inputs are listed below.

Low level sensor: I0.0

High level sensor: I0.1

Outputs

The required outputs are listed below.

Pump: Q0.0

Ladder Diagram Logic

Example PLC Program to Control a Pump based on Level Sensors

Program Description

We have used Normally Open Contacts for low-level sensor as well as high-level sensor.

We have also used the Normally Closed Contact for Memory (M0) bit in Rung0.

For the Pump, Timer Function Block Type TP is used.

To keep the Pump ON for 20 seconds, Timer Function Block type TP (TM0) is used.

Timer Function Block type TP (TM2) is also used for Memory Bit (M0) to keep it ON for 30 seconds.

To keep the Pump OFF for 30 seconds, Memory Bit taken as Normally Closed Contact in Rung0 is used.

Test Case

Now we simulate our PLC program and see the results.

When the Low-level sensor gets activated (detects the tank is low), the Timer functional block type TP (TM0) will allow the signal to flow for a period of 20 seconds only. (as shown in below image)

Controlling Water Level in the PLC Ladder Logic Program

The memory bit (M0) will also allow the signal as it is in a false state. As a result, the Pump will be turned ON. After 20 seconds, the signal will not flow because of the Timer functional block type TP (TM0).

The pump will turn OFF after being ON for 20 seconds.

When a high-level sensor gets activated i.e., when the tank is full, Timer functional block TP (TM1) will allow the signal to flow for an interval of  30 seconds. (as shown in below image)

Ladder Logic PLC Programming of a Water Pumping System

As a result, the Memory bit (M0) will become true only for 30 seconds. Then, in Rung0, the memory bit (M0) used as Normally Closed Contact will not allow a signal for 30 seconds. As a result, the output Pump will turn OFF for a period of 30 seconds.

In a nutshell, when the low-level sensor detects that the level of the tank is low, the pump gets turned ON for 20 seconds and when the high-level sensor detects that the level of the tank is high, the pump gets turned OFF for 30 seconds.

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.

Read Next:

  • Timers in PLC Programming Tutorials
  • Design Ladder Diagram from Boolean Logic
  • Electrical Ladder Diagram Control with Timers
  • Latching and Unlatching in PLC Programming
  • Electrical Cabinet Air Conditioner Maintenance
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
You've successfully subscribed !

Continue Reading

Mis-conceptions of PLC Ladder Logic
PLC Motor Operation based on Time Cycle Sequence – Program
PLC Programming for 3 Motors control in Ladder logic
PLC Programming for Garden Sprinkler System
Pulse Timer Instruction in PLC Programming
PLC Analog I/O Potential Problems – Troubleshooting & Issues
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Ladder Logic Vs. Other Programming Languages – PLC Basics
Top Free PLC Software
How to Use ModScan Software for Testing Modbus Communication?
What is a GSD File and Why it is required?
PLC Basics – Manual Control, Closed Loop, ON-OFF with Hysteresis
How to Delay a Sensor Signal in PLC?
Allen Bradley Math Functions
PLC Valve Control Ladder Logic Programming

Keep Learning

Pumping System in Industrial Automation

Basic Pumping System Application Used in Industrial Automation

Comparison Instructions in PLC Programming

Comparison Instructions in PLC Programming

FIFO and LIFO Sequences in PLC

What are FIFO and LIFO Sequences in PLC?

TP Timer in CodeSys

Timers in Codesys – Timer ON, Timer OFF, Pulse Timer

ControlLogix

Difference Between CompactLogix and ControlLogix

Siemens PLC Course for Beginners

Siemens PLC Course for Beginners: Problems and Solutions

Problem on PLC, HMI, VFD, and Motor Circuit

Problem on PLC, HMI, VFD, and Motor Circuit

Single Push button to ON and OFF a Bulb using Ladder Logic

Single Push button to ON and OFF a Bulb using Ladder Logic

Learn More

Pulverizer Electrical Problem Solved

Pulverizer Electrical Problem Solved

Phase Controlled Half Wave Rectifier RL Load

Power Electronics – Phase Controlled Half Wave Rectifier RL Load

Ziegler-Nichols open-loop Tuning

Ziegler-Nichols Open-Loop Method

DIN Valve Connectors

DIN Valve Connectors – Definition, Types

Most Asked Questions on SCADA

Most Asked Questions on SCADA with Answers

Accelerometer Vibration Probe

Accelerometer Vibration Probe Principle

What is Swing Check Valve ?

Oxygen Measurement using Tunable Diode Laser System

Tunable Diode Laser Analyzer Working Principle

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?