0% found this document useful (0 votes)
5 views39 pages

Key Paper Vi Subject

The document outlines the B. Tech III Year II Semester Regular Examinations for May 2025 in the subject of Virtual Instrumentation, detailing key concepts and components of LabVIEW. It covers topics such as the differentiation between front panels and block diagrams, the use of arrays, data acquisition, and the importance of debugging tools. Additionally, it compares virtual and traditional instruments, discusses communication standards like RS-232C and RS-485, and explains the GPIB communication bus in virtual instrumentation.

Uploaded by

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

Key Paper Vi Subject

The document outlines the B. Tech III Year II Semester Regular Examinations for May 2025 in the subject of Virtual Instrumentation, detailing key concepts and components of LabVIEW. It covers topics such as the differentiation between front panels and block diagrams, the use of arrays, data acquisition, and the importance of debugging tools. Additionally, it compares virtual and traditional instruments, discusses communication standards like RS-232C and RS-485, and explains the GPIB communication bus in virtual instrumentation.

Uploaded by

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

Name of the examination: B.

Tech III Year II Sem Regular Examinations MAY-2025


Subject: Virtual Instrumentation
Regulation: R22
Branch: Electronics & Instrumentation Engineering
-----------------------------------------------------------------------------------------------------------------------------

KEY PAPER

PART-A
1. What is LabVIEW, and why is it used in Virtual Instrumentation?
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a graphical programming
environment developed by National Instruments. It is widely used in Virtual Instrumentation for
developing test, measurement, and control systems using a visual dataflow programming
approach, allowing users to build custom interfaces and automate hardware control.
2. Differentiate between the front panel and block diagram in LabVIEW.
The front panel is the graphical user interface of a VI, where users interact with controls (inputs)
and indicators (outputs). The block diagram is the code workspace where graphical programming
structures and functions are wired together to define program logic.
3. List two advantages of using arrays in LabVIEW.
 Arrays allow efficient storage and manipulation of multiple data elements using a single
variable.
 Built-in functions like auto-indexing and array math operations make data processing
simpler and faster.
4. What is the purpose of string operations in LabVIEW?
String operations in LabVIEW are used for handling and formatting textual data, such as
converting numbers to strings, parsing sensor data, creating file headers, or communicating with
instruments using command strings.
5. What is PCMCIA, and where is it used?
PCMCIA (Personal Computer Memory Card International Association) defines standards for
peripheral interface cards, mainly used in laptops. In virtual instrumentation, PCMCIA cards are
used to connect data acquisition modules and instruments to computers.
6. Define VISA in the context of instrument communication.
VISA (Virtual Instrument Software Architecture) is a standardized I/O interface protocol provided
by NI for communicating with instruments via interfaces like GPIB, USB, Serial (RS-232/RS-
485), and Ethernet. It simplifies communication regardless of the hardware interface used.
7. List two applications of state machine architecture.
 Designing control systems like traffic lights or process controllers, where the system moves
through a defined set of states.
 Implementing interactive user interfaces that respond to events such as button presses or user
inputs.
8. Differentiate between a producer and a consumer in LabVIEW.
In the Producer/Consumer architecture, the producer loop collects or generates data (e.g., from
rrtsensors or user inputs), and the consumer loop processes or displays that data. This design helps
in running acquisition and processing in parallel for better performance and responsiveness.
9. What is Data Acquisition (DAQ)?
Data Acquisition (DAQ) refers to the process of sampling real-world physical signals (like
temperature, voltage, pressure) and converting them into digital signals that a computer can
analyze, display, or store.
10. List two key components of a DAQ system.
 Sensors/Transducers – Convert physical parameters (e.g., temperature, pressure) into electrical
signals.
 DAQ Hardware/Interface Card – Converts analog signals into digital data and communicates
with the software (LabVIEW) for further processing.

PART-B
11 (a) Explain the front panel and block diagram of LabVIEW with an example.
11 (b) Compare Virtual Instruments with Traditional Instruments based on architecture, flexibility,

Traditional Instruments Virtual Instruments

Vendor-defined User-defined

