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

UNIT-3

1.1 VIRTUAL INSTRUMENTATION:


Virtual Instrumentation (VI) is a system where a layer of software and/or hardware is added to a digital
computer, enabling it to function like a conventional instrument. This technology provides a modern
approach to testing and analysis by utilizing software to emulate the functionality of traditional
hardware instruments.

1.1.1 Standard Architecture of Virtual Instrumentation

The architecture of a virtual instrument typically includes three main components:


 Data Acquisition: Collecting data from various sensors or input devices.
 Analysis: Performing data processing and calculations, such as transforming time-domain data
to the frequency domain using techniques like Fourier Transform.
 Presentation: Displaying the results through a user interface that mimics the look and feel of
traditional instruments.

1.1.2 Key Features and Benefits

 Software-based Functionality: With VI, the software mimics the behavior of actual instruments.
The computer handles most tasks related to data acquisition, analysis, and presentation, making
it highly adaptable.
 Emulation of Traditional Instruments: Software can emulate instruments such as oscilloscopes,
digital multimeters, and spectrum analyzers. This eliminates the need for separate hardware for
each type of instrument, providing a unified and customizable front end.
 Low Cost: Reduces expenses associated with purchasing and maintaining multiple hardware
instruments.
 Flexibility: Easily adaptable to different testing and analysis needs.
 Customization: Users can tailor virtual instruments to their specific requirements.

Q) Explain the essential need for Virtual Instrumentation and compare it with the traditional
instruments? (2022-23)
Q) Define virtual instrumentation. Draw the architecture of virtual instrumentation system.(2021-22)
Q) draw the architecture of virtual instrumentation and explain its parts. (2020-21)
A typical architecture of a virtual instrumentation system can be represented by a block diagram
consisting of the following key components
1. User Interface (UI)
2. Software
3. Data Acquisition (DAQ) Hardware
4. Signal Conditioning
5. Sensors/Transducers
6. Data Storage and Analysis
The architecture of virtual instrumentation involves integrating various components to measure,
analyze, and visualize physical phenomena using software and hardware.

1
The user interface allows interaction with the system, while the software and DAQ hardware facilitate
data acquisition and processing. Signal conditioning ensures accurate data capture from sensors,
Sensors or transducers are used to measure physical quantities (temperature, pressure, etc.) they
convert physical phenomena into electrical signals and the final data is stored and analyzed for
meaningful insights.

1.2 GRAPHICAL PROGRAMMING TECHNIQUES


Graphical Programming Language: LabVIEW
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a prominent graphical
programming language used to develop virtual instruments. It simplifies the process of creating and
managing virtual instruments through the use of visual programming.
 Functional Blocks: In LabVIEW, functional blocks representing various operations (such as
arithmetic operations, data acquisition, and instrument control) can be selected from a palette
menu and connected to build a virtual instrument.
 Drivers: A set of drivers provides high-level calls or icons to initialize and control instruments.
These drivers are software routines that manage the configuration, initialization,
reading/writing, and triggering of programmable instruments.
 Digital Signal Processing (DSP): DSP software within V.I can perform advanced numerical
analyses, such as Fast Fourier Transform (FFT) and joint time-frequency analysis. This
capability enhances the processing and analysis of complex signals.

1.2.1 Applications in Industrial Automation

Virtual Instrumentation is particularly valuable in industrial automation due to several factors:


 Precision and Accuracy: Ensures high precision and accuracy in measurements.
 Real-time Monitoring and Control: Facilitates real-time monitoring and control of industrial
processes.
 Data Integration and Analysis: Integrates various data sources and supports advanced data
analysis.
 Remote Access and Control: Allows remote access and control, enhancing operational flexibility.
 Cost Efficiency: Reduces costs associated with maintaining and upgrading physical instruments.

2
 Customization: Customizable to meet specific industrial requirements.
 Scalability: Easily scalable to accommodate growing industrial needs.

1.3 DATA TYPES


