You are on page 1of 10

NI LabWindows™/CVI

NI LabWindows™/CVI

• ANSI C development environment


• Intuitive environment optimized for test and control
• Comprehensive debugging and remote debugging tools
• Interactive user interface editor; easy creation of instrument drivers
• Built-in measurement libraries for acquisition, analysis, and presentation
• DAQ Assistant and Instrument I/O Assistant

Introduction to LabWindows™/CVI

Overview

NI LabWindows/CVI is a proven ANSI C development environment for test and measurement that
greatly increases the productivity of engineers and scientists. For more than 20 years, C
developers have used LabWindows/CVI to develop high-performance, stable applications in the
manufacturing test, military and aerospace, telecommunications, design validation, and
automotive industries. LabWindows/CVI streamlines development in these areas with hardware
configuration assistants, built-in measurement libraries, comprehensive debugging tools,
interactive execution capabilities that developers can use to run functions at design time, and
advanced analysis and scientific user interface tools.

NI LabWindows/CVI helps protect me from test system obsolescence by consistently


maintaining backwards compatibility. Using LabWindows/CVI, not only can I continue to
reuse C code that I created 11 years ago, but the code also executes faster with the
optimized compiler integration. The National Instruments commitment to backwards
compatibility with LabWindows/CVI makes it the de facto standard for military/aerospace
test development. - Dave Dunham, Senior ATE Systems Engineer, MTI

Table of Contents

1. Integrated Environment
2. State-of-the-Art Hardware Connectivity
3. Scientific Advanced Analysis
4. Visualize Test and Measurement Data
5. Support for the Latest PC Technologies
6. Multiplatform Support
7. Productive Development Tools
8. NI TestStand Test Management Software Integration
9. Conclusion

www.ni.com
NI LabWindows™/CVI

Integrated Environment

The LabWindows/CVI development environment, as shown in Figure 1, includes a workspace


window that is divided into five main areas – the Project Tree, the Library Tree, the Window
Confinement Region, the Output Region, and the Debugging Region.

Figure 1. LabWindows/CVI features a streamlined tabbed workspace in which you can quickly
develop, debug, and manage large applications.

The integrated workspace provides an intuitive, convenient interface for creating and managing
large projects. You can also customize each of the areas to fit your specific development style
and preferences, and integrate with source code control, requirements management, and data
management systems.

Watch a seven-minute demo to learn how to develop applications with LabWindows/CVI.

State-of-the-Art Hardware Connectivity

Often the most critical process in a measurement application is connecting to an instrument and
taking measurements. LabWindows/CVI simplifies the task of connecting to and communicating
with a wide variety of instruments. With the LabWindows/CVI built-in measurement libraries, you
can quickly acquire data from GPIB, USB, serial, Ethernet, PXI, and VXI instruments using the
built-in instrument I/O libraries or using built-in instrument drivers.

In addition, LabWindows/CVI streamlines data acquisition and instrument connectivity capabilities


with interactive measurement tools. It provides two measurement assistants, which simplify the
acquisition process.

www.ni.com
NI LabWindows™/CVI

LabWindows/CVI reflects the commitment of NI by fully leveraging the latest NI


technologies available – including the DAQ Assistant and Instrument I/O Assistant ... to
greatly increase my efficiency and productivity. - Pierre Duriez, Industrial Computing
Manager, Fuji Electric
DAQ Assistant

In addition to the integrated NI-DAQmx data acquisition library, LabWindows/CVI features the
DAQ Assistant, an interactive interface to the NI-DAQmx driver framework. The DAQ Assistant,
shown in Figure 2, interactively defines a measurement task, determines the measurement
capabilities of the data acquisition device you specify, and generates code modules that contain
the acquisition functionality. The tight integration of the DAQ Assistant and NI-DAQmx with
LabWindows/CVI offers engineers who perform data acquisition the most efficient, productive
way to take measurements in an ANSI C environment.

Figure 2. The DAQ Assistant interactively defines a measurement task, determines the
measurement capabilities of the DAQ device you specify, and generates code modules
containing the acquisition functionality.

www.ni.com
NI LabWindows™/CVI

Read more in the “Using the DAQ Assistant in LabWindows/CVI” white paper.

Instrument I/O Assistant