Function specific, Stand alone with limited Application oriented system with connectivity
connectivity to networks, peripherals, and applications

Hardware is the key Software is the key.

Closed, fixed functionality Open, flexible functionality leveraging off


familiar computer technology.

Slow turn on technology (5-10 years life cycle) Fast turn on Technology (1-2 years life cycle)

Minimal economics of scale Maximum economics of scale

High development and maintenance costs Software minimizes development and


maintenance cost.
Architecture of a virtual instrumentation.

A virtual instrument is composed of the following blocks


 Sensor module
 Sensor interface
 Information systems interface
 Processing module
 Database interface

12 (a) Explain the importance of debugging tools in LabVIEW. Provide examples.

Three of the most commonly used and essential debugging tools in LabVIEW are:

Highlighting Execution:
 View an animation of the execution of the block diagram by clicking the Highlight Execution
button, shown at left. Execution highlighting shows the movement of data on the block diagram
from one node to another using bubble that move along the wires. Use execution highlighting in

 Conjunction with single stepping to see how data move from node to node through a VI.

Probe Tool:
 Use the Probe tool, shown at left, to check intermediate values on a wire as a VI runs. Use the
Probe tool if you have a complicated block diagram with a series of operations, any one of
which might return incorrect data.
 Use the Probe tool with execution highlighting, single-stepping, and breakpoints to determine if
and where data are incorrect. If data are available, the probe immediately updates during single-
stepping or when you pause at a breakpoint.
 When execution pauses at a node because of single-stepping or a breakpoint, you also can probe
the wire that just executed to see the value that flowed through that wire.

Breakpoints:
 Use the Breakpoint tool, shown at left, to place a breakpoint on a VI, node, or wire on the block
diagram and pause execution at that location. When you set a breakpoint on a wire, execution
pauses after data pass through the wire. Place a breakpoint on the block diagram to pause
execution after all nodes on the block diagram execute.

 When a VI pauses at a breakpoint, LabVIEW brings the block diagram to the front and uses a
marquee to highlight the node or wire that contains the breakpoint. When you move the cursor
over an existing breakpoint, the black area of the Breakpoint tool cursor appears white. When
you reach a breakpoint during execution, the VI pauses and the Pause button appears red.

12 (b) Analyze the advantages of using Sub-VIs in LabVIEW. How do they improve modularity?

Definition: A Sub-VI (Sub Virtual Instrument) in LabVIEW is a VI (Virtual Instrument) that is used
as a component inside another VI. It functions similarly to a function or subroutine in text-based
programming languages. Sub-VIs allow developers to break down a complex program into smaller,
more manageable parts, each performing a specific task.
 A Sub-VI has its own block diagram and front panel.
 It is connected to the main VI through connector panes, which define the inputs and outputs of
the Sub-VI.
 Sub-VIs improve modularity, reusability, and maintainability by allowing common tasks to be
reused across multiple VIs.
 They can be used to encapsulate logic, data processing, or any other task that needs to be
repeated in the application.
Example VI of Temp in Fahrenheit to Centigrade
13 (a) Develop an example with the working of a Case Structure.
Any program students can choose:

Front panel with ZERO display

Block Diagram connections for ZERO display


13 (b) Analyze the differences between local and global variables in LabVIEW. Which one is
preferable?
LOCAL & GLOBAL VARIABLES:
Local Variable allows to read or write to a control or indicator on the front panel.
 It allows to force a control’s value with the code, or use an indicator to store data.
 It can store all types of data, such as numeric values, strings, T/F values, or arrays.
 Local variables transfer data within a single VI and allow data to be passed between parallel
loops as shown in Fig. 1. They also break the dataflow programming paradigm. Two ways to
create a local variable are right-click on an object’s terminal and select Create»Local Variable.

Local variable
Global variables are built-in LabVIEW objects. It can be use variables to access and pass data among
several VIs that run simultaneously.
 A Global variable is identical in function to a local variable. The difference between them is
where the data is saved.
 A global variable is used to pass information from one VI to another Global variable is located
