PLC Program to Maintain the Pressure Head in a Bottle Filling System

This is a PLC Program to Maintain the Pressure Head in a Bottle Filling System.

Problem Description

Bottle filling has a constant speed of filling 20 bottles per minute. This speed depends on level of the tank due to its head pressure. To maintain this speed, pressure head of the filling tank has to be maintained at a particular. Implement this automation in PLC using Ladder Diagram programming language.

Problem Diagram


Problem Solution
  • Solid state level switches cannot be used here since level has to be continuously monitored.
  • Pressure is proportional to level. As level of a tank increases, pressure also increases.
  • Level gauges are highly sensitive to very small variations. Many companies such as Rockwall Automation and Endress+Hauser manufacture pressure gauges to measure liquid level of a tank.
  • Output of this gauge is terms of pressure so we have to convert pressure into equivalent current output. But let us assume here that maximum pressure that means when tank is full, it gives 20mA output and when tank is empty, it gives 4mA output which is in standard form 4-20mA.
  • Use conversion instructions to convert this 4-20mA data into registers. To do this, Analog modules for PLCs are used.
  • These modules convert 4-20mA into equivalent digital level signals.
  • Output of this Analog modules are stored in Hex form which are then processed by the processor and hex output is generated again.
  • Just like Analog input modules, Analog output modules are used convert digital output data into equivalent current signals to operate power supply circuit which varies output accordingly, to drive the final control element, here control valve.
PLC Program

Here is PLC program to Maintain the Pressure Head in a Bottle Filling System, along with program explanation and run time test cases.

List of Inputs and Outputs
 I:1/14	= Start							(Input)
 I:1/15	= Stop							(Input)
 B3:0/0	= Master Coil Bit					(Bit)
 DIV	= To divide total height of the tank			(Compute)
 MUL	= To multiply with the tank level to be maintained	(Compute)
 N7:0	= Input from Level Gauge				(Register) 
 N7:1	= Result (Variation per cm)				(Register)
 N7:2	= Result of multiplication				(Register)
 O:6	= I-P Converter						(Output)

Ladder Diagram to solve control pressure headplc-program-maintain-pressure-head-bottle-filling-system-02

Program Description
  • RUNG000 is a latching rung to operate the system through Master Start and Stop PB.
  • RUNG001 comprises all the conversion needed to control level of the tank.
  • Output of transmitter is in current signals which is 4-20mA.
  • When output is 4mA, Analog Input Module converts it into 16bit equivalent hex numbers. Hence when input to Analog module is 4mA, it stores 0000h into register and when 20mA, it stores FFFFh into register. Here register N7:0. This conversion is done internally by the A-to-D converter in Analog Input Module.
  • Height of the tank is 10m or 1000cm. By converting it into equivalent hex, change in value per centimeter is 66 approximately which is stored in register N7:1.
  • Value of N7:1 is then multiplied with the preset value of tank level that is 900cm here.
  • This multiplication is stored into N7:2 register. Digital to Analog conversion of value stored in N7:2 is performed inside the processor and equivalent mA current is received from terminal O:6.
  • Current to Pneumatic converter then converts current signals into equivalent 3-15psi pneumatic signal and adjusts valve opening.
Runtime Test Cases
Input	        Output   	Valve percentage open
N7:0 = 0000h	O:6 = 0000h	Valve 100% Open
N7:0 = FFFFh	O:6 = E506h	Valve 90% Open

Sanfoundry Global Education & Learning Series – PLC Algorithms.
To practice all PLC programs, here is complete set of 100+ PLC Problems and Solutions.

If you find any mistake above, kindly email to [email protected]

Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.