Engineers and scientists in the test industry recognize that easy connectivity to various
instruments from different vendors is crucial when selecting a software package.
LabWindows/CVI, along with NI LabVIEW software, is an industry leader in instrument control
and connectivity through an Instrument Driver Network of more than 6,000 instrument drivers
from more than 275 vendors. You can use these drivers to easily program instrument control
applications. LabWindows/CVI takes instrument control to the next level of productivity with
the Instrument I/O Assistant, with which you can generate code to communicate with devices
such as serial, Ethernet, and GPIB instruments without using an instrument driver.

Figure 3. The LabWindows/CVI Instrument I/O Assistant automatically parses instrument data,
generates reusable code, and interactively defines basic communication.

The Instrument I/O Assistant offers a simple interface you can use to quickly prototype
applications and autoparse instrument data, without any programming. You can easily import the
generated code into any existing application, which removes the tedium of writing instrument
connectivity, basic communication, and string parsing code. By writing two lines of code, you can
invoke more than 300 lines of code created by the Instrument I/O Assistant and quickly focus on
taking measurements.

View the LabWindows/CVI instrument control white paper series.

www.ni.com
NI LabWindows™/CVI

Scientific Advanced Analysis

LabWindows/CVI provides powerful algorithms and functions designed specifically for


measurement analysis and signal processing. The LabWindows/CVI functions for analysis
include signal processing tools you can use to condition and transform your signal using
smoothing windows, digital filters, and frequency-domain transforms. With these functions, you do
not have to write your own algorithms to turn raw data into meaningful information. With the
LabWindows/CVI Advanced Analysis Library, available in the LabWindows/CVI Full Development
System, you can:

• Extract information from acquired data and unique measurements


• Generate, modify, process, and analyze signals
• Add intelligence and decision-making capabilities to your applications
• Perform inline and offline analysis
• Use common-purpose as well as specialized tools and add-ons
• Take advantage of academic analysis examples

Figure 4. LabWindows/CVI includes a powerful, comprehensive set of functions for analyzing


data.

View the complete list of LabWindows/CVI analysis functions.

Visualize Test and Measurement Data

Create professional measurement and automation graphical user interfaces (GUIs) in C without
spending months on development. LabWindows/CVI delivers measurement-specific user
interface components that you can drag, drop, and extend to create a custom interface to your

www.ni.com
NI LabWindows™/CVI

measurement applications. These controls include buttons, knobs, slides, gauges, tanks, dials,
and graphs.

Figure 5. You can create modern user interfaces with updated theme-based controls.

View the LabWindows/CVI user interface gallery.

Support for the Latest PC Technologies

Because industry standards are pushing more open technology, such as multithreading, .NET
XML Web services, and Internet-enabled applications, LabWindows/CVI incorporates these
technologies.

Multicore Programming

Executing tasks in parallel often uncovers design flaws that go unnoticed in single-threaded
applications – especially when correct application behavior depends on the precise timing of

www.ni.com
NI LabWindows™/CVI

execution, memory access, and communication between multiple tasks. LabWindows/CVI not
only provides simplified ANSI C thread synchronization functions and optimized threading
constructs to address these challenges but also contains several advanced features that simplify
troubleshooting and design optimization on multicore systems.

Figure 6. Select a particular CPU from the Highlight CPU Mode option to highlight all thread
activity that executed on that CPU.

Learn more about debugging multicore ANSI C applications with LabWindows/CVI.

Microsoft .NET

With LabWindows/CVI, you can take advantage of the latest Microsoft .NET technologies to
invoke methods and set and get properties from .NET assemblies. The .NET assemblies are the
building blocks of all .NET applications; thus, LabWindows/CVI programmers can use this
functionality to call Web services such as those for sending automated e-mails, accessing rich
database functionality, and interacting directly with Microsoft Windows API methods including
those for viewing CPU use and logging errors.

Internet and XML Libraries

LabWindows/CVI also includes the Internet Library, which you can use to instantly connect your
applications to the Web through e-mail, FTP, Telnet, and ping. You can send e-mail or text
messages to notify operators of specific events, such as a machine overheating. You also can log
acquired data to an FTP server. In addition, LabWindows/CVI contains an XML function library.

www.ni.com
NI LabWindows™/CVI

The cvixml.fp instrument driver includes functions you can use to create and modify XML
documents.

Multiplatform Support

With the flexibility of LabWindows/CVI, you can protect your code investment by reusing legacy
code in a familiar environment and seamlessly integrate distributed test systems running on
Windows, Linux®, or real-time platforms.

LabWindows/CVI Real-Time Module