under structure
 The global variable only has a front panel with no block diagram
 If a certain data type is needed, the indicator representation must be changed within the Global
Variable VI.

 A local variable shares data within a VI; a global variable also shares data, but it shares data
with multiple VIs.
 Local variables allow data to be passed between parallel loops. Global variables allow data to be
passed between VIs.
 A local variable saves the data to the front panel of the VI that it’s in; this
makes them only be useable in that VI.

Local variables Global variables


Limited to a single VI Accessible across multiple VIs within the same
project.

Used for transferring data within the same VI Used for sharing data across multiple VIs

Not thread-safe; can cause data corruption if Not thread-safe; can lead to data races if accessed
accessed simultaneously by multiple loops concurrently by multiple VIs

Faster for data transfer within a single VI Slower due to overhead of inter-VI
communication

Easier to debug within a single VI, but More challenging to debug due to the widespread
excessive use can lead to code clutter effects on multiple VIs

Ideal for managing data within a single VI Best suited for inter-VI communication when
sharing data

 Local Variables are generally preferable for data transfer within a single VI as they have better
performance and simpler implementation. They are also safer in terms of avoiding unintended
cross-VI data manipulation.
 Global Variables should be used sparingly. They are appropriate when data needs to be shared
across multiple VIs, but they can lead to global state issues and potential data conflicts,
especially in multi-threaded applications.
14 (a) Explain with a simple example. How do graphs and charts differ in LabVIEW?

In LabVIEW, graphs and charts are both used to display data, but they serve different purposes and
handle data in distinct ways. A graph is typically used for displaying static or batch data, where all the
data points are available at once. For instance, when you have a complete set of data, such as
temperature readings over a 24-hour period, you pass the entire dataset to the graph. It plots all the
points at once and presents the data in a single view. After the graph is updated, it remains static until
the next complete set of data is provided.
A chart is used for displaying dynamic data that changes over time. Charts are ideal for real-time
monitoring, where new data points are added incrementally. For example, if you are measuring the
temperature in a room every minute, you would pass each new temperature reading to the chart. The
chart adds each new data point while retaining the previous ones, making it suitable for displaying
trends over time. Unlike a graph, a chart continuously updates as new data arrives, showing a real-time
representation of how the data evolves.
The difference between graphs and charts is that graphs are used for static datasets where all the data is
available at once, while charts are used for dynamic data that is updated incrementally over time,
making them ideal for real-time data visualization.
Front panel

14 (b) Describe how loops work in LabVIEW with an example of a While Loop.

In LabVIEW, loops are used to execute a section of code repeatedly, which is essential for tasks like
monitoring sensors, updating displays, or performing calculations continuously. The two primary types of
loops in LabVIEW are the While Loop and the For Loop. Among these, the While Loop is most commonly
used when the number of iterations is not known in advance and the loop should continue running until a
specific condition is met.

A While Loop in LabVIEW functions similarly to while loops in text-based programming languages. It
repeatedly executes the code inside it as long as a given condition is false. Once the condition becomes
true the loop stops execution. The loop structure includes two main components: the loop body where the
code runs and a stop condition terminal, usually controlled by a Boolean control like a "Stop" button.

The below figures represents “Stop if True” & “Continue if True”


15 (a) Describe RS-232C and RS-485 in detail. Compare their advantages and applications.

RS-232C and RS-485 are two widely used serial communication standards in industrial and
instrumentation systems, including Virtual Instrumentation with LabVIEW. Both are used to transmit data
between devices, but they differ in terms of electrical characteristics, distance, speed, and network
topology.

RS-232C (Recommended Standard 232C)

RS-232C is one of the oldest and most commonly used serial communication protocols. It is designed for
point-to-point communication—typically between a computer (DTE) and a peripheral device (DCE) like a
modem or instrument. It uses single-ended signaling, where data is transmitted over one wire relative to a
ground wire.

 Signal lines include Tx (Transmit), Rx (Receive), and Ground, along with optional control lines
like RTS, CTS, DTR, and DSR.

 Maximum cable length is around 15 meters (50 feet).

 Data rate is typically up to 115.2 kbps.

 It is simple to implement and widely supported in legacy systems and lab equipment.

