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
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 > 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

From Boolean Algebra to PLC Logic
Scale and Normalize Instructions in PLC
#4 PLC Best Practices – Use PLC Flags as Integrity Checks
Communication between Factory IO and Siemens Tia Portal
Gas Turbine Temperature Alarms using Siemens TIA Portal
How to Create Templates in FactoryTalk View Studio?
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

What is a PLC? – Programmable Logic Controller
SCADA Hardware and Software
PLC Example on Manufacturing Line Assembly
#9 PLC Best Practices – Validate indirections
Always ON and OFF Bit using Ladder Logic and Statement List
Series Tanks Level Control using PLC Ladder Programming
PLC Multiple Choice Questions
System Cabinet Health Checks – PLC and DCS Industrial Automation

Keep Learning

Applications of SCADA

What is a Tag in SCADA

What is a Tag? Types of Tags in SCADA

Simple PLC example Hardware configurations

Muting Functions of Safety Control Circuits – PLC Example

PLC Program for Analog Input Sampling

PLC Analog Input Sampling Ladder Logic

PLC Program for Star Delta Starter using Functional Block Diagram

PLC Program for Star Delta Starter using Functional Block Diagram

Traffic Lights Ladder Diagram using Timers

Traffic Lights Ladder Diagram using Timers

Types of Allen Bradley PLC

Types of Allen Bradley PLC

PLC Programming in Bottle Filling Process

Applications of PLC Programming in Bottle Filling Process

Learn More

Diodes Voltage Tripler

Diodes Voltage Tripler

Tubing ACCURATE BENDING

Instrument Tube Fitting Installation – Part 1

Electronic Devices & Circuits Objective Questions

Electronic Devices & Circuits Quiz – Set 3

Boiler Protection System

Burner Management System Logic and Interlock

Digital Electronics Multiple Choice Questions

Random Access Memory Objective Questions – Part 4

Analyzers Questions and Answers

Sodium Analyzer Questions & Answers

Flame Cables

Difference Between Flame Resistant and Flame Retardant Cables

Modbus scan

How Modbus Communication works

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?