You are on page 1of 18

Dr.

Mahalingam College of Engineering and Technology,


Pollachi.
(An Autonomous Institution affiliated to Anna University)
Question Paper Code : ES16118 Regulation: 2014
B.E./B.Tech., DEGREE EXAMINATION, MAY / JUNE 2017
Sixth Semester – Instrumentation and Control Engineering
140IC0604 - VIRTUAL INSTRUMENTATION
Duration: Three hours Answer ALL questions Maximum: 100 marks

PART – A (15 x 1 = 15
marks)

1. d) Local variables
2. all answers are inappropriate
3. d) A SubVI icon can be edited from the functions palette
4. c) A data buffer is created to handle data conversion
5. b) It executes atleast once
6. c) Bundle by Name
7. b) Attenuator
8. c) Digital I/O
9. c) Before MUX
10.d) GPIB

11. iteration terminal


12.Case structure can be used or we can use it in formula node
13.Waveform graph
14.Waveform chart
15.0.0390625
PART – B (5 x 2 = 10 marks)
16.What is meant by data flow programming?
Execution order is determined by the flow of the data. The node executes
when all the values available to it’s input terminal.
17.State the reason behind fixing loop iteration time.
 To reduce the CPU consumption
As untimed loop executes as fast as it can then it may consume 100% of
CPU resources
18.Define auto-indexing
For Loops and While Loops can index and accumulate arrays at their
boundaries. This is known as auto-indexing.
19.Why driver software is required for using data acquisition card?
DAQ device drivers are needed in order for the DAQ hardware to work with
a PC
20.What are the features to be considered while selecting an image acquisition
card?
Onboard memory
Fast data transfer to PC memory
Advanced triggering
Integration with data acquisition and motion control hardware
Preprocessing functions.

PART – C (1 x 15 = 15 marks)

21.(i) Explain in detail the software tools and steps involved in designing a
control system for industrial application.

Virtual Instrumentation for Industrial I/O and Control

PCs and PLCs both play an important role in control and industrial
applications. PCs bring greater software flexibility and capability, while PLCs
deliver outstanding ruggedness and reliability. But as control needs become more
complex, there is a recognized need to accelerate the capabilities while retaining
the ruggedness and reliabilities. Independent industry experts have recognized the
need for tools that can meet the increasing need for more complex, dynamic,
adaptive and algorithm-based control. The Programmable Automation Controllers
(PACs) provide multi domain functionality (logic, motion, drives and process) and
the concept of PAC supports multiple I/O types. Logic, motion and other function
integrations are a requirement for increasingly complex control approaches. PACs
deliver PC software flexibility with PLC ruggedness and reliability.

LabVIEW software and rugged, real-time, control hardware platforms are ideal for
creating a PAC.

(ii) Draw and explain the fundamental parameters of an imaging system.


The most important imaging software for LabVIEW is IMAQ Vision from
National Instruments. Years ago, Graftek developed Concept V.i, a highly modular
package of CIN-based VIs that supports image acquisition and processing with
interactive displays, file I/O, and a generally free exchange of data with the rest of
LabVIEW. In 1996, National Instruments decided that imaging technology had
reached the point where images could be acquired and manipulated just like data
from a DAQ board. It reached an agreement with Graftek, purchased Concept V.i,
and renamed it IMAQ Vision. You can now develop a flexible imaging application
with LabVIEW and IMAQ as easily as you would write a data acquisition program
with the DAQ library. Hence the name, IMaging ACquisition.

Basic graphing and simple image processing tasks are handled easily by any
of the common LabVIEW-compatible computers, even the older, lower-
performance Macs and PCs. But serious, real-time display and analysis call for
more CPU power, more memory, and more disk space. Audio and video I/O adds
requirements for specialized interface hardware that may not be included with your
average computer, though the newer multimedia-ready machines sometimes have
decent configurations. Let’s see what kinds of hardware you might consider above
and beyond your generic data acquisition system.
Computer configuration
Video I/O devices

IMAQ components
A complete IMAQ application really consists of two major parts. First
is the image acquisition driver, called NI-IMAQ, that talks to the frame
grabber. This driver, including its image acquisition boards, is free from
National Instruments. If you want to use a non-NI board, you can often
obtain driver VIs that are compatible with NI-IMAQ from Graftek. The NI-
IMAQ driver is quite similar to the NI-DAQ driver, including the use of
refnums and error I/O as common threads.