RS-485 (Recommended Standard 485)


RS-485 is a more advanced standard used for multi-point or networked communication. It supports
differential signaling, which allows data to be transmitted over longer distances and at higher speeds with
better noise immunity.

 RS-485 supports up to 32 devices on the same bus (multi-drop configuration).

 It allows a cable length of up to 1.2 km (4000 feet).

 Data rates can reach up to 10 Mbps depending on distance.

 It uses twisted pair wiring, which improves resistance to electrical noise, making it ideal for
industrial environments.

15.(b) How does GPIB facilitate communication in Virtual Instrumentation?

GPIB bus is the one of parallel communication bus. The HP-IB specification permits up to 15
devices (shown in below fig-3.9) to be connected together in any given setup, including the
controller if it is part of the system. Each device on the bus should have a unique address in the
range of 0-30. The maximum length of the bus network is limited to 20 meters total
transmission path length. It is recommended that the bus be loaded with at least one instrument
or device every 2-meter length of cable (4 meters is maximum). The use of GP-IB extenders
may be used to exceed the maximum permitted length of 20 meters.

Electrical Interface:
Interfacing of devices to PC through GPIB bus

The GP-IB is a bus to which many similar modules can be directly connected, as is shown in
Figure 1. A total of 16 wires are shown in the figure - eight data lines and eight control lines (3-
handshaking signals and 5 management signals). The bus cables have 24 wires, providing eight
additional for shielding and grounds.

The GP-IB defines operation of a three-wire handshake that is used for all data transfers on the
bus. The bus operation is asynchronous in nature. Each transaction carries 8 bits, the maximum
data bandwidth is on the order of 4 to 8 megabits (1 M byte) per second. The bus is a two-way
communications channel and data flows in both directions. Below figure-3.10 illustrates the
structure of the GP-IB bus and identifies the 16 connections of the interconnecting cable.

GPIB Devices can be Talkers, Listeners, and/or Controllers. A Talker sends data messages to
one or more Listeners, which receive the data. The Controller manages the flow of information
on the GPIB by sending commands to all devices. A digital voltmeter, for example, is a Talker
and is also a Listener.
GPIB
Instrumentation
Bus Structure
Three lines asynchronously control the transfer of message bytes between devices. The process is
called a 3-wire interlocked handshake. It guarantees that message bytes on the data lines are sent and
received without transmission error.
• NRFD (not ready for data) – Indicates when a device is ready or not ready to receive a message
byte. The line is driven by all devices when receiving commands, by Listeners when receiving data
messages, and by the Talker when enabling the HS488 protocol.

• NDAC (not data accepted) – Indicates when a device has or has not accepted a message byte. The
line is driven by all devices when receiving commands, and by Listeners when receiving data
messages.
DAV (data valid) – Tells when the signals on the data lines are stable (valid) and can be accepted
safely by devices. The Controller drives DAV when sending commands, and the Talker drives DAV
when sending data messages.
GPIB instrument control set up

16.(a) Discuss the role of PXI in industrial and laboratory automation.

PXI (PCI eXtensions for Instrumentation) is a modular platform developed by National


Instruments for high-performance measurement and automation systems. It is based on the
standard PCI architecture and combines it with CompactPCI mechanical design and real-time
synchronization features, making it ideal for use in both industrial and laboratory
environments.

Role in Industrial Automation:

In industrial automation, PXI systems are used for real-time monitoring, control, and
automated testing of manufacturing equipment and processes. PXI offers rugged and
compact hardware that can withstand harsh conditions like vibration, temperature changes,
and dust. PXI modules can be used to control machinery, test electronic components, monitor
sensors, and automate quality control. It supports various I/O modules such as analog
input/output, digital I/O, motion control, and vision systems, enabling flexible and precise
control of industrial processes.

Role in Laboratory Automation:


