# LabVIEW

cancel
Showing results for
Did you mean:

## How can use removal rate to show level of liquid in a tank?

I'm trying to use a use a flow meter to measure the usage of oil in a home heating system. I've set up a VI to measure the frequency of the flow meter and convert it into l/hr. The problem I have is how can I use this data to show the liquid level in the tank disipating as the flow meter runs?

See diagram below....

Chris

Message 1 of 5
(1,467 Views)

## Re: How can use removal rate to show level of liquid in a tank?

Shift register.

The volume in the tank would be stored in a shift register.  Each iteration of the loop you subtract an amount from that value and store it back in the shift register.  You will need to use some timing in your loop so it runs a consistent rate.  Also, you will need to use appropriate scale factors in your calculations.  If your tank holds 500 gallons and you are using 1 gallon/hour and your loop runs 1 iteration per second.  You would want to subtract 1/3600 gallons from the shift register every loop iteration from the shift register which would have been initialized at 500.

Message 2 of 5
(1,459 Views)

## Re: How can use removal rate to show level of liquid in a tank?

Hi Chris,

I hope you are well.

Ravens Fan is right, Shift Register would be the easiest way of implementing this into your code.

I have included a link to a Developer Zone article which explains Shift Registers under the Iterative Data Transfer section.

Tutorial : Timing, Shift Register and Case Structures

Video : Timing, Shift Register and Case Structures

Basic Shift Register examples

Have a good weekend!
Ashish Naik
National Instruments UK
Message 3 of 5
(1,435 Views)

## Re: How can use removal rate to show level of liquid in a tank?

You should also do something with that dynamic data.

There is a function 'convert from dynamic data' that will turn your signal into type DBL.

This way you wont have data coersion at EVERY single native function.

Message Edited by Cory K on 06-05-2009 11:07 AM
Cory K
Message 4 of 5
(1,433 Views)

## Re: How can use removal rate to show level of liquid in a tank?

Hi Chris,

I hope you are well. I was wondering if this information as helped you solve your issue. Please let us know how your getting on.

Ashish Naik