PART – D (4 x 15 = 60 marks)
22.(i) Explain Virtual Instrumentation Model and Graphical System Design
Model.
Scientific computing applications usually follow a three-step process:
data acquisition, data analysis and data visualization/presentation. This
three-step approach has been one of the pillars of the NI (National
Instruments) virtual instrumentation model as shown in Figure

GRAPHICAL SYSTEM DESIGN (GSD) MODEL


In reality, the virtual instrumentation model is applied in each of the three
phases of the graphical system design model as shown in Figure

Design (Model)
In the design phase as shown in Figure, the researcher develops a
mathematical model of the system, including sensors, actuators, plants and
controllers, and simulates them under a variety of initial conditions and
constraints. The researcher uses different numerical methods with the
objective of validating the performance of the model and optimizing it.

Prototype (Lab)
If experimental validation of the model is required, researchers develop and
test a prototype in the laboratory. Signal processing and analysis as well as
visualization can be implemented online while data is being measured and
acquired, or while the process is being controlled. The “virtual
plant/process” defined in the previous phase can be used for HIL tests.

Deployment (Field)
Finally, the model (controller, analyzer or both) is deployed in the field or
lab using either a PC (desktop, server or industrial) or PXI, or it can be
downloaded to a dedicated embedded controller such as CompactRIO,
which usually operates in stand-alone mode and in real-time (deterministic)
Mode.

(ii) Distinguish between text-based programming and Graphical


programming.

Text-based programming Graphical programming


Syntax must be known to do programming. Syntax is knowledge but is not required for
programming.
The execution of the program is from top to The execution of program is from left to right.
bottom.
To check for the error the program has to be Errors are indicated as we wire the blocks.
compiled or executed.
Front panel design needs extra coding or needs Front panel design is a part of programming.
extra
work.
Text-based programming is non interactive. Graphical programming is highly interactive.
This is text-based programming where the The programming is Data Flow Programming.
programming is a conventional method.
Logical Error finding is easy in large Logical Error finding in large programs is quiet
programs. complicated.
Program flow is not visible. Data flow is visible.
It is text-based programming. It is icon-based programming and wiring.
Passing parameters to sub routine is difficult Passing parameters to sub VI is easy.

22.(b)

(i) List the advantages and drawbacks of configuring a personal computer into a
measuring instrument.
Advantages :-

using the PC facilities like networking, computational power can use PC screen
for User interface and flexible user interface

Disadvantages:-

Single processor may be overloaded if several functions are used


simultaneously

(ii) How virtual instrumentation supports modularity in hardware and software and
explain in detail.

Input/Output plays a critical role in virtual instrumentation. To accelerate


test, control and design, I/O hardware must be rapidly adaptable to new concepts
and products. Virtual instrumentation delivers this capability in the form of
modularity within scalable hardware platforms. Virtual instrumentation is
software-based; if we can digitize it, we can measure it. Standard hardware
platforms that house the I/O are important to I/O modularity. Laptops and desktop
computers provide an excellent platform where virtual instrumentation can make
the most of existing standards such as the USB, PCI, Ethernet, and PCMCIA
buses.

Role of 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. You can also create an appropriate user interface that best suits the
purpose of the application and those who will interact with it. You 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, we 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.

An important advantage that software provides is modularity. When dealing


with a large project, engineers and scientists generally approach the task by
breaking it down into functional solvable units. These subtasks are more
manageable and easier to test, given the reduced dependencies that might cause
unexpected behavior. We can design a virtual instrument to solve each of these
subtasks, and then join them into a complete system to solve the larger task. The
ease with which we can accomplish this division of tasks depends greatly on the
underlying architecture of the software.

23.(a) (i) Justify Sub-VIs increases readability and reusability of VIs and
explain with suitable example.
The power of LabVIEW lies in the hierarchical nature of the VI. After you
create a VI, you can use it on the block diagram of another VI. There is no limit
on the number of layers in the hierarchy. Modular programming helps manage
changes and debug the block diagram quickly. Modularity defines the degree to
which your VI is composed of discrete components such that a change to one
component has minimal impact on other components. These components are
called modules or subVIs.
These modules enhances the readability and reusability

