Professional Documents
Culture Documents
LAbview Reprot
LAbview Reprot
ON
VIRTUAL INSTRUMENT
BY
GAJENDER SINGH
I am also very thankful to Dr. Shashikant S. Sadistap (Scientist ‘EII’), Mr. Santosh
Kumar (Scientist ‘B’)
I would also like to take the opportunity to thank all other AEG group members for their
timely help during my project work.
GAJENDER SINGH
CEERI :
Central Electronics Engineering Research Institute (CEERI), Pilani, Rajasthan, is a
pioneer research institute in the country and a constituent laboratory of Council of
Scientific and Industrial Research (CSIR), New Delhi. Late Prime Minister Pt. Jawaharlal
Nehru laid the foundation stone of the Industry on September 21, 1953 for advanced
Research and Development (R&D) in the field of Electronics. Since its inception, it has
been working for the growth of electronics in the country and has established the required
infrastructure and well-experienced manpower for undertaking R&D in the major areas:
Microwave Tubes
Opto-electronics Devices
Electronic System Area
MEMS & Sensors.
The main objective of the Electronic Systems Area (ESA) is to provide complete system
level solutions to Indian industry. CEERI has entered several key sectors viz. Agro-based
and process Control Industries, energy, transportation, consumer electronics, speech and
telephony etc. and developed field proven technologies during last two decades. Currently
the emphasis is being laid in modernizing these core sector Industries. The scientists of
this area closely interact with industry, academic institutions and have international
collaborative projects with counterparts from Australia, Germany, Italy, UK, and USA.
CEERI has, under one roof, an advanced comprehensive program of development for
power Semiconductor devices as well as Application specific Integrated Circuits and
Electronic Systems for various applications.
The major R&D programs of CEERI can be categorized into three major areas;
microwave tubes, semiconductor devices and electronics systems. In the area of
microwave tubes the major focus is on communication tubes and industrial tubes. In the
area of semiconductor devices, projects are being actively pursued on IC design, power
devices, device processing, microwave devices, hybrid microchips, opto-electronic
devices and semi-conductor materials. R&D work in the area of electronics systems is
focused on digital systems, agri electronics, speech technology, industrial electronics,
instrumentation systems and communication engineering.
CSIR :
The Council of Scientific & Industrial Research (CSIR) --the premier industrial R&D
organization in India was constituted in 1942 by a resolution of the then Central
Legislative Assembly. It is an autonomous body registered under the Registration of
Societies Act of 1860. CSIR aims to provide industrial competitiveness, social welfare,
strong S&T base for strategic sectors and advancement of fundamental knowledge.
It presents Science and Technology with a human face and emphasizes realities such
as facing open, global competition; need for examining social, economic and
environmental consequences of S&T; and, aggressive international benchmarking and
innovation.
Today CSIR is recognized as one of the world largest publicly funded R&D
organizations having linkages to academia, R&D organizations and industry. CSIR’s 38
laboratories not only knit India into a giant network that impacts and add quality to the
life of each and every Indian but CSIR is also party to the prestigious Global Research
Alliance with the objective of applying global knowledge pool for global good through
global funding. CSIR’s R&D portfolio embraces areas as diverse as Aerospace,
Biotechnology, and Chemicals…indeed, almost the entire Indian Science!
CHAPTER 1: INTRODUCTION
VIRTUAL INSTRUMENTATION
A virtual instrument (VI) has three main parts: the Front Panel, the Block Diagram, and the
Icon/Connector. The Front Panel specifies the user interface of the VI. The Block Diagram
consists of the executable code that is created using nodes, terminals, and wires. The
structure of VIs is as follows.
The interactive user interface of a VI is called the Front Panel, because it simulates
the panel of a physical instrument. The Front Panel can contain knobs, push
buttons, graphs, and other controls and indicators.
The VIs receives instructions from a Block Diagram, which is constructed in G. The
Block Diagram is a pictorial solution to a programming problem. The block diagram is
also the source code for the VI.
VIs are hierarchical and modular. VIs can be used as top-level program, or as
subprograms within other programs. A VI within another VI is called a sub VI. The icon
and connector of a VI work like a graphical parameter list so that other VIs can pass
data to sub VI.
The user interface of a VI is like the user interface of a physical instrument, i.e. the Front
Panel. A feasible Front Panel for a VI is shown in the figure on the next page.
Both the Front Panel and the Block Diagram have identical menu bars and tools icons except
that for Front Panel there is a Controls menu while for Block Diagram there is a Functions
menu. Controls menu contributes to control and indicators; they represent the input
parameters and output values respectively. Functions menu contributes to functions used to
The diagram window holds the Block Diagram of the VI, which is the graphical source code
of a VI. The Block Diagram is generally constructed by adding together objects that send or
receive data (Controls and Indicators), perform specific functions, and control the flow of
execution. The following simple VI computes the sum of and difference between two
numbers. The diagram shows several primaries block diagram objects like nodes, terminals
and wires etc. As is evident from the figure, both the Front Panel and the Block Diagram can
be observed and manipulated at the same time.
The ‘Add’ and ‘Subtract’ function icons in the given figure also have terminals. The terminals
can be considered as entry and exit ports. Data that is entered into the controls (‘a’ and ‘b’)
exits the Front Panel through the control terminals on the Block Diagram. The data then
enters the ‘Add’ and ‘Subtract’ functions. When these functions complete their internal
calculations, they produce new data values at their exit terminals. The data flows to the
indicator terminals and reenter the Front Panel, where it is displayed. Terminals that produce
data are referred to as Data Source terminals and terminals that receive data are Data Sink
terminals.
Nodes are program execution elements. They are analogous to statements, operators,
functions, and subroutine in conventional programming languages. The ‘Add’ and ‘Subtract’
Another type of node is a ‘Structure’. Structures are graphical representations of the loops
and Case statements of traditional programming languages. The G programming language
also has nodes for linking to external text based codes and for evaluating text based formula.
Wires are the data paths between sources and sink terminals. These are analogous to the
wiring done in physical systems. A source terminal cannot be wired to another source, nor
can a sink terminal be wired to another sink. However, one source can be wired to one or
more sinks. In layman’s language, each wire is of different style and color. Technically
speaking, each wire is specific to data types, i.e. depends on the type of value that flows
through the wire. In the previous figure the wire style for a numeric scalar value is shown as a
thin, solid line of Orange color.
Dataflow is the principle that governs G program execution. Stated simply, a node only
executes when all data inputs arrive; the node supplies data to all of its output terminals
when it finishes executing, the data immediately passes from source to sink terminals.
Dataflow programming contrasts with the control flow method of executing a conventional
program, in which instructions are executed in the sequence in which they are written. The
control flow execution is instruction driven whereas the dataflow execution is data driven or
data dependent.
Every VI has a default icon displayed in the upper-right corner of the Front Panel and Block
Diagram windows. For VIs, the default is the LabVIEW VI icon and a number indicating how
many new VIs have been opened since launching LabVIEW. The Icon Editor can be used to
customize the icon by turning individual pixels ON or OFF. To use a VI as a sub VI to another
Basically, the connector is a set of terminal that corresponds to the sub VI controls and
indicators. The icon is either the pictorial representation of the purpose of the VI, or a textual
description of the VI or its terminals.
The connector is much like the parameter list of a function call; the connector terminals acts
like parameters. Each terminal corresponds to a particular control or indicator on the Front
The connector generally has one terminal for each control or indicator on the front panel. Up
to 28 terminals can be assigned. If it is anticipated that future changes to the VI might require
a new input or output, some extra terminal may be left unconnected. An example is as shown
in the figure
Any VI that has an icon and a connector can be used as a sub VI in another VI. If a VI is
opened that does not have an icon and a connector, a blank, square box appears in the
calling VI's Block Diagram and wiring cannot be done to this node.
As an example, if it is required that an input value will be checked and if it is not less than 0,
then initial value of factorial is set on 1 whereas if the value is greater than 0, then the
factorial for the value given as input will be displayed. This can be easily achieved by using a
‘Case Structure’ (one of the most essential programming tools) and checking the input value
at the start of the loop execution. If the condition is false (i.e. input value is greater than 0),
then the factorial is calculated and displayed along with a message that the work has been
successfully completed. But if the condition is true (i.e. input value is less than 0), the factorial
value would is set to 0 with a warning message saying that input should be greater than 0.
The figure for both the conditions is as on the next page.
"True" condition
An Icon can also be created, within a sub VI, with one input and two outputs, one for result
and one for message. LabVIEW offers its own tool for icon drawing.
It is possible to create a new virtual instrument that will contain a created virtual instrument
for factorial calculating. The created virtual instrument is as given in the figure below.
Every VI displays an icon, 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 a VI is used as a sub VI, the icon identifies the sub VI on the block
diagram of the VI.
Custom icons can be created to replace the default icon for better comprehension of the
objective achieved by the VI. The normal size image of the icon appears in the appropriate
box to the right of the editing area, as shown in the dialog box in figure1.
The file system can be used to manage them (copying, moving, renaming, backing up,
and managing source code).
VI hierarchy cannot be practiced within a VI library – VI libraries can’t contain
subdirectories or folders.
Loading and saving files are faster from the file system than from VI libraries as less
disk space is required for temporary files during the load and save processes.
Storing VIs and controls in individual files is more robust than storing the entire project
in the same file.
VI libraries are not compatible with the source code controls in the some developer
toolkits.
A toolbar in the hierarchy window contains buttons affecting the display of the window. This is
generally useful for better perception of VIs, sub VIs and the way in which they interact.
Buttons performing some of the same actions in the View menu, are described as follows
Redo Layout: This feature redraws the windows layout to minimize line crossings and
maximize symmetry, which is useful after successive operations on hierarchy nodes. If
a focus node exists, the windows scroll to show that node. If no focus node exists, the
window scrolls the first root of sub VIs.
Vertical Layout: This feature arranges the nodes from top to bottom with the
calling VIs above their sub VIs.
Horizontal Layout: This is similar to Vertical layout but it arranges the nodes from left
to right with the calling VIs to the left of their sub VIs.
Include VI Lib: This feature toggles the hierarchy window to include or exclude VIs in
vi.lib.
Include Global: This feature toggles the hierarchy window to include or exclude global
variables if they are used anywhere in the VIs or sub VIs.
Include type definitions: This feature toggles the hierarchy window to include or
exclude type definitions if they are used anywhere in the VIs and sub VIs.
G is the easy to use graphical data flow programming language on which LabVIEW is based.
G simplifies scientific computation, process monitoring and control, and test and
measurement applications, and it can also be used for a wide variety of other applications.
LabVIEW provides tools for data visualization, user interface design, web publishing, report
generation, data management, and software connectivity.
LabVIEW programs are called virtual instruments (VIs) because their appearance and
operation can imitate physical instruments such as oscilloscopes and millimeters. However,
The VIs contains three components-the Front Panel, the Block Diagram, and the Icon and
Connector pane. The latter may represent the VI as a subVI in Block Diagrams of calling VIs.
Controls and indicators on the Front Panel allow an operator to input data into or extract data
from a running virtual instrument. However, the Front Panel can also serve as a
programmatic interface. Thus a virtual instrument can either be run as a program, with the
Front Panel serving as a user interface, or, when dropped as a node onto the Block Diagram,
the Front Panel defines the inputs and outputs for the given node through the connector
pane. This implies each VI can be easily tested before being embedded as a subroutine into
a larger program.
Dataflow programming
Graphical programming
Benefits
The programming language used in LabVIEW, called "G", is a dataflow language. Execution
is determined by the structure of a graphical block diagram (the LV-source code) on which
the programmer connects different function-nodes by drawing wires. These wires propagate
variables and any node can execute as soon as all its input data become available. Since this
might be the case for multiple nodes simultaneomely, "G" is inherently capable of parallel
execution. Multi-processing and multi-threading hardware is automatically exploited by the
built-in scheduler, which multiplexes multiple OS threads over the nodes ready for execution.
The above figure is shows the Block Diagram and Front Panel simple LabVIEW program that
generates, synthesizes, analyzes and displays waveforms. Each symbol on the Block
LabVIEW is a graphical language and is used for description of connections and relations
between objects in block diagram. G language is different then textual language in many
ways. First of all, program is executed linearly, meaning one by one command. The next
command is executed after the previous has been finished, meaning that only one command
is being executed at a time. It has different characteristics. Since it is graphical language,
linearity is excluded. One graphical block can be executed only when its inputs are defined or
determined. That means it is possible to create a diagram with a few parallel branches, thus
realizing simultaneous execution of numerous operations at the same time.
It is a complete programming language and offers usual structures, such as for and while
loops, case structure, and a novelty which is not characteristic for text- oriented languages
called sequence structure, which allows linear execution of certain parts of the program. That
is very useful in situations similar to those when first some data is to be sent to certain
instrument, and then wait for a while and act accordingly.
Data types are presented with different colors and different shapes of connecting lines. Blue
color presents integer, orange - float, purple - character, green - Boolean, etc. User defined
types are presented with some other colors.
The graphical approach also allows non-programmers to build programs by simply dragging
and dropping virtual representations of the lab equipment with which they are already
familiar. The LabVIEW programming environment, with the included examples and the
documentation, makes it easy to create small applications. The most advanced LabVIEW
development systems offer the possibility of building stand-alone applications.
G language/ Visual programming language (VPL) is any programming language that lets
users specify programs by manipulating program elements graphically rather than by
specifying them textually. A VPL allows programming with visual expressions, spatial
VPLs may be further classified, according to the type and extent of visual expression used,
into icon-based languages, form-based languages, and diagram languages. Visual
programming environments provide graphical or iconic elements which can be manipulated
by users in an interactive way according to some specific spatial grammar for program
construction.Naturally visual languages have an inherent visual expression for which there is
no obviome textual equivalent.
2.2.2.3 BENEFITS: -
Some of the benefits of LabVIEW over other development environments are given as
follows:
'
(1) Rahman Jamal and Herbert Pichlik, LabVIEW Applications and Solutions.
National Instruments Virtual Instrumentation
(2)User Manual for LabVIEW (National Instruments
(3) Functions and VI Reference Manual (National Instruments)
(4) Data Acquisition Basics Manual
(5) PISO-813HG User’s Manual (High-performance Multifunction DAS Cards)
(6) PIO-821 User’s Manual (Wiring Terminal Board)
PLATFORM: - Window XP