Virtual Instrumentation
Chapter 5
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.)
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 1 / 49
Course Outline
1 Introduction to Instrumentation
2 Virtual Instrumentation
3 Virtual Instrumentation Architecture
4 Introduction to LABVIEW
5 LABVIEW Environment
6 Structures in LABVIEW
7 DAQ and Instrument Control
8 Applications
9 Summary and Conclusion
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 2 / 49
What is Instrumentation?
Science of measurement and control.
Used to measure physical quantities.
Examples: voltage, current, temperature, pressure.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 3 / 49
Need for Modern Instrumentation
Higher accuracy and speed.
Automation requirement.
Data storage and analysis.
Remote monitoring.
Figure: Traditional Instrumentation
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 4 / 49
Limitations of Traditional Instruments
Bulky and expensive.
Fixed functionality.
Difficult to upgrade.
Limited data processing.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 5 / 49
What is Virtual Instrumentation?
Software-based measurement system.
Uses PC + hardware + software.
Functionality defined by software.
Figure: Virtual Instrumentation
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 6 / 49
Key Concept of Virtual Instrumentation
Replace hardware with software.
User-defined instruments.
High flexibility.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 7 / 49
Advantages of Virtual Instrumentation
Cost-effective.
Reconfigurable.
Easy data visualization.
Faster development.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 8 / 49
Disadvantages of Virtual Instrumentation
Requires programming knowledge.
PC dependency.
Initial learning curve.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 9 / 49
Traditional vs Virtual Instrument
Traditional Instrument Virtual Instrument
Fixed Hardware PC + DAQ
Limited Flexibility Software Defined
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 10 / 49
Basic VI Architecture
Database
Storage
Sensor Signal
DAQ PC
Transducer Conditioning
Display
LABVIEW
Control
Sensors and Transducers
Signal Conditioning
DAQ Hardware
Database Storage
Computer
Software
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 11 / 49
Sensors and Transducers
Convert physical quantity to electrical signal.
Examples: Thermocouple, LVDT.
Figure: Thermocouple used to produce an Analogue Signal.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 12 / 49
Signal Conditioning
Amplification
Filtering
Isolation
Figure: Signal amplification and filtering.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 13 / 49
Data Acquisition (DAQ)
Converts analog signals to digital.
Sampling and quantization.
NI DAQ cards.
Figure: Data Acquisition Process
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 14 / 49
What is LABVIEW?
Laboratory Virtual Instrument Engineering Workbench.
Developed by National Instruments.
Graphical programming language.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 15 / 49
Why LABVIEW?
No text-based coding.
Rapid development.
Strong hardware integration.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 16 / 49
LABVIEW Applications
Data acquisition.
Instrument control.
Industrial automation.
Research and development.
A LABVIEW program is called VI.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 17 / 49
LABVIEW Virtual Instrument (VI)
A VI has three main parts:
1 Front Panel: The interactive user interface.
2 Block Diagram: The executable code in graphical form.
3 Icon and Connector Pane: Allows the VI to be used as a sub-VI in another program.
Figure: Labview Software.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 18 / 49
The Addition Code in C++
1 # include < iostream >
2 using namespace std ;
3
4 int main () {
5 int a = 3;
6 int b = 5;
7 int sum ;
8
9 sum = a + b ;
0
1 cout << " sum : " << sum << endl ;
2
3 return 0;
4 }
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 19 / 49
LABVIEW
Figure: Graphic-based code for a simple calculator.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 20 / 49
Front Panel
The front panel is the window through which the user interacts with the program.
User interface.
Contains controls and indicators.
Knobs, graphs, switches.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 21 / 49
Control or Indicator
Controls = Inputs from the user = Source Terminals
Indicators = Outputs to the user = Destinations
Figure: Control & Indicator
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 22 / 49
Manipulating Controls and Indicators
Right click on an indicator to:
Change to control.
Change format or precision.
Right click on a control to:
Change to indicator
Change mechanical action (whether to latch open or closed, and what to use as
default. . . )
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 23 / 49
Block Diagrams
The block diagram window holds the graphical source code of a LabVIEW VI – it is
the actual executable code.
You construct the block diagram by wiring together objects that perform specific
functions.
Figure: Block Diagrams.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 24 / 49
Terminals
When you place a control (or indicator) on the FRONT PANEL, LabVIEW
automatically creates a corresponding control (or indicator) terminal on the BLOCK
DIAGRAM.
→
Figure: Terminals.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 25 / 49
Control or Indicator Terminal
Control terminals have thick borders.
Indicator terminals have thin borders.
Figure: Control or Indicator Terminal
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 26 / 49
Nodes
Node is just a fancy word for a program execution element – Nodes are analogous to
statements, operators, functions and subroutines in standard programming language:
The add and subtract functions represent one type of node.
A structure is an other type of node. Structures can execute code repeatedly or
conditionally, similar to loops and case statements in traditional programming
languages.
LabVIEW has also special nodes, called formula nodes, which are useful for
evaluating mathematical formulas or expressions.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 27 / 49
Wires
A LabVIEW VI is held together by wires connecting nodes and terminals; they
deliver data from one source terminal to one or more destination terminals.
Figure: Wires and Nodes.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 28 / 49
Basic wires used in block diagrams.
Each wire has a different style or color, depending on the data type that flows
through the wire:
Figure: Different Data Types
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 29 / 49
Control Palette
Insert a digital indicator or control
Insert a boolean control (button or switch)
Figure: Control and Indicator
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 30 / 49
Functions Palette
Figure: Functions Palette.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 31 / 49
LABVIEW Front Panel
User Interface (Front Panel)
Knob
Waveform Graph
Numeric
Start Stop
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 32 / 49
Front Panel
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 33 / 49
Block Diagram
Graphical code.
Uses blocks and wires.
Data flow based execution.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 34 / 49
Icon and Connector Pane
VI representation
Used for subVIs
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 35 / 49
LABVIEW Block Diagram
Control Input Processing Function Indicator Output
Data Flow Execution
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 36 / 49
While Loop
Executes continuously.
Used in monitoring systems.
Figure: While Loop
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 37 / 49
For Loop
Executes fixed number of times.
Used for iterations
Figure: For Loop
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 38 / 49
Case Structure
Conditional execution.
Similar to switch-case.
Figure: Case Structure
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 39 / 49
DAQ in LABVIEW
NI-DAQmx drivers.
Analog and digital I/O.
Figure: DAQ
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 40 / 49
NI USB-6008/6009
Figure: Pinout
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 41 / 49
Instrument Control
GPIB
USB
Serial communication
Figure: GPIB Port
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 42 / 49
VISA Interface
Virtual Instrument Software Architecture
Standard communication API
Figure: VISA interface card
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 43 / 49
Applications
Process monitoring.
Automation systems.
ECG acquisition.
Patient monitoring.
Lab experiments.
Simulation and analysis.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 44 / 49
Advantages of LABVIEW
Graphical programming.
Easy hardware interfacing.
Powerful analysis tools.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 45 / 49
Summary
Virtual Instrumentation is software-driven.
LABVIEW simplifies measurement systems.
Widely used in industry and academia.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 46 / 49
Future Scope
IoT integration.
AI-based instrumentation.
Remote virtual labs.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 47 / 49
Example : Craps Game
Add a multiplication node and a numeric constant to allow multiplication by 5.
Add an addition node and numeric constant to allow addition of 1.
Add a mathematical “Round to Nearest” node.
Make a second copy of this structure to represent a second die and wire them
together through an addition node with an output to a numeric constant.
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 48 / 49
Questions?
Mesfin T.(Ph.D.) & Teshome H.(Ph.D.) Virtual Instrumentation December 24, 2025 49 / 49