analog tank level

js.jim

Member
Join Date
Oct 2008
Location
Indiana
Posts
4
we have a 5/03 and bought an analog MTS tank level probe.what instruction would you use to follow the analog signal to display tank level. The tank sits horz. so as the level gets higher the tank grows till half full and then gets smaller the closer to the top go a multi. per gal. does not seem to be the right thing to use. I have done vert. tank level but not horz. sitting tanks
 
Simple! Scale 0 - 100% !!!:D

I got nothing else, if you're looking to scale it to lbs or gallons, the math will change depending on the characteristics of your tank, and it won't be simple math either.
 
0 to 100 % in barrels which would be 31 gal's per barrel

but reminber the tank lays horz and the probe is from the top to the bottom which makes the middle the wide part of the tank and the top and bottom the narrow part
thanks for the help i just have never done one horz before always vert. standing tanks
 
I believe this may end up being a calculus based equation. The width of the rectangular cross section needed to calculate the volume is going to vary based on the current height. You will also need to split the barrel into two, the bottom half where the width will increase with height, and the top have where the width will decrease with height.

I'd be able to do it if this was about 7 years ago and I was still taking calc in highschool.
 
Tharon said:
I believe this may end up being a calculus based equation.....

I agree as it seems the poster wants to calculate the VOLUME of fluid in the tank, not just a simple 0 - 100% level.

If for example the tank's cross section is not circular, one could then split the tank into two upper and lower portions.

If you define the function for the lower portion based on the tank size in question you could then use integration to calculate the area under the curve from 0 to X (X being the level feedback), as the level rises calculate the area using integration, then multiply by the horizontal length of the tank to get the volume. Now that is some-what easy for the lower portion, with the upper you'll have to do the math a little different, just off the top of my head integrate from X to 100, subtract the result from the total area of the upper portion to get the actual area in the upper portion that is being filled, multiply again by the horizontal tank length and add that to the volume of the lower portion of the tank to get the total volume.

Now, it's been 5+ years since I've had to do much of the calculus myself, I'm pretty sure that I'm on the right track, but I'm questioning myself because I would be integrating along the y-axis rather then the x-axis....which seems to be throwing me for a loop right now. Is this were double integration comes into play? I vaguely remember triple integration for calculating the x-y axis area then the z-axis area??

It's true, you don't use it you lose it!

Regardless, it's complicated math that would be hard to do in a PLC. I always relied on my trusty TI-89 ;)
 
Last edited:
Tharon said:
I believe this may end up being a calculus based equation.
Calculus isn't necessary unless one needs to calculate the rate of change of volume with respect to the rate of change in level.

I'd be able to do it if this was about 7 years ago and I was still taking calc in highschool.
Think about it, maybe the solution will come to you.

Edit. Don't make it too hard.
 
Last edited:
Peter Nachtwey said:
Calculus isn't necessary unless one needs to calculate the rate of change of volume with respect to the rate of change in level.


Think about it, maybe the solution will come to you.

Edit. Don't make it too hard.

We need to calculate the rate of change of the width of the barrel with respect to the level... The barrel is laying on it's side.

You calculate the volume of a barrel that is upright by the cross sectional area (in this case the circle of the base that never changes) multiplied by the hieght. You are just cutting the barrel into a bunch of same sized circles.

When you lay the barrel on it's side, and cut it up, you end up with a bunch of rectangles that are all different sizes. Their widths change based on the height.

This is a very common text book problem from the calculus AB courses. Infact I think it was on my Calculus AB AP Test.


There may be some short cut method to doing it, but a proper calculus equation would give the correct answer with minimal effort (Other than remembering).
 
Wrong!!!

Tharon said:
We need to calculate the rate of change of the width of the barrel with respect to the level... The barrel is laying on it's side.
No!!!!! If the volume is desired then only the volume as a function of level is required. No rates or calculus is required.

When you lay the barrel on it's side, and cut it up, you end up with a bunch of rectangles that are all different sizes. Their widths change based on the height.
You are making this more difficult than it must be. I can do this symbolically in my head.

This is a very common text book problem from the calculus AB courses. Infact I think it was on my Calculus AB AP Test.
It may have been but the constraints imposed by an unrealistic test don't apply to real life.

There may be some short cut method to doing it, but a proper calculus equation would give the correct answer with minimal effort (Other than remembering).
There is no short cut but the solution isn't that difficult. You think in terms of rectangles which is wrong. Think in terms of a slice of a pie, actually 2*PI*r2, and triangles. That is a big hint that almost gives the solution away.
 
It's too late at night, but I see what you are getting at I think.

Still finding the relationship of the width to the height. But using trig instead of calc.
 
Ya, the horizontal lines are the liquid level. The verticle line in the middle is the depth of the tank (which would be measured with the level sensor). The rest is just to illustrate the triangle.


Edit:

Ok, I thought a bit more, but I still cannot see calculating the volume by knowing just the length across at the point of the current level.

You still have to integrate everything before that using the equation you derive using the triangles for your area.

Integrate your area formula to get your volume formula... basically. Using the triangles you find the width of your cross sectional area (length is known and constant). Using that and the depth you integrate to find volume.

It still is all boiling down to integration.
 
Last edited:

Similar Topics

Good afternoon, I am currently working with an HMI/PLC LP-a070 and I require at least one analog output, but the PLC does not have one. I was...
Replies
5
Views
89
Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
108
I'm having trouble calming down 2 Tempo Sonics. I'm using Studio 5000 CompactLogix my Raw value is jumping around from 8575.0 to 8755.0 at a...
Replies
30
Views
1,116
I cannot add SLC500 analog input tag (I: 8.3) to EZSeries Touch Panel Editor (V 5.3). I used all the listed tag datatype but it all says "Invalid...
Replies
10
Views
254
Hi, I have questions. I have Analog Input that need to put into Ignition Designer. But I don't know how to put?
Replies
1
Views
116
Back
Top Bottom