Numeric Data Types:
Integer: Used to represent whole numbers. Commonly used for counting and discrete measurements.
Examples: 8-bit, 16-bit, 32-bit, and 64-bit integers.
Floating-point: Used to represent real numbers, allowing for the representation of fractions and
decimals. Essential for precise measurements.
Examples: Single-precision (32-bit), double-precision (64-bit) floats.
Boolean Data Types:
Represents two possible values: True or False. Useful for binary conditions, logical operations, and
control flow.
Examples: On/Off states, Yes/No decisions.
String Data Types:
Used to represent text. Strings can store alphanumeric characters and are useful for displaying
messages, labels, and user inputs.
Examples: Sensor names, error messages, unit labels.
Array Data Types:
A collection of elements of the same data type. Arrays allow for the storage and manipulation of
multiple related data points.
One-dimensional arrays: Represent a list or a sequence of values.
Multi-dimensional arrays: Represent tables or grids of values, such as matrices.
Cluster Data Types:
A collection of elements of different data types grouped together. Clusters are useful for bundling
related data items into a single data structure.
Example: A sensor reading cluster containing a timestamp (string), temperature (float), and status
(boolean).
Waveform (graph) Data Types:
Specialized data type used to represent time-series data. It typically includes an array of data points, a
start time, and a time increment (dt).
Example: Voltage waveform data from an oscilloscope.
Q) Explain data types in virtual instrumentation ? (2021-22)

1.4 ADVANTAGE OF VIRTUAL INSTRUMENTATION TECHNIQUES


 Flexibility: Easily customizable to specific measurement needs.
 Cost-effective: Reduces the need for multiple physical instruments.
 Integration: Can integrate with various sensors, actuators, and data acquisition systems.
 Scalability: Easily expandable to accommodate new requirements.

3
 Visualization: Provides real-time data visualization and analysis.
 Data Logging: Simplifies the process of data logging and reporting.

1.5 CONCEPT OF WHILE & FOR LOOPS


In Virtual Instrumentation, particularly when using LabVIEW, loop structures are fundamental for
repetitive operations and data processing. The two primary loop structures in LabVIEW are the While
Loop and the For Loop. Understanding how to use these loops effectively can greatly enhance the
performance and functionality of your VIs (Virtual Instruments).
While Loop
Executes a set of statements repeatedly as long as a condition is true.
Ideal for tasks where the number of iterations is not known beforehand.
Key Characteristics:
 Boolean Conditional Terminal:
The loop continues executing as long as the Boolean condition is False (by default).
The loop stops executing when the Boolean condition becomes True.
 Infinite Iteration Capability:
The loop can potentially run indefinitely until the stop condition is met.
This is useful for continuous monitoring or control tasks.
 One-time Execution:
If the stop condition is met immediately, the loop executes exactly once.
This can be leveraged to create functional globals for retaining state information across multiple calls.
Practical Applications:
 Data Acquisition: Continuously reading sensor data until a stop condition (like a user pressing a
STOP button) is met.
 Real-time Monitoring: Continuously monitoring system parameters and updating the display.
 Control Systems: Implementing feedback loops that run until a desired condition is achieved.

Example code:
WHILE (Condition is False)
{
// Execute code
// Check condition at the end of each iteration
}
Q) Syntax for two types of while loop ? (2022-23)
Basic while Loop: Runs as long as the condition is true.
# Basic while loop

4
count = 0
while count < 5:
print("Count is:", count)
count += 1
while Loop with break: Uses break to exit based on an internal condition.
# while loop with break statement
count = 0
while True:
print("Count is:", count)
count += 1
if count >= 5:
break
For Loop
The For Loop is ideal when you know the number of iterations in advance. It is commonly used for
operations such as array processing and repeated actions a fixed number of times.
Key Characteristics:
 Fixed Iteration Count:
The loop executes a predetermined number of times.
The iteration count is set by wiring a value to the count terminal.
 Auto-Indexing:
When an array is wired to the For Loop, LabVIEW automatically determines the number of iterations
based on the array size.
Multiple arrays can be processed, and the loop will iterate up to the length of the smallest array.
 No Early Exit:
Unlike While Loops, For Loops do not have a built-in mechanism to exit early.
This ensures dataflow continuity and avoids complications in data output.
Practical Applications:
 Array Processing: Iterating through elements of an array to perform operations like calculations
or data transformations.
 Repetitive Calculations: Performing a specific operation a set number of times, such as summing
values or averaging data points.
 Batch Processing: Handling a fixed number of tasks, such as reading a predefined number of
data samples.
Example
FOR (i = 0; i < N; i++)
{
// Execute code
// N is the fixed number of iterations

5
}

1.6 ARRAYS, CLUSTERS & GRAPHS

1.7 STRUCTURES: CASE, SEQUENCE & FORMULA NODES

1.8 NEED OF SOFTWARE BASED INSTRUMENTS FOR INDUSTRIAL


AUTOMATION.

You might also like