In laboratory environments, PXI plays a critical role in automated testing, data acquisition,
and research applications. It provides high-speed and high-accuracy measurements using
modular instruments like PXI-based oscilloscopes, function generators, and signal analyzers.
PXI allows researchers and engineers to integrate various measurement devices into a single
chassis and control them using LabVIEW software. This leads to faster test development,
reduced setup time, and repeatable test conditions—all essential for research and
experimental automation.

 High Speed and Precision: PXI delivers deterministic and low-latency performance
suitable for time-critical applications.

 Synchronization: PXI systems support hardware-level synchronization of multiple


instruments using a shared trigger and timing bus.

 Scalability: Multiple PXI modules can be added to expand the system based on
testing or automation requirements.

 Integration with LabVIEW: PXI seamlessly integrates with LabVIEW, enabling


graphical programming, instrument control, and data analysis from a single
environment.

16.(b) Describe the architecture and working of PXI system controllers.

PCI eXtensions for Instrumentation (PXI) is a modular instrumentation platform


originally introduced in 1997 by National Instruments. PXI is promoted by the 69-
member PXI Systems Alliance (PXISA), whose sponsor members are (in
alphabetical order) ADLINK, Cobham Wireless, Keysight Technologies, Marvin
Test Solutions, National Instruments, Pickering Interfaces and Teradyne.

PXI platforms are used as a basis for building electronic test equipment, automation
systems, and modular laboratory instruments. PXI is based on industry-standard
computer buses and permits flexibility in building equipment.

The benefits of PXI-based DAQ systems include rugged packaging that can
withstand the harsh conditions that often exist in industrial applications. PXI
systems also offer a modular architecture, which means that you can fit several
devices in the same space as a single stand-alone instrument, and you have the
ability to expand your system beyond the capacity of a desktop computer with a
PCI bus. One of the most important benefits of PXI offers is its integrated timing
and triggering features. Without any external connections, multiple devices can
be synchronized by using the internal buses resident on the back plane of a PXI
chassis.

Fig.PXI Timing and Triggering Buses – PXI combines industry-standard PC


components, such as the PCI bus, with advanced triggering and synchronization
extensions on the backplane.

17 (a). Explain the working of an event-driven application in LabVIEW.

In LabVIEW, an event-driven application is a type of program that responds to user actions


or system-generated events, such as clicking a button, changing a control value, or closing a
window. Instead of continuously polling for input (which consumes CPU resources), event-
driven programming waits for events and executes specific code only when those events
occur. This model enhances efficiency and responsiveness in user interfaces and real-time
applications.
Working Principle: The core of an event-driven application in LabVIEW is the Event
Structure, which is placed inside a While Loop. The Event Structure monitors user-defined
controls or indicators for specific events like "Value Change", "Mouse Down", "Mouse
Leave", etc.

When a defined event occurs (e.g., the user clicks a "Start" button), the event structure
detects it and executes the corresponding case inside the structure. Each event is handled by a
separate case, similar to a Case Structure, allowing the application to respond differently to
each type of interaction.

17 (b). Explain the purpose and working of the "send notification" and "wait on
notification" functions with an example VI.

Notifier : Use the notifier operations functions to suspend the executed of a block diagram
until you receive data from another section of the block diagram or from another VI.

1.Notifiers communicates between two different parts of a block diagram or two different
VIs in same machine.
2. Notifiers cannot be used in different machines and different server networks.
3. Notifiers can accept any data type.
4. Notifiers just enques one data element in each time.
5. Synchronization is possible between master and slave loop.
NOTIFIERS
 Notifiers are a communication mechanism between two independent parts of the
block diagram or between two or more VIs running on the same machine.
 Notifiers are similar to mailboxes for data, one process sends data to the mailbox
and one or several other processes receive data from the mailbox.
 In this way, they are similar to local or global variables. When using a variable,
however, a process that is waiting for information must cycle continuously to
check the value of the variable.
 One benefit of notifiers is that a process that receives information completely stops
execution while waiting, and starts only when new data becomes available. This
reduces excess processing power being wasted on unneeded polling.

Block diagram ProgrammingSynchronization- Notifier Operations below


functions appears
18.(a) Analyze with an example VI of a ticket vending machine and state machine.

State machines revolve around 3 concepts:


 The state,
 The event,
 The action.
