Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY

LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

Subject: BIO-INSTRUMENTATION-II THIRD year, Semester 6th

Name: ___________________________________________ Roll No: ____________________

Score: __________ Signature of Tutor: _______________________ Date:________________

LAB HANDOUT- 2

OBJECTIVES: The Purpose of this lab is to study Virtual Instrument and it’s designing in
LabVIEW.

INTRODUCTION: With virtual instrumentation, software based on user requirements defines


general-purpose measurement and control hardware functionality. Virtual instrumentation
combines mainstream commercial technologies, such as the PC, with flexible software and a
wide variety of measurement and control hardware, so engineers and scientists can create user-
defined systems that meet their exact application needs. With virtual instrumentation, engineers
and scientists reduce development time, design higher quality products, and lower their design
costs.
Therefore, LabVIEW building blocks are called Virtual Instruments (VI), or VIs, because
their appearance and operation imitate physical instruments, such as oscilloscopes and multi-
meters. Every VI uses functions that manipulate input from the user interface or other sources
and display that information or move it to other files or other computers.
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

A VI contains the following three components:

1. Front panel—Serves as the user interface.


2. Block diagram—Contains the graphical source code that defines the functionality of the
VI.
3. Icon and connector pane—Identifies the VI so that you can use the VI in another VI. A
VI within another VI is called a subVI. A subVI corresponds to a subroutine in text-based
programming languages.

1) Front Panel:
The front panel is the user interface of the VI. You build the front panel with
controls and indicators, which are the interactive input and output terminals of the VI,
respectively. Controls are knobs, push buttons, dials, and other input devices. Indicators are
graphs, LEDs, and other displays. Controls simulate instrument input devices and supply data to
the block diagram of the VI. Indicators simulate instrument output devices and display data the
block diagram acquires or generates.
The Controls palette is available only on the front panel. The Controls palette contains the
controls and indicators you use to create the front panel. The controls and indicators are located
on subpalettes based on the types of controls and indicators.
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

Creating a LabVIEW Front Panel:


1. Controls Palette (Right-Click) Access a hierarchical palette of all front panel elements.
2. Quick Drop (Ctrl + Space) Search by object name.

Front Panel Objects:


1. Decorations Decorative elements and imagery
 Text
 Arrows
 Lines
 Images
 and more
2. Customizable Indicators Used to convey outputs to a user
 Graphs and Charts
 Gauges and Meters
 LEDs
 Numerics
 and more
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

3. Customizable Controls Used to receive input from a user


 Knobs and Dials
 Sliders
 Buttons
 Numerics
 and more

All Front Panel Elements Have Block Diagram Terminals: Block diagram terminals provide
access to front panel values.
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

2) Block Diagram
After you build the front panel, you add code using graphical representations of
functions to control the front panel objects. The block diagram contains this graphical source
code. Front panel objects appear as terminals on the block diagram.
The Functions palette is available only on the block diagram. The Functions palette contains the
VIs and functions you use to build the block diagram. The VIs and functions are located on
subpalettes based on the types of VIs and functions.

Creating a LabVIEW Block Diagram


1. Functions Palette (Right-Click) Access a hierarchical palette of all block diagram
functions.
2. Quick Drop (Ctrl + Space) Search by object name.

Block Diagram Objects:


1. Terminals The terminals represent the data type of the control or indicator.

For Example, a DBL terminal, represents a double-precision, floating-point numeric


control or indicator. Terminals are entry and exit ports that exchange information between
the front panel and block diagram. Data you enter into the front panel controls enter the block
diagram through the control terminals.
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

2. Nodes Nodes are objects on the block diagram that have inputs and/or outputs and
perform operations when a VI runs.

They are analogous to statements,operators, functions, and subroutines in


text-based programming languages.
3. Wires You transfer data among block diagram objects through wires. Each wire has a
single data source, but you can wire it to many VIs and functions that read the data.
Wires are different colors, styles, and thicknesses, depending on their data types. A
broken wire appears as a dashed black line. .
4. Structures Structures are graphical representations of the loops and case statements of
text-based programming languages. Use structures on the block diagram to repeat blocks
of code and to execute code conditionally or in a specific order.

Execution Control Structures: (Loops)


1. Count Terminal- The code contained within this For Loop will execute N times.
2. Loop Iteration Terminals- This provides the current loop iteration count, which ranges
from 0 to N-1.
3. Conditional Terminal- The code within this While Loop will run until a True value is
evaluated.

3
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

3) Icon and Connector Pane

After you build a VI front panel and block diagram, build the icon and the
connector pane so you can use the VI as a subVI. EveryVI displays an icon, such as the one
shown at left, in the upper right corner of the front panel and block diagram windows. An icon is
a graphical representation of a VI. It can contain text, images, or a combination of both. If you
use a VI as a subVI, the icon identifies the subVI on the block diagram of the VI. You can
double-click on the icon to customize or edit it.

You also need to build a connector pane The connector pane is a set of terminals
that corresponds to the controls and indicators of that VI, similar to the parameter list of a
function call in text-based programming languages.

Data Flow
 Each block diagram node executes only when it receives all inputs
 Each node produces output data after execution

 Data flows along a path defined by wires


 The movement of data determines execution order
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

The Colour, Style, and Thickness of Common Wires:

LAB TASK

Question.1 Why is Virtual Instrumentation necessary?


_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Question.2 What is modular I/O, and scalable platforms?

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Question.3 How is the diagram window different than the front panel?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY
LIAQUAT UNIVERSITY OF MEDICAL & HEALTH SCIENCES JAMSHORO

Question.4 Draw VI’s of an AND gate and OR GATE Boolean with arrays of 4:2 inputs?
Indicator should glow according to their truth table?

You might also like