Mechatronics System Design Lab
Mechatronics System Design Lab
(MTE-342L)
Submitted to:
Mr. Ahsan Ali
Submitted By:
Muhammad Sulaiman
Registration no.:
UW-20-MTS-BSC-026
Objective:
Installation of LabVIEW software and to design a water level indicator on LabVIEW software
Theory:
Graphical programming: LabVIEW uses a graphical programming language based on icons and
wires, rather than traditional lines of code. This can make it easier for students and researchers to
understand and visualize the flow of data and control in their experiments.
Hardware integration: LabVIEW includes built-in support for a wide range of hardware devices
and instruments, including data acquisition systems, sensors, and programmable logic controllers
(PLCs).
Customizable user interfaces: LabVIEW allows users to create custom user interfaces for their
experiments, including buttons, knobs, graphs, and other controls. This can make it easier to
interact with and visualize data in real time.
Data analysis and visualization: LabVIEW includes built-in tools for analyzing and visualizing
data, including statistical analysis, signal processing, and 3D visualization.
Cross-platform compatibility: LabVIEW can run on Windows, macOS, and Linux operating
systems, and supports multiple programming languages, including C/C++, Python, and Java.
Water level indicator: A water level indicator is a device used to measure and display the level
of water in a tank or container. It is typically used in water tanks, reservoirs, and other water storage
systems. The device can be analog or digital and typically consists of sensors or probes that are
placed at different levels inside the tank, connected to a display unit that shows the current water
level.
The basic principle behind a water level indicator is that the sensors or probes detect the level of
water in the tank and send a signal to the display unit. The display unit then shows the water level
in a way that is easy for the user to understand, such as using a series of lights or a numerical
readout.
2|Page UW-20-MTS-BSC-026
Water level indicators are important because they allow users to monitor the amount of water in
their tanks or reservoirs and avoid overflows or shortages. They are also useful for detecting leaks
and other problems with the water storage system. Some water level indicators can even be
connected to automated systems that control the flow of water into or out of the tank, helping to
conserve water and prevent waste.
Task:
Install LabVIEW software and design a water level indicator on LabVIEW software.
Procedure:
Installing LabVIEW Software:
1. First, you need to purchase or download the LabVIEW software from the National
Instruments website.
2. Once you have downloaded the software, double-click on the installer file to begin the
installation process.
3. Follow the instructions provided by the installer to install the software on your computer.
4. Once the installation is complete, you can launch the LabVIEW software from the
Windows Start Menu.
3. From the "Functions" palette, select "Measurement I/O" and drag the "Analog Input"
function to the block diagram.
4. Double-click on the "Analog Input" function to configure it. Select the appropriate input
channel for your water level sensor and set the maximum voltage range that the sensor will
output.
5. From the "Functions" palette, select "Programming" and drag the "Case Structure" function
to the block diagram.
6. Create two cases within the "Case Structure" function: one for when the water level is
below a certain threshold (e.g. 50% full) and one for when the water level is above that
threshold.
7. Within each case, use the "Boolean" function to turn on or off an LED indicator to represent
the current water level.
8. Finally, save your VI and run it to test the water level indicator.
3|Page UW-20-MTS-BSC-026
Results:
Observations:
During the course of this lab, we observed several key points:
1. The LabVIEW software provides a user-friendly interface for designing and implementing
virtual instruments.
2. The analog input function allowed us to read voltage values from our water level sensor
and convert them into usable data.
4|Page UW-20-MTS-BSC-026
3. The case structure allowed us to switch between two different states (i.e., water level above
and below a certain threshold) and control the LED indicators accordingly.
4. We observed that proper design and organization of code can make it easier to understand
and modify.
5. We also observed that careful attention to detail, such as selecting the correct input channel
and voltage range, is crucial for accurate sensor readings.
By recording our observations, we were able to identify areas where we could improve our design
and implementation of the water level indicator. We also gained a deeper understanding of
LabVIEW software and its capabilities.
Conclusion:
In this lab, we learned how to use LabVIEW software to design a water level indicator. We started
by installing the LabVIEW software and creating a new project. We then added an analog input
function to read the voltage from our water level sensor and used a case structure to switch between
two different states based on the measured voltage. Finally, we added LED indicators to visually
represent the water level.
Through this exercise, we gained hands-on experience with LabVIEW software and learned how
to interface it with physical sensors. We also learned the importance of designing clear and concise
code that is easy to understand and modify. Overall, this lab provided us with valuable skills and
knowledge that we can apply to future projects and experiments.
5|Page UW-20-MTS-BSC-026