PLC · Tank level All PLC coursesPLC module ↗ 100%
PLC project · Intermediate · 3 chapters

Process control: a tank, its level and its alarms

Read an analogue level sensor and turn its voltage into a percentage, keep the level between two thresholds with a pump (hysteresis), and raise a high-level alarm that flashes, sounds and waits to be acknowledged.

You need IF, the latch and timers: chapters 1–8 of PLC from zero teach them.

The goal: the tank, kept between 20 % and 80 %, with its alarm.

Chapters

How the course works

1 · The real machine firstHow it works in the real world, and the whole of it running, before you write a line.
2 · One piece per chapterA lesson with a live simulation, a prediction and a worked example, then the lab that builds it.
3 · Checked on the trainerAutomatic tests drive the inputs and check the outputs: any correct program passes.
4 · Then on your ownSwitch the guide off and rebuild it from memory: that is when it sticks.

Structured Text (IEC 61131-3), the language used by industrial engineering environments such as TwinCAT 3 and CODESYS. PLC Studio and the Trainer T8 are VisoTrain’s own training tools. TwinCAT is a registered trademark of Beckhoff Automation GmbH. CODESYS is a registered trademark of CODESYS GmbH. VisoTrain is not affiliated with or endorsed by them.

Syllabus

Level: Intermediate · Time: about 2 hours · You need: IF, latch and timers (chapters 1–8 of PLC from zero).

You learn: analogue input scaling with REAL, hysteresis control, filtering with a timer, the alarm sequence with acknowledge.

  1. Chapter 1: Read the level: an analogue input

    • A tank in a real plant: Say what level control and a process alarm are for.
    • Analogue signals: from volts to per cent: Turn the number of an analogue input into a level in %, with REAL.
    • Lab in PLC Studio: program this part and pass the automatic tests.
  2. Chapter 2: The pump: control with hysteresis

    • The pump: hysteresis: Control the pump with two thresholds and no ELSE.
    • Lab in PLC Studio: program this part and pass the automatic tests.
  3. Chapter 3: High-level alarm with acknowledge

    • The alarm sequence: Raise, acknowledge and clear an alarm the way process plants do.
    • Lab in PLC Studio: program this part and pass the automatic tests.

Frequently asked questions

How do you scale an analogue input in a PLC?

Convert the raw value (0–32767 on a 16-bit card) to REAL and apply the rule of three: % = raw × 100 / 32767.

What is hysteresis in level control?

Two thresholds instead of one: the pump starts below the low one and stops above the high one, so it does not switch on and off all the time.

Tank level and alarms

4 short lessons: the tank in a real plant, then one lesson for each piece of the program. Each one ends with its lab in PLC Studio.

How this module helps you learn
  • Small steps: one new idea at a time, from everyday examples to code.
  • Pictures and words together: every idea has a diagram or a timing chart.
  • Worked examples: code explained one step at a time. Explain each line to yourself before you reveal it.
  • Try it: simulators where you press the buttons and watch the PLC think, cycle by cycle.
  • Predict first: guess the result before you see it.
  • Code puzzles: put real code lines in the right order before writing your own.
  • Check yourself: short questions with instant feedback, and a quick review of older lessons at the start of each lesson.

🛠 PLC Studio

A real practice environment: an industrial-style engineering tool connected to the Trainer T8. Your Structured Text really runs here, cycle by cycle. Follow a lab with Guided mode, or switch it off and check your own solution at the end. Your work is saved in this browser.