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.

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.
| Name | What it is | Type | Siemens S7-1200 | Allen-Bradley CompactLogix | Mitsubishi iQ-F FX5U | Delta DVP / AS | Omron CP2E | Schneider M241 | Inovance H5U |
|---|---|---|---|---|---|---|---|---|---|
| AUTO | AUTO / OFF selector | Input | %I0.0 | Local:1:I.Data.0 | X0 | X0 | 0.00 | %IX0.0 | X0 |
| LOW | Low-level float (ON when water is above it) | Input | %I0.1 | Local:1:I.Data.1 | X1 | X1 | 0.01 | %IX0.1 | X1 |
| HIGH | High-level float (ON when water is above it) | Input | %I0.2 | Local:1:I.Data.2 | X2 | X2 | 0.02 | %IX0.2 | X2 |
| PUMP | Pump contactor | Output | %Q0.0 | Local:2:O.Data.0 | Y0 | Y0 | 100.00 | %QX0.0 | Y0 |
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.
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
- Set demand to 0 and watch the pump stay off in the middle region.
- Turn AUTO off and see the pump stop at once.
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.
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.