PLC Program to Display Level of a Tank

This is a PLC Program to Display Level of a Tank.

Problem Description

There is a tank of which level is controlled automatically. Display level of this tank continuously. Perform this in PLC using Ladder Diagram programming language.

Problem Solution
• Continuous measurement is necessary in this case.
• Continuous level measuring devices such as Ultrasonic, Radar, Capacitive or Pressure gauge level sensor can be used.
• Output of these sensors are in analog form, so to deal with such analog data, analog modules are used in PLC.
• Analog modules convert analog signal into equivalent hex form.
• Convert this into level height in Meter or in any other parameter to display on the screen.
PLC Program

Here is PLC program to Display Level of a Tank, along with program explanation and run time test cases.

```List of Inputs and Outputs
I:1	= Input from transmitter	(Input)
N7:0	= Register to store input data	(Register)
N7:1	= Register data to be displayed	(Register)
O:6	= Display address		(Output)
TOD	= Decimal into BCD conversion	(Compute)```

Ladder diagram to display level of tank

Program Description
• There is no any input is given to start the process since we want continuous displaying of tank level.
• When level in tank rises, output of sensor increases accordingly.
• Suppose we have a tank with height 1000cm which is 10m.
• Converting 16bit data into 1000cm height, 65 is the answer which means, increment of 65 is obtained per centimeter rise in tank level.
• Input data from I:1 is continuously moved to N7:0 which means data in N7:0 register continuously varies.
• Value stored in N7:0 is divided by 65 and stored in N7:1 register to display tank level in Centimeters.
• Value stored in N7:1 register is first converted into equivalent BCD number before feeding it to display which is connected with output module at address O:6.
• Accuracy of this method for 1000cm is ±0.8%.
Runtime Test Cases
```Input	        Output                  	Physical Elements
I:1 = 65536	N7:0 = FFFFh                	Store input to register
I:1 = 65536	N7:1 = 03F0h, O:6 = 1008(In cm)	Displays 1008cm on the screen
I:1 = 32768	N7:1 = 01F8h, O:6 = 504(In cm)	Displays 504cm on the screen```

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

advertisement
advertisement

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

advertisement
advertisement
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, 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.