Fareed Mohmed← Project library

Engineering · PLC · Project 5 of 15 · Process and level · Level 2

Automatic pump with float switches

Keep a tank between LOW and HIGH levels. The pump turns on when the tank is low and stops when it is full.

▶ Run it in the simulator

Virtual machine for Automatic pump with float switches: buttons, lamps and the process it controls
Learning model only. This page teaches the program logic. A real machine needs a proper control panel with an isolator, fuses, motor protection and a hard-wired emergency stop. Mains and motor wiring is for qualified electricians. A PLC output never drives a motor directly.

You will learn

Hysteresis: two sensors with a gap between them stop the pump from switching on and off all the time. The pump contact in parallel holds it on between LOW and HIGH, exactly like the motor seal-in.

How it works

  • Flip AUTO on. As the tank drops below LOW the pump starts.
  • The pump keeps filling until the HIGH float is covered, then stops.
  • Raise the water use. The level falls faster and the pump cycles more often.

In real life

Water towers, sump pits, boiler feed tanks and irrigation reservoirs.

Inputs, outputs and addresses

The same signals on seven PLC brands. Inputs and outputs are numbered in order; check your own hardware and software, because addresses depend on the model and module position.

NameWhat it isTypeSiemens
S7-1200
Allen-Bradley
CompactLogix
Mitsubishi
iQ-F FX5U
Delta
DVP / AS
Omron
CP2E
Schneider
M241
Inovance
H5U
AUTOAUTO / OFF selectorInput%I0.0Local:1:I.Data.0X0X00.00%IX0.0X0
LOWLow-level float (ON when water is above it)Input%I0.1Local:1:I.Data.1X1X10.01%IX0.1X1
HIGHHigh-level float (ON when water is above it)Input%I0.2Local:1:I.Data.2X2X20.02%IX0.2X2
PUMPPump contactorOutput%Q0.0Local:2:O.Data.0Y0Y0100.00%QX0.0Y0

Ladder diagram (shown for Siemens, live state)

Green wires carry power in the moment captured below. Switch the brand and the language in the simulator.

Rung 1 Pump on when low, holds until highLOW%I0.1PUMP%Q0.0HIGH%I0.2AUTO%I0.0PUMP%Q0.0

Structured text, Siemens SCL

(* Siemens S7-1200, CPU 1214C DC/DC/DC - TIA Portal - SCL *)
(* Rung 1: Pump on when low, holds until high *)
"PUMP" := (NOT "LOW" OR "PUMP") AND NOT "HIGH" AND "AUTO";

Structured text, Allen-Bradley

(* Allen-Bradley CompactLogix 5069 (L306ER) - Studio 5000 Logix Designer - Structured Text *)
(* Rung 1: Pump on when low, holds until high *)
PUMP := (NOT LOW OR PUMP) AND NOT HIGH AND AUTO;

Try this

Parts to buy

The links open a search on each store, so you see what is in stock today. Check the model, voltage and price before you order.

#ItemBuy / compare
1PLCAmazon.in · IndiaMART · Robu.in
22 float switchesAmazon.in · IndiaMART · Robu.in
3Pump contactorAmazon.in · IndiaMART · Robu.in
4AUTO / OFF selectorAmazon.in · IndiaMART · Robu.in
← 4. Conveyor with warning hornAll projects6. Tank filling and mixing (SFC) →

This is a learning tool. It teaches the logic, not the exact keystrokes of each vendor’s software. Check the manual of your own PLC.