Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views55 pages

Unit - 3 - Virtual Instrumentation Notes

The document outlines the curriculum for a course on Sensors and Instrumentation, focusing on virtual instrumentation and its advantages over traditional methods. It details the course outcomes, including the application of sensors, data acquisition methods, and the use of graphical programming techniques in automation. Additionally, it discusses the components and benefits of virtual instrumentation, emphasizing flexibility, cost-effectiveness, and the importance of software in creating tailored measurement systems.

Uploaded by

Prem Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views55 pages

Unit - 3 - Virtual Instrumentation Notes

The document outlines the curriculum for a course on Sensors and Instrumentation, focusing on virtual instrumentation and its advantages over traditional methods. It details the course outcomes, including the application of sensors, data acquisition methods, and the use of graphical programming techniques in automation. Additionally, it discusses the components and benefits of virtual instrumentation, emphasizing flexibility, cost-effectiveness, and the importance of software in creating tailored measurement systems.

Uploaded by

Prem Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Sensors and Instrumentation

(BOE-305)
BOOKS
Text Books

1. DVS Murthy, Transducers and Instrumentation, PHI 2nd Edition 2013

2. 2. D Patranabis, Sensors and Transducers, PHI 2nd Edition 2013.

3. S. Gupta, J.P. Gupta / PC interfacing for Data Acquisition & Process Control, 2nd ED / Instrument Society of America,
1994.

4. Gary Johnson / Lab VIEW Graphical Programing II Edition / McGraw Hill 1997.

Reference Books

1.Arun K. Ghosh, ”Introduction to measurements and Instrumentation”, PHI, 4th Edition 2012.

2. A.D. Helfrick and W.D.Cooper, “Modern Electronic Instrumentation & Measurement Techniques”, PHI – 2001
3. Hermann K.P. Neubert, “Instrument Transducers” 2nd Edition, Oxford University Press
UNIT –3

Virtual Instrumentation:

Graphical programming techniques

Data types

Advantage of Virtual Instrumentation techniques

Concept of WHILE & FOR loops, Arrays, Clusters & graphs,

Structures: Case, Sequence & Formula nodes

Need of software-based instruments for industrial automation.


Course Outcomes

CO 1 Apply the use of sensors for measurement of displacement, force and pressure.

CO 2 Employ commonly used sensors in industry for measurement of temperature, position,


accelerometer, vibration sensor, flow and level.

CO3 Demonstrate the use of virtual instrumentation in automation industries.

CO4 Identify and use data acquisition methods.

CO5 Comprehend intelligent instrumentation in industrial automation.


Virtual Instrumentation:
Introduction

• The rapid adoption of the PC in the last few years catalyzed a revolution in instrumentation for test,
measurement, and automation.

• One major development resulting from the ubiquity of the PC is the concept of virtual instrumentation, which
offers several benefits to engineers and scientists who require increased productivity, accuracy, and performance.

• A virtual instrument consists of an industry-standard computer or workstation equipped with powerful


application software, cost-effective hardware such as plug-in boards, and driver software, which together
perform the functions of traditional instruments.

• Virtual instruments represent a fundamental shift from traditional hardware-centered instrumentation


systems to software-centered systems that exploit the computing power, productivity, display, and
connectivity capabilities of popular desktop computers and workstations.

• With virtual instruments, engineers and scientists build measurement and automation systems that suit their needs
exactly (user-defined) instead of being limited by traditional fixed-function instruments (vendor-defined).
Virtual Instruments versus Traditional Instruments

• Virtual instrumentation systems are software systems that are assembled on the
computer to perform all the functions of a stand-alone system, with the additional
advantage of taking all the different measured data through the same system.
• Virtual systems can usually perform both measurement and control functions.
• The instruments are called virtual because they are created as software only.
• The virtual instruments have an appearance and operation that can imitate conventional
instruments.
• The software then controls cards that take transducer signals into the computer, making the
virtual instruments perform as functional instruments.
• Many virtual instrumentation packages use a graphical interface and a graphical
programming language and adhere to the concept of modular programming to simplify set-up.
• The virtual instrument (VI) has a front panel that is an interactive user interface that allows the
operator to control the instrument.
• The operator can view the measurements as an analog, digital, or graphical representation on the
computer monitor.
Virtual Instruments versus Traditional Instruments
Advantage of Virtual Instrumentation techniques
• Flexibility
Except for the specialized components and circuitry found in traditional instruments, the general
architecture of stand-alone instruments is very similar to that of a PC-based virtual instrument.

