Horizontal Tank Volume vs Level

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi Everyone,
I am trying to compute the tank volume vs level on a horizontal LP tank (capsule tank). I searched the forum and found a nice post that had a spread sheet on it by Tom Jenkins. http://www.plctalk.net/qanda/showthread.php?p=757739

I am trying to implement the algorithm that he posted and I seem to be having some issues. The Volume Factor for the Tank portion of the calculation does not seem to follow the chart that is in the Excel spreadsheet.

Could someone give me a sanity check on this? I am using ST in Studio 5000 v28 to do this calculation. Let me know what I am doing wrong.

Thanks for your time.

tank calc snip.PNG
 

Attachments

  • Horizontal_Tank.xls
    37.5 KB · Views: 46
Try

VF_TANK := (-1.17839 * (dD**3)) + (1.77642 * (dD**2)) + (0.40551 * dD);

instead of -1,7839 as in your screenshot. You missed the first decimal.
 
I double checked my equation and it is defiantly -1.17839. If I had used a comma instead of the decimal point I wouldn't be able to compile the code due to an error.

What I ended up doing was I found a web site that would let me put in the tank size info and a fill height and it would spit out a volume. I put in all the fill heights every 3" and recorded the volumes it gave me. I put those heights and volumes into the same spreadsheet to develop a curve and equation for that curve. I will put in that equation into the PLC.

Given these tanks were built in the 50's and any strapping charts are long gone this should be close enough. We are using a meter to load into the trucks so we don't have to worry about using the tank gauge for Custody Transfer. I just wanted to have a volume so I can display the Ullage on the HMI.
 
I double checked my equation and it is defiantly -1.17839. If I had used a comma instead of the decimal point I wouldn't be able to compile the code due to an error.

Look at your own print screen. It's -1.7839 in your code instead of -1.17839. I tried your formula as in your print screen and got the same error.

When I tried the exact formula from the Excel file it checks out. Tom Jenkins Excel file is correct and working.

tank calc snip.PNG
 
Last edited:
You are correct. I am sorry I was thinking that you were referring to me putting a comma separator in my code as apposed to a decimal point. I didnt even look at the actual number my apologies!!
 

Similar Topics

Hi All, It probably has been discussed before....but... My PLC is a AB L71 Processor (RSLogix5000 v20) I have a Horizontal Round Cylinder Tank...
Replies
27
Views
11,257
I have a horizontal tank curved on both ends. I need a formula to figure the volume. Actually I have a number of formulas but can't seem to get...
Replies
6
Views
3,563
Hi I need a formula for a horizontal tank used at a milk bottling plant. We use an Allen Bradley PLC 5 system. need to convert the 4-20 ma signal...
Replies
8
Views
10,046
Greetings from all the way down here in New Zealand:-) I have a challenge for you all..... I have a need for a PLC to run a Doser pump to pump...
Replies
34
Views
11,251
Hey Guys, I was needing some advise on what device you would recommend using to read/monitor oil Level from a horizontal tank? In normal...
Replies
3
Views
2,308
Back
Top Bottom