(ii) In LabVIEW, While Loop is implemented with Post Test Mode. Explain
the impact of Post Test Mode on loop execution with an example.

While loop executes at least once irrespective of stopping condition


Hence the While loop in LabVIEW is implemented in post test mode.
A While Loop executes a sub diagram until a condition is met. The While
Loop is similar to a Do Loop or a Repeat-Until Loop in text-based
programming languages.
Example:
a VI to display the numbers 1 to 10 in a Numeric Indicator using a
While Loop.

23.(b) (i) Illustrate the use of shift registers in loops with suitable example.
When programming with loops, you often need to access data from previous
iterations of the loop. For example, you may have a VI that reads the
temperature and displays it on a graph. If you want to display a running average
of the temperature as well, you need to use data generated in previous iterations.
Two ways of accessing this data include the shift register and the feedback
node.
shift register transfers any data type and automatically changes to the data
type of the first object wired to the shift register. The data you wire to the
terminals of each shift register must be the same type. You can add more than
one shift register to a loop. If you have multiple operations that use previous
iteration values within our loop, you can use multiple shift registers to store the
data values from those different processes in the structure as shown in Figure

(ii) Draw the black diagram of a VI which finds the factorial of a given
number.
24.(a) (i) Explain the need of local variables to share data between parallel
loops.

Local variables transfer data within a single VI and allow data to be passed
between parallel loops as shown

Another way is to select the Local Variable from the Structures palette.
Create the front panel and select a local variable from the Functions palette and
place it on the block diagram. The local variable node, shown as follows, is not
yet associated with a control or indicator. To associate a local variable with a
control or indicator, right-click the local variable node and select Select Item
from the shortcut menu.

Inputs pass data into a loop at the start of loop execution. Outputs pass data
out of a loop only after the loop completes all iterations. If you want the loop to
check the value of a terminal for each iteration, place the terminal inside the
loop. When you place the terminal of a front panel Boolean control inside a
While Loop and wire the terminal to the conditional terminal of the loop, the
loop checks the value of the terminal for every iteration to determine if it must
iterate. You can stop the While Loop as shown in Figure
If you place the terminal of the Boolean control outside the While Loop as
shown in following Figure , and the control is set to FALSE if the conditional
terminal is Stop if True when the loop starts, you cause an infinite loop. You
also cause an infinite loop if the control outside the loop is set to TRUE and the
conditional terminal is Continue if True. Changing the value of the control does
not stop the infinite loop because the value is only read once, before the loop
starts. To stop an infinite loop, you must abort the VI by clicking the Abort
Execution button on the toolbar.

you can create a local variable of the Boolean and control


and can read the values of the control from any location of the Block diagram.
We cannot wire a parallel loops to pass data between them. Even if we wire
then the loops will no longer run in parallel. So local variables can be used to
pass the data between two parallel loops

(ii) Draw the VI case structure and explain the working of case structure with
suitable example.
CASE STRUCTURES
A case structure executes one subdiagram depending on the input value
passed to the structure.
Complete the following steps to create a Case structure.
Step 1: Place a Case structure on the block diagram.
Step 2: Wire an input value to the selector terminal to determine which case
executes. You must wire an integer, Boolean value, string, or enumerated type
value to the selector terminal. You also can wire an error cluster to the selector
terminal to handle errors.
Step 3: Place objects inside the Case structure to create subdiagrams that the Case
structure can execute. If necessary, add or duplicate subdiagrams. If the data type
of the selector terminal is Boolean, the structure has a TRUE case and a FALSE
case. If the selector terminal is an integer, string, or enumerated type value, the
structure can have any number of cases.
Step 4: For each case, use the Labeling tool to enter a single value or lists and
ranges of values in the case selector label at the top of the Case structure. For lists,
use commas to separate values. For numeric ranges, specify a range as 10.20,
meaning all numbers from 10 to 20 inclusively. If necessary (optional), specify a
default case.

A Case structure, shown, has two or more subdiagrams, or cases.