The state: The state is the position or status that the program is at when it is working
through the problem.
Eg: A state could be waiting for the user to do something, or running a calculation. States
work to help break up the big picture and help to make everything run smoother.
Developing these wisely will help to make the state machine run more efficiently.
The event: Events are occurrences that have specific meaning to the program itself. The
example that we will be building is a vending machine that dispenses an item after the user
has inserted the correct amount of money. An event for this program could be the money
being inserted or the person hitting the start button.
The action: The action is how the program will react to the particular event that has
occurred.
18.(b) Explain producer and consumer in detail with an example VI.

In LabVIEW, the Producer/Consumer architecture is a powerful design pattern used to


manage tasks that involve continuous data generation and separate data processing. This
model consists of two parallel loops the producer loop and the consumer loop which operate
independently but communicate through a queue. The producer loop is responsible for
acquiring or generating data, such as reading sensor values, capturing user inputs, or handling
hardware signals. The data is then placed into a queue using the Enqueue Element function.

On the other side, the consumer loop retrieves data from the queue using the Dequeue
Element function and performs tasks like processing, displaying on the user interface, or
writing to a file. This separation ensures that if one loop is slower than the other, it doesn't
affect the overall performance of the program. For instance, if data is acquired faster than it
can be logged to a file, the queue temporarily stores the data until the consumer can catch up.

A common example of this architecture is a temperature monitoring system. In this case, the
producer loop continuously reads temperature values every second and sends them to a
queue. The consumer loop receives these values and logs them to a file every five seconds.
This ensures smooth and efficient execution without missing data points or freezing the user
interface.
19(a). Describe the process of hardware installation and configuration in a DAQ system.

The purpose of data acquisition is to measure an electrical or physical phenomenon


such as voltage, current, temperature, pressure, or sound. PC-based data acquisition uses
a combination of modular hardware, application software, and a computer to take
measurements.While each data acquisition system is defined by its application
requirements, every system shares a common goal of acquiring,
analyzing, and presenting information. Data acquisition systems incorporate signals,
sensors, actuators, signal conditioning, data acquisition devices, and application
software.

 Acquiring signals from real-world phenomena


 Digitizing the signals
 Analyzing, presenting and saving the data
The parts are:

 Physical input/output signals


 DAQ device/hardware
 Driver software
 Your software application (Application software)
NI-DAQmx

The NI-DAQmx Driver software is the layer of software for easily communicating with
the hardware. It forms the middle layer between the application software and the
hardware.
Driver software also prevents a programmer from having to do register-level
programming or complicated commands in order to access the hardware functions.

The DAQmx palette in LabVIEW:


DAQ Assistant:

The DAQ Assistant, included with NI-DAQmx, is a graphical, interactive guide for
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.
Because DAQ Assistant is completely menu-driven, you will make fewer
programming errors and drastically decrease the time from setting up your DAQ
system to taking your first measurement.

Scales

You can configure custom scales for your measurements using MAX. This is very
useful when working with sensors. It allows you to bring a scaled value into your
application without having to work directly with the raw values. For example, you can
use a temperature sensor that represents temperature with a voltage. The conversion
equation for the temperature is, Voltage x 100 = Celsius. After a scale is set, you can
use it in your application program, providing the temperature value, rather than the
voltage.

When performing analog input, the task can be timed to:

 Acquire 1 Sample
 Acquire n Samples
 Acquire Continuously

Navigation to DAQAsst:
Programming Measurement I/ONI-DAQmx
“Acquire Signals” (i.e., Input Signals) or “Generate Signals” (i.e., Output Signals).

Select Acquire Signals → Analog Input → Voltage.


Select ai0 (Analog Input channel 0) and click Finish.
In the Timing Settings Select “1 Sample (On Demand)”.

The next step is to select the Signal Input Range. A common signal is 0-5V.

Click OK in the DAQ Assistant window The DAQ Assistant icon appears on the
Block Diagram:
Ex: Wire the data output to a numeric indicator like this (and hit the Run button):

Then numeric indicator will show, e.g., the following value:

Ex: To generate “continuous” acquisition, put a While loop around the DAQ Assistant
like this:

19 (b) Discuss the advantages of DAQmx programming over traditional DAQ


methods.

In Virtual Instrumentation with LabVIEW, DAQmx (Data Acquisition Manager


Extension) programming offers several advantages over traditional DAQ (Data
Acquisition) methods. DAQmx is part of the NI-DAQmx driver, which provides a
modern and efficient way to interface with NI hardware, making the development
of measurement and automation systems faster, more reliable, and more scalable.
Simplified Configuration:
One of the major advantages of DAQmx is its easy-to-use task-based
configuration. In traditional DAQ, users had to manually configure each channel,
timing, and triggering setting through low-level commands. With DAQmx, tasks
are pre-defined collections of settings (channels, timing, triggers) that can be
reused and managed easily using LabVIEW’s intuitive interface.
Better Performance and Speed:
DAQmx is highly optimized for performance. It reduces CPU usage and improves
the speed of data transfer between the DAQ device and LabVIEW. Compared to
traditional DAQ methods, DAQmx allows for multi-threaded operation and
better buffer management, which is critical for high-speed data acquisition.
Rich Set of Functions and VIs:
DAQmx provides a wide range of ready-to-use functions and VIs (Virtual
Instruments) in LabVIEW, which simplifies complex tasks like analog
input/output, digital I/O, and counter/timer operations. Traditional DAQ methods
required manual programming for many such tasks.
Error Handling and Debugging:
DAQmx includes built-in error handling and diagnostics, making it easier to
debug and maintain applications. The error codes and messages are more
informative compared to older methods, helping users quickly identify and resolve
configuration or runtime issues.
Scalability and Flexibility:
DAQmx is scalable for both simple and complex systems. It supports multiple
channels, multiple devices, and even synchronization across devices. This
flexibility is not easily achievable using traditional DAQ programming.
Integration with Virtual Instrumentation:
Since DAQmx is designed to work seamlessly with LabVIEW, it enhances the
capabilities of virtual instrumentation systems by allowing real-time data
acquisition, analysis, and visualization within a single environment. Traditional
methods often required external tools or additional coding.

20(a). Explain the steps involved in performing measurements using myDAQ.

NI myDAQ is a portable data acquisition device developed by National


Instruments, primarily used for educational and laboratory purposes. It allows
students and engineers to perform real-world measurements using LabVIEW. The
myDAQ device includes analog and digital I/O channels, power supplies, and
audio interfaces, making it suitable for various electrical and electronic
experiments.
Below are the key steps involved in performing measurements using myDAQ:

Connect the myDAQ Hardware:


Connect the NI myDAQ device to the computer using a USB cable. Ensure the
drivers and NI-DAQmx software are properly installed so the system can
recognize the device.
Launch LabVIEW and Create a New VI:
Open LabVIEW and start a new VI (Virtual Instrument). Design the Front Panel to
include controls and indicators like graphs, numeric displays, and buttons
depending on the measurement task (e.g., voltage, current).
Configure DAQ Assistant:
Use the DAQ Assistant from the Measurement I/O palette in the Block Diagram.
Drag it into the diagram, and a configuration wizard will open.
 Choose Acquire Signals → Analog Input → e.g., Voltage.
 Select the myDAQ input channel (AI0, AI1, etc.).
 Set the measurement range and sampling rate.
Wire the Signal Source:
Connect the external circuit, sensor, or signal source to the appropriate analog
input terminals on the myDAQ device. For voltage measurements, connect to AI0
and AGND.
Run the VI and Observe Results:
Click the Run button to execute the VI. The myDAQ reads the input signal, and the
results are displayed on the front panel using indicators like a graph, waveform
chart, or numeric display.
6. Analyze and Save Data (Optional):
You can further process the data using LabVIEW functions such as filtering,
waveform analysis, or logging the data to a file for future reference.
20 (b).Explain the process of ActiveX programming in LabVIEW with an
example.
Active-X :

 ActiveX is the general name for a set of Microsoft Technologies that allows you to
