Fluid Processing Lab:  Using Math-Script in LabVIEW
 

Purpose:  The purpose of this laboratory exercise is to introduce the use and application of math-scripting as a function in LabVIEW.  Math Script allows for embedding formulas or C+ type code as a sub-program and makes programming more efficient when calculations are needed.  To illustrate this application, a fluid pumping station will be created, and time to fill the tank along with other variables will be calculated and displayed on the front panel.

Objectives:  The objectives of this exercise are to allow students to become familiar with the following:
 

Creating a Math Script structure
Creating INPUT variables
Creating OUTPUT variables
Writing formulas
Displaying required results


Procedures:

Study the system diagram shown in the page 3.  Your system should calculate the following outputs based on given inputs.  A table showing input variables and calculated variables is shown below.

   Input Variables

Nominal Pump Flow Rate
Tank Diameter (inches)
Tank Height (inches)

Calculated Variables

Pump Flow Rate (GPM):  GPM = Nominal – (zero to 4 gallons per minute).
    Note use a random number generator to simulate actual GPM.
GP - Gallons Pumped:  Gallons pumped = Actual GPM x Elapsed time in
     minutes.
TV – Tank Volume (cubic inches)
TVG – Tank Volume (gallons)
FL - Fluid Level (inches)
TTF -Time to Fill (minutes)
TTFS - Time to Fill (seconds)
PSI - Head Pressure (absolute PSIA)  Note: Assuming water is being pumped, the static head pressure
         can be found by the following formula:
                     PSIA = (FH /12 * .433) + 14.7
                     Where FH = Fluid height in inches
                              .433 = change in psig per foot change in fluid elevation
                          14.7     = Constant for atmospheric pressure (at sea level)
                          12        = conversion from inches to feet.

General System Operation:  Based on the nominal flow rate of the pump, the area of the tank, and height of the tank (shown in green), the VI should calculate and display the variables shown in yellow below.  If the fluid level in the tank is equal to the vertical height of the tank, the system should automatically shut down.  Note:  Use a 250 ms wait function inside the while loop.

Procedures continued:

A demonstration of math script will be given in class.  You will need to develop the block diagram for the corresponding front panel shown above.  Note up to now you have been given both the front panel and block diagram.  In this exercise, you will be required to develop your own.   Note, it is advisable to hand calculate values to confirm your answers.

Submit a lab report in the usual required format.
 

Helpful conversions and formulae

231 Cubic inches = 1 Gallon
Volume of Tank = Area x Height of Tank
Time to fill = Flow rate x elapsed time
PSIA = PSIG + 14.7
Head Pressure = .433 psi/ft x fluid head in feet
 
 

                                            Fluid Pumping Station Front Panel