Measurement Studio for Visual C++ .NET (MFC) - Bringing C++ to Test and Measurement
Overview
Measurement Studio includes a Visual C++ application wizard and a full set of C++ class libraries for creating measurement applications. Because of their object-oriented nature, class libraries are the natural way to deliver functionality to C++. Through the Visual Studio Industry Partner (VSIP) program with Microsoft, NI delivers native integration into the Visual Studio .NET environment. This integration includes specialized classes and data types, an application wizard, and Intellisense integration. NI integrated Measurement Studio into Visual C++ so that you can easily start and quickly complete your measurement application. Measurement Studio defines data types that simplify C++ programming for measurement applications and uses these data types across the various class libraries, from acquisition, to analysis, to visualization. Furthermore, the Measurement Studio class libraries work in combination with the proven Microsoft Foundation Class (MFC) libraries so you can easily build standard Windows applications.
Table of Contents
Application Wizard
To simplify the development of measurement applications in Visual C++, Measurement Studio features an application wizard. The Measurement Studio AppWizard walks you through building a measurement application and automatically generates an MFC project with the Measurement Studio components you selected. This wizard also can add components to or remove components from existing projects at any time in the development cycle.1) Begin your application with Measurement Studio Visual C++ Project![]() | 2) Add the appropriate classes to your project like 3D graph, 488.2, DAQ, and IVI![]() |
3) Launch the Instrument I/O or DAQ Assistant to interactively configure, test, and generate code for your measurements![]() | 4) Generate classes for your project![]() |
Acquisition and Instrument Control
Interface your application to the outside world using Measurement Studio hardware interface classes and integrated assistants. This includes native C++ class libraries for GPIB, VISA, IVI, modular instruments, and data acquisition
Instrument Control
With Measurement Studio, you can control your GPIB, serial, Ethernet, PXI, VXI, or USB instruments with class libraries designed for instrument control. If you want to quickly communicate and parse data from your instrument, you can use the Instrument I/O Assistant (see below). Because Measurement Studio also provides C++ classes for communication with Interchangeable Virtual Instrument (IVI) classes of instruments, you can remove hardware dependence from your code. Measurement Studio also includes a set of Visual C++ class libraries that you can use to program NI modular instruments such as DMMs, oscilloscopes, power supplies, function generators, and switches. These Visual C+ classes provide native C++ interfaces to instrument driver class libraries for automatic data type translation and organized properties and methods. Use the instrument drivers to quickly and easily access hardware functionality with no programming – increasing your productivity to create more powerful measurement applications.
Instrument I/O Assistant
1) Choose your instrument![]() | 2) Add appropriate steps like write or read and parse![]() |
3) Automatically parse the data returned from your instrument and view numeric data on a graph![]() | 4) Automatically generate C++ source code for use in your program![]() |
Data Acquisition
The Measurement Studio DAQ interface for Visual C++ uses the NI-DAQmx libraries and the DAQ Assistant for optimized data acquisition measurements. These libraries give you the capabilities to perform the following types of tasks:
- Analog signal measurement
- Analog signal generation
- Digital input and output
- Counting and timing
- Pulse generation
- Signal switching
In order to quickly configure, test, and generate C++ source code, Measurement Studio provides the DAQ Assistant.
DAQ Assistant
1) Choose your measurement type![]() | 2) Configure task properties like sampling rate and triggering![]() |
Internet Connectivity
With the DataSocket classes, you can easily communicate measurement data with numerous protocols, such as OPC, HTTP, FTP, and DataSocket Transfer Protocol (DSTP), across any network, including the Internet. The client/server architecture optimizes the data transfer across the network and makes user interaction to live data across the Internet a reality. You can view test information or control your system from anywhere in the world.
User Interface Display

Because measurement applications require real-time 2D and 3D graphs, knobs, meters, gauges, and more, Measurement Studio provides these flexible measurement-focused user interface controls to simplify development and save you time.
All of the user interface controls provided by Measurement Studio are fully customizable. At design time, you can interactively configure colors, styles, data bindings, format, and more.
You also can programmatically modify control properties during the execution of the program to give you complete programming flexibility. Measurement Studio presents its virtual instrumentation controls seamlessly in Visual C++ as multithread-safe MFC class controls.
See Also:
ActiveX User Interface Gallery
Analysis
Measurement Studio includes a powerful and comprehensive set of classes for analyzing data in Visual C++. You can use these functions to condition and transform your signal using smoothing windows, digital filters, frequency-domain transforms, or other measurement functions. With these powerful analysis routines, you can convert raw data into meaningful information and build robust virtual instruments.
Backward Compatibility with LabWindows/CVI
You can benefit from National Instruments 15-year record of upward code mobility by using the Measurement Studio AppWizard to preserve your legacy code. You can compile any application developed in LabWindows/CVI to Visual C++ without changing a single line of code.
See Also:
LabWindows/CVI for ANSI C
Related Links:
Measurement Studio for Visual C++ .NET (MFC) Home Page
Measurement Studio for Visual C++ 6.0 Home Page
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).