• Both require one or more microprocessors, communication ports (for example, serial and GPIB), and display
capabilities, as well as data acquisition modules.

• What makes one different from the other is their flexibility and the fact that you can modify and adapt the
instrument to your particular needs.

• A traditional instrument might contain an integrated circuit to perform a particular set of data processing
functions; in a virtual instrument, these functions would be performed by software running on the PC
processor.

• You can extend the set of functions easily, limited only by the power of the software used.
• Lower Cost
By employing virtual instrumentation solutions, you can lower capital costs, system development costs, and system
maintenance costs, while improving time to market and the quality of products.

• Plug-In and Networked Hardware


There is a wide variety of available hardware that you can either plug into the computer or access through a network.

• These devices offer a wide range of data acquisition capabilities at a significantly lower cost than that of dedicated
devices.

• As integrated circuit technology advances, and off-the-shelf components become cheaper and more powerful, so do the
boards that use them.

• With these advances in technology come an increase in data acquisition rates, measurement accuracy, precision, and better
signal isolation.
Application of Virtual Instrumentation

Virtual instrumentation is fueled by ever-advancing computer technology and offers you the power to create and define
your own system based on an open framework.
This concept not only ensures that your work will be usable in the future but also provides the flexibility to adapt and
extend as needs change.

Virtual
Instrumentation Development
Research and Manufacturing
in the Test and Manufacturing
Design Test
Engineering Validation
Process
• In research and design, engineers and scientists demand rapid development and
prototyping capabilities.
Research and Design • With virtual instruments, you can quickly develop a program, take measurements from
an instrument to test a prototype, and analyze results, all in a fraction of the time
required to build tests with traditional instruments.

• With the flexibility and power of virtual instruments, you can easily build complex test
procedures.
Development Test and • One of the many advantages these tools offer across the organization is code reuse.
Validation
• You develop code in the design process, and then plug these same programs into
functional tools for validation, test, or manufacturing

• Decreasing test time and simplifying development of test procedures are primary goals
in manufacturing test.
Manufacturing Test
• These tools meet rigorous throughput requirements with a high-speed, multithreaded
engine for running multiple test sequences in parallel.

• Manufacturing applications require software to be reliable, high in performance, and


Manufacturing interoperable.
Components of
Virtual Hardware
Instrumentation

Computer Software
Software in Virtual Instrumentation

• Software is the most important component of a virtual instrument.

• With the right software tool, engineers and scientists can efficiently create their own applications, by designing
and integrating the routines that a particular process requires.

• They can also create an appropriate user interface that best suits the purpose of the application and those who
will interact with it.

• They can define how and when the application acquires data from the device, how it processes, manipulates
and stores the data, and how the results are presented to the user.

• With powerful software, you can build intelligence and decision-making capabilities into the instrument so
that it adapts when measured signals change inadvertently or when more or less processing power is required.
Distributed Applications

• A virtual instrument is not limited or confined to a stand-alone PC.


• In fact, with recent developments in networking technologies and the Internet, it is more common for
instruments to use the power of connectivity for the purpose of task sharing.
• Typical examples include supercomputers, distributed monitoring and control devices, as well as data or result
visualization from multiple locations.
Hardware in Virtual Instrumentation

• The hardware components in VI act as the interface between the real-world signals and the computer.

• They acquire, condition, and convert signals into a format that the computer can process.