Only one subdiagram is visible at a time, and the structure executes only one
case at a time. An input value determines which subdiagram executes. The Case
structure is similar to switch statements or if...then...else statements in text-based
programming languages. The case selector label at the top of the Case structure,
shown, contains the name of the selector value that corresponds to the case in the
center and decrement and increment arrows on each side.
Click the decrement and increment arrows to scroll through the available
cases.
You also can click the down arrow next to the case name and select a case
from the pull-down menu.
Wire an input value, or selector, to the selector terminal, shown, to
determine which case executes.
You must wire an integer, Boolean value, string, or enumerated type value to
the selector terminal. You can position the selector terminal anywhere on the left
border of the Case structure.
If the data type of the selector terminal is Boolean, the structure has a TRUE
case and a FALSE case. If the selector terminal is an integer, string, or enumerated
type value, the structure can have any number of cases.

24.(b) (i) Compare high level file functions and low level file functions with
suitable example.

BASICS OF FILE INPUT/OUTPUT


File I/O records or reads data in a file. File I/O operations pass data to and from
files. Use the file I/O VIs and functions located on the Functions»All
Functions»File I/O palette to handle all aspects of file I/O, including the
following:
● Opening and closing data files
● Reading data from and writing data to files
● Reading from and writing to spreadsheet-formatted files
● Moving and renaming files and directories
● Changing file characteristics
● Creating, modifying and reading configuration files

LabVIEW can use or create the following file formats: Binary, ASCII, LVM,
and TDM.
● Binary—Binary files are the underlying file format of all other file formats.
● ASCII—An ASCII file is a specific type of binary file that is a standard used
by most programs. It consists of a series of ASCII codes. ASCII files are also
called text files.
● LVM—The LabVIEW measurement data file (.lvm) is a tab-delimited text
file you can open with a spreadsheet application or a text-editing application.
The .lvm file includes information about the data, such as the date and time the
data was generated. This file format is a specific type of ASCII file created for
LabVIEW.
● TDM—This file format is a specific type of binary file created for National
Instruments products. It actually consists of two separate files: an XML section
contains the data attributes and a binary file for the waveform.

(ii) Explain how state machines are used in decision making.


State machines topic is not in the scope of syllabus.

These design patterns are used to execute different states (one state at a time)
based on the state transitional code the different states are executed

25.(a) (i) Draw the block diagram of a PC Based Data Acquisition Card and
explain the analog to digital conversion process.
The fundamental task of a DAQ (Data Acquisition) system is to measure or
generate real-world physical signals. Data acquisition involves gathering signals
from measurement sources and digitizing the signal for storage, analysis and
presentation on a personal computer (PC). Data acquisition systems come in
many different PC technology forms for great flexibility. Scientists and
engineers can choose from PCI, PXI, Compact PCI, PCMCIA, USB, Firewire,
parallel, or serial ports for data acquisition in test, measurement, and
automation applications.

The five components to be considered when building a basic DAQ system as


are
 transducers,
 signal conditioning,
 DAQ hardware,
 driver and application software.

(ii) Explain the significance of multiplexing and isolation in data acquisition.


A common technique for measuring several signals with a single measuring
device is multiplexing. Signal conditioning hardware for analog signals often
provides multiplexing for use with slowly changing signals like temperature.
The ADC samples one channel, switches to the next channel, samples it,
switches to the next channel, and so on. Because the same ADC samples many
channels instead of one, the effective sampling rate of each individual channel
is inversely proportional to the number of channels sampled.

Isolation
Another common signal conditioning application is isolating the transducer
signals from the computer for safety purposes. The system being monitored
may contain high-voltage transients that could damage the computer without
signal conditioning. An additional reason for isolation is ensuring that the
readings from the plug-in DAQ device are unaffected by differences in ground
potentials or common-mode voltages. When the DAQ device input and the
signal being acquired are each referenced to ‘ground’, problems occur if there is
a potential difference in the two grounds. This difference can lead to what is
known as a ground loop, which may cause inaccurate representation of the
acquired signal; or if the difference is too large, it may damage the
measurement system. Using isolated signal conditioning modules eliminates
ground loops and ensures that the signals are accurately acquired.

25.(b) (i) Compare RS-232, RS-422 and Rs-485 in terms of communication


mode, cabling, distance covered, number of drivers and receivers, maximum
data rate and type of signaling.

