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: Controlling of Tank Level Using Proportional Controller in PLC
Share
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 > Controlling of Tank Level Using Proportional Controller in PLC

Controlling of Tank Level Using Proportional Controller in PLC

Learn the controlling of tank level using the proportional controller and the impact of gain in the siemens Tia portal with simulation.

Last updated: September 28, 2022 2:24 pm
Hussien Ghareb
PLC Tutorials
1 Comment
Share
8 Min Read
SHARE

A Closed-Loop Control system can handle a lot of situations in your process or plant.

Contents
Closed-Loop Control SystemWhat is the Need for a Proportional Controller?Explaining of the System ComponentsTankControl PanelProcess ExplainingControlling Tank LevelCoding for the Function BlockSimulation Video

As this system can maintain a prescribed relationship between the output and the reference input by comparing them and using the difference as a means of control, what are its elements? And how could we use them that is we are going to discuss.

Closed-Loop Control System

One of the most famous images of a closed control system is the PID controller, this controller can handle and control a process smoothly with high response time and without response overshooting.

But in some cases, there is no need to use the three elements of a PID controller (Proportional – Integral – Differential), in our example we will just use a Proportional controller to control the level of the tank.

A proportional Controller is a basic element in the PID controller you might know that each element in the PID controller has its own function.

For the Proportional controller you can control the response time of your system, as in our example you can control the time taken to fill and discharge of a tank by increasing and decreasing the Proportional Gain as our control signal (which is the out signal) is described by:

C(s) = P e(t)

  • C(s): output control signal that handle the process
  • P   : Proportional gain which is constant
  • e(t): error signal which is the difference between set value and process value

What is the Need for a Proportional Controller?

Before we get into our example, we have to understand why we use this type of controlling, why we did not use a simple ON-OFF controlling with the closed loop system.

The answer is the need for Smoothing Control. The ON-OFF control can affect negatively on the stability of the system unlike the proportional controller if the gain is adjusted correctly it will give you smooth and stable performance.

Explaining of the System Components

Our example consists of two main components:

Tank

Level Transmitter that provides our system with the real process value.

Flow control valve for controlling the filling operation, controlled by an analog output (0:10 V)

Flow control valve that controls discharging process, controlled by an analog output (0:10 V)

Control Panel

Start & Stop Push Buttons to control the starting and stopping of the operation

Variable Potentiometer to enter the SET value (desired tank level)

Variable Potentiometer to enter the suitable value for the Proportional Gain

LCDs to display some of the system values

Emergency Stop & Lambs for some system indications

Controlling of Tank Level Using Proportional Controller in PLC

Process Explaining

So after we have discussed the process components here we are to explain the steps to start the process.

First of all we will begin our process by pressing on the start push button, then we have to set our desired value using the potentiometer.

However, the system indicates an error signal (there would be a difference between the set value and the process value) the filling valve will not open till that you will adjust the Gain to be more than Zero.

Here the system will start with the filling operation till the process value reaches the set value, and also we will notice that the filling valve, in the beginning, opens with 100% till the process value become closer to the set value then the filling valve will start to close slowly to handle the desired level smoothly and without any overshooting, and it is the same for discharging of the tank.

NOTE you can speed your system response by increasing the Proportional gain but on the other hand, you might have some response overshooting which could affect negatively the stability of your system, so whenever you are selecting a value for the Proportional gain be careful to not increase that value so much just put it in a suitable range.

Controlling Tank Level

Here for the coding, we are using STL language and now we will explain each network in the code:

Siemens STL PLC program

To download the PLC STL program: Click Here

Network 1:

Here we are using a memory bit to control the starting and stopping of the process

Network 2:

Here for the first and second line, it is the bit that is used in the first network “Main Marker” if that bit is TRUE the scan cycle will get into the Tank Block and it will execute the program and if the Main Marker is FALSE the scan cycle would ignore this routine and it will jump to DONT_EXECUTE label.

Network 3:

Here we are conditioning the RAW input of the proportional gain value from (0 : 27648) to be scaled to (0 : 10)

Here we are moving the input values of the process (Set value – Process value – Gain value) to be displayed on the LCDs in the field

Coding for the Function Block

For proportional controller program: Click Here

Network 1:

  • Scaling of the desired value to be (0:300) cm
  • Scaling of the process value to be (0:300) cm

Network 2: Getting the desired and process values in our block to be processed

Network 3: Getting the error signal

Error signal = set value – process value

Network 4: Creating Proportional Terminal

Network 5: Here we are generating the Control Signal by multiplying the Gain with the error signal

Control Signal = Proportional Gain * Error Signal

Network 6: Conditioning of Analog outputs

Scaling of the analog output signal from (0:3000) to be (0:27648)

Network 7: Filling Operation

Network 8: ShutDown Filling and Draining Valve

Network 9: Draining Operation

Simulation Video

See the below video to Learn the controlling of tank level using the proportional controller and the impact of gain in the siemens Tia portal with simulation.

If you liked this article, then 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:

  • SCADA and HMI Systems
  • Delay a Sensor Signal in PLC
  • Configuration of Siemens VFD
  • FB and FC Programming in PLC
  • Communication Between Two PLC
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

Safety Door Interlock PLC Program
PLC Automatic Control of Two Outputs with one Input
What are Analog and Digital Signals? Differences, Examples
Motor Stop Interlock for Changing the Direction PLC Program
How to Add Unspecified CPU in Tia Portal?
Compare Two Offline PLC Projects
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
1 Comment
  • Padraig O'Murchu says:
    October 21, 2022 at 4:09 pm

    Very good tutorials.

    Reply

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

Schneider PLC Programming Example for Beginners
What is a Relay? Types of Industrial Relays
Advanced Skills Required for a PLC Programmer to Get a Job
Tank Filling and Emptying using Intouch Scada Script
Surface Grinding Process using PLC Program
Basics of Loop Checks
Create a User-Defined Function Block in Codesys
CODESYS HMI Interface

Keep Learning

Micro 870 Rockwell PLC

Rockwell Automation Allen Bradley PLC for Smaller and Medium Projects

Loss in Weight Liquid PLC System

Dosing Pump PLC Logic

PLC Program for Burglar Alarm Security System

PLC Program for Alarm Security System

Industrial Automation and Control Systems (IACS)

Industrial Automation and Control Systems (IACS)

Augmented Reality and Virtual Reality in Industrial Automation

Augmented Reality and Virtual Reality in Industrial Automation

PLC Timer Programming Examples – TON, TOF, TP and TONR

How to Select a SCADA for New Project

How to Select a SCADA for New PLC Project?

Standard Colors in PLC Automation Systems

Standard Colors in PLC Automation Systems

Learn More

Thermowell Problems

Thermowell Problems

Bimetallic Thermometer

Bimetallic Thermometer

Digital Circuits Questions & Answers

Digital Circuits Questions & Answers

Industrial Oven Control Application with PLC Controller

Industrial Oven Control Application with PLC Controller

Gas Detection Excel Converters

Purpose of Isolation valve

Repeat Failures of Letdown Valves

Design Basis for Fire Detection and Alarm System

Design Basis for Fire Detection and Alarm System

Relay-Operation

Relay Working Animation

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?