ISO 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 (LPM)
Tank
Diameter (mm)
Tank
Height (mm)
Calculated Variables
Pump
Flow Rate (LPM): LPM = Nominal – (zero
to 10 liters per minute).
Note use a random number generator to
simulate actual LPM.
LP
- Liters Pumped: Liters pumped = Actual
LPM x Elapsed time in
minutes.
TV
– Tank Volume (cubic meters)
TVL
– Tank Volume (Liters)
FL
- Fluid Level (mm)
TTF
-Time to Fill (minutes)
TTFR
- Time remaining to Fill (minutes)
KPa
- Head Pressure (absolute KPa) Note:
Assuming water is being pumped.
Note: Static head pressure can be found by the
following formula:
P = weigh density (g) x head
(h) or
P = g h
Mass density of water = 1000 Kg / m3
Weight density of water = 9810 N/m3
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
106 mm3 = 1 liter
Volume of Tank = Area x
Height of Tank
Time to fill = Flow rate x
elapsed time
Atmospheric pressure (absolute)
= 101 KPa
Head Pressure = weight
density in N/m3 x fluid head in meters
Note: The system shown below
represents a fluid processing system in Imperial Units.
Your developed system must be in ISO units.
The tank should be
animated such that the fluid level in the tank will change (fill) while the
pump is running.
Also, add chart(s) that
will display the nominal flow rate, actual flow rate, fluid level, and time to
fill.

Fluid
Pumping Station Front Panel