reuse code and link individual programs together to suit your computing needs.

 Based on COM (Component Object Model) technologies, ActiveX is an extension


of a previous technology called OLE (Object Linking and Embedding).

 Each program does not need to regenerate components, but rather, reuse
components to give you the power to combine applications together.

 LabVIEW offers support for ActiveX automation as a server as well as support for
ActiveX Containers, and ActiveX Events.

ActiveXAutomation:
ActiveX/COM refers to the process of controlling one program from another via
ActiveX.

 Like networking, one program acts as the client and the other as the server.

 LabVIEW supports automation both as the client and the server. Both programs,
client and server, exist independent of each other but are able to share information.

 The client communicates with the ActiveX objects that the server opens to allow
the sharing of information.

 The automation client can access the object's properties and methods. Properties
are attributes of an object.

 Another program can set or retrieve an object's attributes. Similarly, methods are
functions that perform an operation on objects.

 Other applications can invoke methods. An example of an ActiveX property is the


program name, height or width. An example of an ActiveX method is the save or
print method.

ActiveXControlsandContainers:
The most common usage of ActiveX is via ActiveX controls, which are
embeddable components that exist inside ActiveX containers.
 Any program that can function as an ActiveX container allows you to drop
ActiveX controls into the program as a container. From these containers, the
ActiveX controls have their own functionality and properties.

 LabVIEW is an ActiveX container and can house ActiveX controls. Again,


properties and methods manipulate the embedded control.

ActiveX Events

 ActiveX is an event-driven technology. Programs report when certain events occur


so that other programs, or you, can react accordingly.

 LabVIEW supports the processing of ActiveX events via both automation and
embedding of ActiveX controls.

ActiveX Automation with LabVIEW

 LabVIEW as an ActiveX server or ActiveX client can interface with other


programs from the LabVIEW programming interface.

 In this case, LabVIEW acts as the automation client and requests information of
the automation server, or other program.

 Likewise, other ActiveX automation clients can interface with the LabVIEW
ActiveX automation server. Common programs used are Microsoft Visual Basic
and Microsoft Visual C++.

LabVIEW as an Automation ClientLabVIEW provides functions in its API that


allow LabVIEW to act as an automation client with any automation server.

 The diagram below shows LabVIEW's programming flow, and gives the
associated functions with each block.
Figure 1.
 In general, information about a program’s ActiveX automation server can be
obtained from the program’s documentation or by browsing the program’s type
library.

 Often, LabVIEW is used as an automation client for Microsoft Office programs


and their object models are available online from Microsoft.

LabVIEW as an Automation Server

 Other programs can interface with the LabVIEW automation server using ActiveX
automation. Using an automation client, it is possible to programmatically launch
LabVIEW, open and run VIs, and pass their data back to the calling program.

 The automation client interfaces with the LabVIEW type library which is located
in the \labview\resource directory. By browsing this type library, information
about the classes that LabVIEW exports is available.

 In general, LabVIEW exports a creatable class, Application, and a dispatch class,


VirtualInstrument. Additionally, LabVIEW executables can be ActiveX
automation servers.

 Automation clients such as LabVIEW or another LabVIEW executable can access


ActiveX automation servers.
LabVIEW as an ActiveX Container

 In general, LabVIEW can embed any ActiveX control.

 Using the control’s properties and methods, LabVIEW can programmatically


interact with the control. The flow chart for using an ActiveX container is shown
below:

Figure 2.

You can explore the properties and methods available using the property nodes and invoke
nodes by wiring a reference to the nodes.

ActiveX Events and LabVIEW

 LabVIEW supports ActiveX events via automation and ActiveX controls


embedded in containers.

 ActiveX events allow programmers to receive notification of a specific occurrence


and then act accordingly.

 Commonly, programs wait until an event has fired and then after the event fires,
continue with program execution dependent on what event fired.

 The flow chart for setting an ActiveX event sequence in LabVIEW is shown below
with the corresponding LabVIEW functions.
Figure 3.
ProgrammingConnectivityActive XActive X palette

Web browser application using Active-X program: Front panel & Block diagram

You might also like