The hardware provides the physical connection to the real world, while the software provides the
intelligence to process, analyze, and present the acquired data, turning a general-purpose computer into a
specialized measurement and automation system.
Sensors and Transducers: Signal Conditioning Data Acquisition (DAQ)
• These are the front-end Hardware: Devices:
devices that detect physical • These components modify • The core hardware component
phenomena (temperature, the raw signals from the in VI.
pressure, light, etc.) and sensors to make them suitable • DAQ devices convert analog
convert them into measurable for acquisition by the data signals from the sensors into
electrical signals acquisition (DAQ) system. digital data that the computer
can understand.
Instrumentation Buses:
• These are communication interfaces that allow different
instruments and hardware components to communicate Actuators:
with each other and the computer. • These devices convert electrical
• Examples include: signals from the computer into
• GPIB (General Purpose Interface Bus): A parallel bus physical actions. Examples include:
commonly used for connecting older instruments. • Motors: Control motion or
• USB (Universal Serial Bus): A versatile serial bus used position.
for a wide range of devices. • Valves: Control the flow of fluids
• Ethernet: A network protocol used for connecting or gases.
devices over a local area network (LAN). • Relays: Switch electrical circuits.
• PXI/cPCI (PCI eXtensions for
Instrumentation/Compact PCI): Modular instrument
platforms with high bandwidth and low latency
Essential need for Virtual Instrumentation

4. Enhanced
5. Rapid
1.Flexibility and 2. Cost- 3. Integration Data Analysis 6. Remote Access
Prototyping and
Customization: Effectiveness: and Automation: and and Control:
Visualization: Development:

Reduced System Powerful Faster Remote


Adaptability Hardware Integration Processing Development Monitoring.
Costs Cycles.

Tailored Software Automated Customizabl Easy Distributed


Solutions. Reusability Testing. e Displays Prototyping Systems
• Adaptability: Traditional instruments are designed for specific tasks. If your needs
change, you often need to buy new equipment. VI, being software-defined, can be easily
1.Flexibility and reconfigured to perform different functions simply by changing the software.
Customization:
• Tailored Solutions: VI allows you to create instruments that perfectly match your
specific requirements, combining multiple functions and customizing the user interface.
• Reduced Hardware Costs: VI can replace multiple dedicated instruments with a single
computer and modular hardware, potentially leading to significant cost savings.
2. Cost-Effectiveness:
• Software Reusability: The same software can be used for different applications, reducing
development costs.
• System Integration: VI makes it easier to integrate different measurement and control
3. Integration and functions into a single system.
Automation: • Automated Testing: VI facilitates the automation of complex tests and measurements,
improving efficiency and reducing human error.
• Powerful Processing: Computers provide powerful processing capabilities for advanced
4. Enhanced Data Analysis data analysis and signal processing.
and Visualization: • Customizable Displays: VI allows you to create custom displays and visualizations to
present data in a way that is most meaningful for your application.
• Faster Development Cycles: Graphical programming environments and libraries of
5. Rapid Prototyping and functions in VI software accelerate the development process.
Development: • Easy Prototyping: VI enables rapid prototyping of new instruments and measurement
systems.
• Remote Monitoring: VI systems can be accessed and controlled remotely over a
6. Remote Access and network, enabling remote monitoring and control of experiments or processes.
Control: • Distributed Systems: VI facilitates the creation of distributed measurement and control
systems
Graphical programming techniques
What is Graphical Programming?

• Graphical programming uses visual elements like diagrams, icons, and symbols to represent code, rather than
traditional text-based lines of code.
• This makes it more intuitive for some people, especially visual learners, and can speed up development in certain
situations.

Main Features

Data Flow: Modularity: Visual Metaphors:

• Many graphical programming • Programs are typically built by • Graphical programming often
languages emphasize data flow. connecting reusable blocks or uses visual metaphors to
• This means that the program's modules, each performing a represent programming
execution is determined by how specific function. concepts.
data moves between different • For example, a loop might be
blocks or nodes in the diagram. represented by a circular arrow,
and a conditional statement
might be represented by a
diamond-shaped decision block.
Advantages of Graphical Programming Disadvantages of Graphical Programming

• Easier to Learn: The visual nature can make it • Limited Expressiveness: Some complex
easier for beginners to grasp programming programming tasks may be difficult or impossible
concepts. to represent effectively in a graphical format.
• Faster Development: In some cases, graphical • Scalability: Very large graphical programs can
programming can speed up development, become complex and difficult to manage.
especially for visual or dataflow-oriented tasks. • Performance: In some cases, graphical programs
• Improved Visualization: The visual may be less efficient than optimized text-based
representation can make it easier to understand code.
the program's logic and data flow. • Debugging: Debugging can sometimes be more
• Reduced Errors: The visual nature can help challenging in graphical environments, especially
reduce syntax errors that are common in text- for complex programs.
based programming.
Software for virtual instrumentation with Graphical Programming