With the LabWindows/CVI Real-Time Module, you can create reliable, deterministic applications
that target dedicated real-time hardware. This module reduces your development time for real-
time applications by helping you:

• Reuse existing ANSI C code and the familiar LabWindows/CVI development environment
• Target commercial off-the-shelf (COTS) hardware targets, specifically PXI and PC
targets, as well as I/O
• Use a single toolchain for real-time and Windows development

Read the introduction to the LabWindows/CVI Real-Time white paper.

LabWindows/CVI Run-Time Module for Linux

The LabWindows/CVI Run-Time Module for Linux extends the LabWindows/CVI development
environment by allowing developers to create high-performance, stable applications on a
Windows system and later compile and run these applications on a Linux target.

Read more about the LabWindows/CVI Run-Time Module for Linux.

Productive Development Tools

LabWindows/CVI also includes key productivity features with which you can efficiently create
end-to-end solutions. Some additional productivity tools include new project and file templates for
easily implementing consistent programming style while reducing the amount of redundant tasks
performed between multiple applications.

New Project Wizard

It is common for developers on a team to use a consistent code or user interface template when
starting new projects. Common settings such as source code control or build options typically
have to be reset from project to project if development is performed on different machines. With
the new Project Wizard, you can create new project or source files based on existing templates.
The templates can apply to file-naming conventions, code documentation, build and target
options, and user interface design.

Function Panels

Interfacing with an instrument usually requires the constant exploration of header files and help
files. LabWindows/CVI introduced function panels as an easy tool to navigate an API and
interactively insert function calls. Help is available for the function itself and each parameter. In
addition, you can use function panels to interactively run individual functions with parameters that

www.ni.com
NI LabWindows™/CVI

you specified. With function panels, you can quickly write source code in an interactive window,
even automatically inserting ampersand (&) signs before variables to designate memory
addresses. In addition, if you are developing a custom instrument driver, you can use the function
panel HTML generation capabilities to take the documentation already included in your
instrument drivers or in the open source instrument drivers available in function panels and
generate Web-ready documentation that can be easily distributed and searched.

The design-time prototype help in LabWindows/CVI is extremely effective in determining


the correct parameters for my measurement functions. - Marco Turra, Software Engineer,
HI-TEC
Set Next Statement

LabWindows/CVI features the Set Next Statement command, which you can use to skip over
code you know is going to fail or investigate code that failed when you executed it. This command
changes the next statement to execute while you are debugging.

Editable Data Tooltips

LabWindows/CVI includes editable data tooltips. As you debug your application, you can hover
over a variable name in the Source window to view and change the variable value using the
tooltip.

Resource Tracking Window

With LabWindows/CVI, you can locate potential resource/memory leaks earlier in the
development process with the Resource Tracking Window. This tool records and tracks all
resources allocated at run time including dynamic memory, file handles, panels, GPIB/TCP
handles, and thread pools. You can also use the tool to easily go to source code, view memory,
break on deallocation, and log tracked resources to disk for later review.

The built-in Resource Tracking Window in LabWindows/CVI 9.0 has saved me days of
adding custom debugging code to track memory and other resource usage. Now with an
integrated solution that requires no changes to my code, I have found multiple memory
leaks in a matter of minutes. This new feature is invaluable. - Chris Quick, Software
Engineer, Laser Technology Inc.
NI TestStand Test Management Software Integration

NI TestStand introduces the latest test management software technology for developing
automated test systems more quickly and effectively. NI TestStand has features specially
designed to develop LabWindows/CVI test systems fast, including a LabWindows/CVI flexible
module adapter and NI TestStand user interface (UI) controls for LabWindows/CVI.

The LabWindows/CVI flexible module adapter ensures maximum return on your software
development investment by increasing code reusability. You now can call functions within any
LabWindows/CVI .c, .obj, .lib, or .dll file regardless of the function prototype. The
LabWindows/CVI flexible module adapter has also been updated to improve parameter
visualization when you configure a module in NI TestStand. These improvements substantially
reduce development times and eliminate unnecessary programming.

www.ni.com
NI LabWindows™/CVI

Figure 7. With the new LabWindows/CVI flexible module adapter, you can call functions within
any LabWindows/CVI file from NI TestStand, regardless of the function prototype.

View the NI TestStand home page.

Conclusion

The proven LabWindows/CVI development environment can make your ANSI C application
development more productive with integrated workspace and development tool enhancements,
more robust hardware functionality, real-time connectivity capabilities, advanced data
management tools, and tight test management integration.

www.ni.com