RS-232 (ANSI/EIA-232 Standard) is used for many purposes such as


connecting a mouse, printer, or modem. It is also used with industrial
instrumentation. Because of improvements in line drivers and cables,
applications often increase the performance of RS-232 beyond the distance and
speed in the standards list. RS-232 is limited to point-to-point connections
between PC serial ports and devices. RS-232 is the connector found on most
PCs. This is a single-ended communication method where only one device can
be connected per port. Two connector types are 9 or 25-pin. Two configurations
are DCE or DTE.
● RS-422 (AIA RS-422A Standard) uses a differential electrical signal as
opposed to the unbalanced (single-ended) signals referenced to ground with RS-
232. Differential transmission, which uses two lines each to transmit and
receive signals, results in greater noise immunity and longer transmission
distances as compared to RS-232. RS-422 is the Connector found on most
Macs. This is a differential communication method. Connector has 8 pins.
● RS-485 (EIA-485 Standard) is a variation of RS-422 that allows you to
connect up to 32 devices to a single port and define the necessary electrical
characteristics to ensure adequate signal voltages under maximum load. With
this enhanced multidrop capability, you can create networks of devices
connected to a single RS-485 serial port. The noise immunity
and multidrop capability make RS-485 an attractive choice in industrial
applications that require many distributed devices networked to a PC or other
controller for data collection and other operations

(ii) Justify with appropriate example, while configuring a measurement


application, if the input range is fixed to a smaller value, the signal is precisely
represented.

The DAQ Assistant is a graphical interface for interactively creating,


editing, and running NIDAQmx virtual channels and tasks. A NI-DAQmx
virtual channel consists of a physical channel on a DAQ device and the
configuration information for this physical channel such as input range and
custom scaling. A NI-DAQmx task is a collection of virtual channels, timing
and triggering
information, and other properties regarding the acquisition or generation. DAQ
Assistant provides an interactive guide to configuring, testing and acquiring
measurement data. With a single click, you can even generate code based on
your configuration, making it easier and faster to develop
complex operations. DAQ Assistant is completely menu-driven and you will
encounter fewer errors. It drastically decreases the time to your first
measurement.
Step 1: Open LabVIEW and create a New VI. Switch to the block diagram
(Ctrl+E).
Step 2: DAQ Assistant Express VI is located in the Input subpalette of the
Functions palette . Place the DAQ Assistant on the block diagram by dragging
and dropping it from the Functions palette. The Assistant should automatically
launch when you drop the VI on the diagram.
Step 3: It is also available at Express>>Output>>DAQ Assistant. In the
Advanced Functions palette, the DAQ Assistant Express VI is located in the NI
Measurements >> DAQmx sub-palette . The Create New window opens up for
task configuration when the DAQ Assistant is placed on the block diagram.
Measurement type can be Analog Input, Analog Output, Counter Input, Counter
Output and Digital I/O.

Once you have located the DAQ Assistant Express VI in the appropriate
location, select it from the palette and drop it on the block diagram of your VI. By
default, the properties page should pop up, allowing you to configure your task.
The first step is to select your type of measurement.

Create the Task

The analog input task is specific to the measurement. For other measurement
and signal generation types, you would follow similar steps.

Step 1: On the first screen, select Analog Input for your Measurement Type.

Step 2: Next, select Voltage.

Step 3: The next screen lets you select the physical channel (or channels) for
which you are creating this task. All supported data acquisition hardware devices
should appear in the tree control and you can expand them to view a list of the
physical channels that you can select for your task. To select more than one
channel, hold down the Ctrl button while clicking on the channel names.

Step 4: Click Finish to move on to the configuration stage


Test the Task

You can use test panels in the DAQ Assistant to test the task and make sure you
connected the sensors properly. There is a test panel for each type of measurement.
Complete the following steps to test the task.

Step 1: Launch the test panel for your task by clicking the Test button at the top
of the screen.

Step 2: The test runs once automatically. Click the Start button to run the test
again. Notice that the graph displays the acquired signal.

Step 3: Click the Close button when you are done. If necessary, modify the
settings for the task and retest the task.

Step 4: After the test panel closes, click the OK button. The DAQ Assistant
saves the voltage task, containing all the configuration information you entered, to
MAX. You have created your voltage task.

You might also like