LabVIEW (Laboratory
Virtual Instrument
Engineering
Workbench) by
National Instruments

Agilent VEE
(Visual
MATLAB (Matrix
Engineering
Laboratory) by
Environment) by
Mathworks
Agilent
Technologies
LabVIEW
• National Instruments (NI), established in 1976, has consistently aimed to
integrate traditional test and measurement instruments with personal computers.

• During its early years, the most common I/O interface in traditional instruments
was the GPIB (General Purpose Interface Bus).

• A decade after its founding, in 1986, NI introduced a software named


Laboratory Virtual Instrument Engineering Workbench, known more popularly
as LabVIEW.

• G Language, short for Graphical Programming Language, finds its most


comprehensive and powerful expression in LabVIEW
Applications of LabVIEW

Simulation and
Test and Measurement Control Systems
Prototyping

Cross-Platform
Education Rapid Development
Compatibility
LabVIEW Windows

LabVIEW programs are called virtual instruments (VIs), because their appearance and operation imitate

physical instruments like oscilloscopes.


Data types
LabVIEW has many data types, including:
•Numeric: Integers, floating-point numbers, complex numbers, and fixed-point numbers:
•Integers: Signed or unsigned whole numbers
•Floating-point numbers: Signed numbers with a decimal component
•Complex numbers: Complex single-precision, double-precision, and extended-precision
floating-point numbers
•Strings: Sequences of characters, such as names and status messages
•Arrays: Groups of one data type, which can be expanded to include more elements
•Clusters: A cluster groups different data types.
Concept of WHILE & FOR loops, Arrays, Clusters & graphs
Concept of WHILE & FOR loops

Owning palette(s) Structures palette


Type Structure
WHILE Loop

• A While Loop is a structure you use to execute a block of LabVIEW code repeatedly until a given condition is met.

• When the VI runs, the code inside the While Loop executes, and then the terminal condition is evaluated.

• The While Loop will be a familiar concept for experienced programmers as it operates similarly in other computer

languages.

Iteration Terminal Conditional


Subdiagram— (i)—Provides the Terminal—Evaluates
Components of a Contains code that the current loop iteration a Boolean input value
While Loop While Loop executes count. The loop count to determine whether
once per iteration. always starts at zero to continue executing
for the first iteration. the While Loop
Code
• Execution speed

• While Loops execute as fast as possible and


therefore can be a cause for high CPU load.

• For this reason, While Loops should be throttled by


using the Wait (ms) function with a delay time that
is appropriate for the task.

o While Loop is a Do While Loop, because the stop condition is checked at the end of a loop, which requires the
sub-diagram to execute at least once.
o A "real" While Loop, however, would first check the stop condition and execute the sub-diagram only if the
condition is not met.
o This can be confusing to programmers that are familiar with other programming languages and that are new to
LabVIEW.
FOR Loop
A For Loop is a structure you use to execute a block of code a set number of times.

When the VI runs, the iteration count is evaluated, and then the code is executed.

A For Loop can be configured to conditionally stop code execution in addition to its iteration-based exit.

In these cases, the code will execute until the count terminal setting is reached or the condition is met – whichever
happens first.
While Loops should be used when:
• You want your code to run indefinitely
• You want to run code until a condition is met
• You want user control over when code should stop

For Loops should be used when:


• You need to run code for a certain number of times
• You want to write a set number of measurements to a file
• You want to take a certain number of data points
• You want to run code until a condition is met OR a set
number of iterations, whichever comes first
Concept of Arrays

Owning palette(s) Array palette


Type Function
Arrays

• Arrays are fundamental data structures in LabVIEW, used to store collections of elements of the same data
type.

• They're essential for handling multiple data points, processing signals, and many other tasks in virtual instrumentation.

• Key features:
 Elements: All elements in an array must be of the same data type (e.g., all numeric, all strings, etc.).
 Dimensions: The organization of the array could be:
o 1D Array: A simple list of elements, like a row or column of data.
o 2D Array: A grid or table of elements, with rows and columns.
o nD Array: Arrays with three or more dimensions (though 1D and 2D are most common).
 Index:
o Each element in an array has a unique index, which is its position within the array.
o In LabVIEW, array indexing is zero-based, meaning the first element has an index of 0, the second has an index of 1,
and so on.
Concept of Cluster

Owning palette(s) Array & Cluster palette


Type Function

A cluster is a LabVIEW data type that groups data elements of mixed types.
A cluster is similar to a record or a structure in text-based programming languages.
Types of Clusters
• A brown cluster is a Numeric Cluster data type and consists of numeric data types.
• A pink cluster is a Common Cluster data type and has a variable size because of the use of mixed data types
which can include, (for instance), strings or arrays.
• A gold/yellow cluster is used to signify an Error Cluster data type
Cluster Example

•Suppose a data acquisition

system had to read

 two temperatures

(doubles),

 the status of a cooling

fan (boolean), and

 status message (string)

for each loop iteration.


Charts and Graphs

• LabVIEW charts and graphs intuitively visualize various data types, including time series, sensor outputs, and
statistical data.

• Charts: Charts are highly suitable for visualizing dynamic, continuous, time-based, and real-time data. Waveform
charts and Strip charts are some examples of charts.

• Graphs: Graphs are the best way to display static, non-relational, and non-continuous data. XY graphs, Intensity
graphs, and 3D Graphs are a few examples of graphs.

Chart Graph
Feature Chart Graph

Appends new data points to a history


Data Handling Plots entire arrays of data at once
buffer

Display Update Scrolls to show new data Redraws the entire plot with new data

Data Input Single data points Arrays of data

Does not maintain a history in the


History Maintains a history of data points
same way

Visualizing trends over time (slow Visualizing complete datasets (fast


Use Case
processes) processes)

Charts are for displaying continuous, streaming data and showing trends over time, while graphs are for displaying
complete datasets at once.
Structures: Case, Sequence & Formula nodes
Structures: Case

• A Case Structure is a Structure that can have multiple Subdiagrams (also known as "Cases"), one of which is

selectively executed at runtime.

• A selector value determines which case is executed at runtime.

Components of a Case Structure


Case Structure with Boolean value

Case Structure with Integer value


Components of a Case Structure

• Selector label—Displays the value(s) for which the associated case executes.

• You can specify a single value or a range of values.

• You also can use the selector label to specify a default case.

• Subdiagram(case)—Contains the code that executes when the value wired to the case selector matches
the value that appears in the selector label.

• To modify the number or order of subdiagrams, right-click the border of the Case structure and select the
appropriate option.

• Case selector—Selects which case to execute based on the value of the input data.

• The input data can be a Boolean, string, integer, enumerated type or error cluster.

• The data type you wire to the case selector determines the allowed cases you can enter in the selector label.
Structures: Sequence

• The Sequence Structure is used to control the data flow in a VI's Block Diagram.

• They are used to control the order of execution of nodes that are not data dependent on each other.

• The nodes within each frame are data dependent.


Structures: Formula Node

• A Formula Node is a box where you

enter algebraic formulas directly into

the Block Diagram.

• It is useful when an equation is

complicated or has many variables.

• An example shows how you would

implement y = x^2 + x + 1 with

regular block diagram nodes or

formula nodes
Need of software-based instruments for industrial automation
• Industrial instrumentation is the technology used to measure, monitor, and control industrial processes.

• It involves the use of various instruments and systems to ensure that processes operate efficiently, safely, and

within desired parameters.

• It include following processes:

• Measurement: Accurately measuring process variables like temperature, pressure, flow rate, level, pH, and

more.

• Monitoring: Continuously observing these variables to track process performance and detect any deviations.

• Control: Taking actions to maintain process variables within desired ranges, often through automatic control

systems.
Need for software-based instruments in industrial automation

Improved Data
Increased Flexibility and Enhanced Integration and
Acquisition, Analysis, and
Customization Interoperability
Visualization

Remote Access and Advanced Control


Cost-Effectiveness
Control Strategies
Examples of Software-Based Instruments in Industrial Automation

Supervisory Control and


Programmable Logic Distributed Control Software-defined
Data Acquisition
Controllers (PLCs): (SCADA) systems: Systems (DCS): sensors:

While having a Used for Where sensor data


hardware Used for large-
controlling complex is processed and
component, their scale monitoring processes with interpreted using
core functionality and control of multiple control sophisticated
and logic are industrial processes. loops. software algorithms.
defined by software.

You might also like