The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.
Page 5
Creating a New Measurement Studio Project ... 4-3 Creating a Measurement Studio DAQ Application... 4-4 Creating an NI-DAQmx User Control ... 4-6 Creating a Measurement Studio NI-488.2 or NI-VISA Application... 4-6 Adding or Removing Measurement Studio Class Libraries... 4-8 Selecting a Measurement Studio Parameter Value ... 4-9 Calling Instrument Drivers from .NET Languages ...
Studio .NET 2003 and one with support for Visual Studio 6.0. This manual documents the Visual Studio .NET 2003 CD. For help with Visual Studio 6.0, refer to the Measurement Studio Support for Visual Studio 6.0 Readme located on the Measurement Studio for Visual Studio 6.0 CD.
Text in this font denotes text or characters that you enter from the keyboard, monospace sections of code, programming examples, and syntax examples. This font also is used for the proper names of disk drives, paths, directories, programs, device names, filenames, and extensions. Measurement Studio User Manual viii ni.com...
Introduction to Measurement Studio Measurement Studio is an integrated suite of native tools and class libraries that are designed for developers using Visual Basic .NET, Visual C#, and Visual C++ .NET to develop measurement and automation applications. Measurement Studio dramatically reduces application development time...
CDs—one with support for Visual Studio .NET 2003 and one with support for Visual Studio 6.0. This manual documents the Visual Studio .NET 2003 CD. For help with Visual Studio 6.0, refer to the Measurement Studio Support for Visual Studio 6.0 Readme located on the Measurement Studio for Visual Studio 6.0 CD.
Page 10
The option to browse for an installation location is valid only if you have not already Note installed any Measurement Studio features of the same version you are installing. If you have any Measurement Studio features of the same version installed, the Measurement Studio installer installs to the same root directory to which you installed other Measurement Studio features.
Introduction to Measurement Studio Measurement Studio Package Comparison Chart Table 1-1 lists the features included in the Standard, Professional, and Enterprise Editions of Measurement Studio. Table 1-1. Measurement Studio Package Comparison Chart Feature Project Templates User Interface Controls GPIB Interfaces...
Measurement Studio Resources As you work with Measurement Studio, you might need to consult other resources. For detailed Measurement Studio help, including function reference and in-depth documentation on developing with Measurement Studio, refer to the NI Measurement Studio Help within the Visual Studio .NET environment.
Page 13
Measurement Studio .NET Class Hierarchy Chart and Measurement Studio Visual C++ Class Hierarchy Chart—Provide overviews of class relationships within class libraries. Charts are included with all Measurement Studio packages and are posted online under the Product Manuals section of ni.com/mstudio...
This chapter provides overview information about the .NET class libraries included with Measurement Studio. Refer to the Using the Measurement Studio .NET Class Libraries section of the NI Measurement Studio Help for detailed information about these libraries. Measurement Studio .NET Class Libraries Overview Measurement Studio provides .NET class libraries that you can use to...
Chapter 2 Measurement Studio .NET Class Libraries Analysis The Measurement Studio Analysis .NET class library is in the NationalInstruments.Analysis library includes a set of classes that provides various digital signal processing, signal filtering, signal generation, peak detection, and other general mathematical functionality. Use this library to analyze acquired data or to generate data.
• • For more information about analyzing or generating data with the Analysis class library, refer to the Using the Measurement Studio Analysis .NET Library topic in the NI Measurement Studio Help. Common The Measurement Studio Common .NET class library is in the...
Chapter 2 Measurement Studio .NET Class Libraries NI-488.2 The Measurement Studio NI-488.2 .NET class library is in the NationalInstruments.NI4882 on the Device Drivers CD. The NI-488.2 class library includes a set of classes that communicates with GPIB instruments, controls GPIB boards, and acquires GPIB status information.
Instrument I/O Assistant, refer to the or NI-VISA Application more information about NI-VISA, visit User Interface The Measurement Studio User Interface .NET class library is in the NationalInstruments.UI.WindowsForms Interface class library encapsulates the following Measurement Studio user interface controls: •...
Measurement Studio user interface controls. For more information about easily using the .NET interface controls, refer to the Using the Measurement Studio Windows Forms .NET Controls section in the NI Measurement Studio Help. Waveform Graph and Scatter Graph Controls...
Page 20
Use cursors to identify key points in plots and the plot area. Configure cursor snap modes to be fixed, floating, nearest point, and to plot. Measurement Studio .NET Class Libraries Measurement Studio User Manual...
• • For more information about using the waveform and scatter graph controls, refer to the Using the Measurement Studio Graph .NET Controls section in the NI Measurement Studio Help. Legend Control Use the Measurement Studio legend control, as shown in Figure 2-1, to display symbols and descriptions for a specific set of elements of another object, such as the plots or cursors of a graph.
The following sections describe operations available with the controls and the classes that interface with them. Use the Measurement Studio knob, gauge, and meter controls, as shown in Figure 2-2, to represent a knob, gauge, and meter on your user interface.
Page 23
Bind the value to a .NET data source using .NET data binding. Connect to the Measurement Studio .NET numeric edit control so that if you change the value of one control, it changes the value of the other control.
Numeric Edit Control Use the Measurement Studio numeric edit control, as shown in Figure 2-4, to display numeric values and to provide a way by which end users can edit numeric values. Typically, you use a numeric edit control to input or display TextBox or NumericUpDown control.
• • For more information about using the switch and LED controls, refer to the Using the Measurement Studio Switch and LED .NET Controls section in the NI Measurement Studio Help. Measurement Studio User Manual Figure 2-5. Switch Control in Vertical Toggle 3D Style Figure 2-6.
Class Libraries This chapter provides overview information about the Visual C++ class libraries that are available with Measurement Studio. Refer to the Using the Measurement Studio Visual C++ Class Libraries section of the NI Measurement Studio Help for detailed information about these libraries.
3D Graph Control Use the Measurement Studio ActiveX 3D graph control, as shown in Figure 3-1, to plot three-dimensional data. The 3D graph is included only in the Measurement Studio Enterprise package.
3D Graph Visual C++ Class Library Overview topic in the NI Measurement Studio Help. Analysis The Measurement Studio Analysis Visual C++ class library includes a set of classes that provides various digital signal processing, signal filtering, signal generation, peak detection, and other general mathematical functionality.
Chapter 3 Measurement Studio Visual C++ Class Libraries Professional Analysis The Professional Analysis class library, which ships with Measurement Studio Professional Edition, includes the Standard Analysis functionality as well as the following functionality: • • • • • • •...
• • For more detailed information about the Common class library, refer to the Common Visual C++ Class Library Overview topic in the NI Measurement Studio Help. Instrument Drivers Measurement Studio includes a set of class libraries that provides Visual C++ classes that you can use to program instruments, such as digital multimeters and oscilloscopes.
Visual C++ instrument driver class libraries from For more information on using instrument drivers, refer to the Using Instrument Drivers in Measurement Studio Applications section in the NI Measurement Studio Help. LabVIEW Real-Time Interface Use the Measurement Studio LabVIEW Real-Time Interface Visual C++ class library to read from and write to shared memory on a LabVIEW RT Series processor board.
Studio Visual C++ classes. This class library is included only in the Measurement Studio Enterprise package. For more information about using the Measurement Studio Excel Visual C++ class library to create applications that present data in Microsoft Excel format, refer to the Microsoft Excel Interface Visual C++ Class Library Overview topic in the NI Measurement Studio Help.
Chapter 3 Measurement Studio Visual C++ Class Libraries NI-488.2 Use the Measurement Studio NI-488.2 Visual C++ class library to communicate with and control instruments on a GPIB interface. Use the classes in this library to perform the following operations: •...
Use the Measurement Studio NI-Reports Visual C++ class library to generate printed reports from Measurement Studio Visual C++ applications. This class library is included only in the Measurement Studio Enterprise package. For more information about generating printed reports using the NI-Reports class library, refer to the NI-Reports Visual C++ Class Library Overview topic in the NI Measurement Studio Help.
Measurement Studio Visual C++ Class Libraries User Interface Use the Measurement Studio User Interface Visual C++ class library to add user interface controls to your application. You can configure the user interface controls programmatically or through the property pages in the Visual C++ resource editor.
Graph Control Use the Measurement Studio ActiveX graph control, as shown in Figure 3-3, to plot and chart two-dimensional data. The provides the Visual C++ interface to the ActiveX graph control. With the graph control and the classes that interface with the control, you can perform the following operations: •...
Measurement Studio Visual C++ Class Libraries • For more information about easily using the graph control, refer to the Using the Measurement Studio Visual C++ Graph Control section in the NI Measurement Studio Help. Knob Control Use the Measurement Studio ActiveX knob control, as shown in Figure 3-4, to display numerical information.
• • For more information about easily using the slide control, refer to the Using the Measurement Studio Visual C++ Slide Control section in the NI Measurement Studio Help. Measurement Studio User Manual Figure 3-6. ActiveX Slide Control Use different display styles—vertical, horizontal, tank, and thermometer.
Utility Use the Measurement Studio Utility Visual C++ class library to easily access Windows operating system functionality. Table 3-1 lists classes in the Utility class library and their functionality. Table 3-1. Utility Class Names and Functionalities Utility Class CNiFile CNiSound...
Page 41
Table 3-1. Utility Class Names and Functionalities (Continued) Utility Class CNiTempFile CNiTimer For more information about using the Utility class library, refer to the Utility Visual C++ Class Library Overview topic in the NI Measurement Studio Help. Measurement Studio User Manual Functionality extends the functionality of CNiTempFile temporary file creation and manipulation.
• These sections include overview information on developing applications with Measurement Studio tools and features. Refer to the Developing with Measurement Studio section of the NI Measurement Studio Help for more information about the functionality of these tools and features.
Page 43
Basic .NET, Visual C#, or Visual C++ .NET projects. Project Conversion Wizard—Use the Project Conversion wizard to convert Measurement Studio 1.0 and 6.0 Visual C++ projects to the current version installed on your machine. Conversion from 7.0 projects to 7.1 projects is not necessary.
• For more information about the resources included in the Measurement Studio Menu, refer to the Measurement Studio Menu topic in the NI Measurement Studio Help. Creating a New Measurement Studio Project Measurement Studio includes class library and application templates that you can use to quickly create measurement applications with Visual Basic .NET, Visual C#, and Visual C++ .NET.
Developing with Measurement Studio For more information about using project templates to create a new Measurement Studio project, refer to the Creating a New Measurement Studio Project section in the NI Measurement Studio Help. For information about converting Measurement Studio projects, refer to the Converting Measurement Studio Projects section in the NI Measurement Studio Help.
Visual Studio .NET Toolbox onto a form and use it just as you use any Windows Forms control. For more information on how to create a user control, refer to the Using a DAQmx Task Class in a Project topic of the NI Measurement Studio Help. Creating a Measurement Studio NI-488.2 or NI-VISA Application To create a Measurement Studio NI-488.2 or NI-VISA application, use the...
Measurement Studio Add/Remove Class Libraries wizard on the Measurement Studio menu. This wizard provides an interface, as shown in Figure 4-4, that you can use to select the Measurement Studio class libraries you want to add to or remove from a project.
After completing the wizard, a new instrument driver wrapper class is added to your project and opened in the source code editor. Figure 4-6. Launching the Measurement Studio .NET Instrument Driver Wizard from For more information about the .NET instrument driver wizard, refer to the Using Instrument Drivers in Measurement Studio Applications section in the NI Measurement Studio Help.
Technical Support and Professional Services Visit the following sections of the National Instruments Web site at ni.com • • • If you searched your local office or NI corporate headquarters. Phone numbers for our worldwide offices are listed at the front of this manual. You also can visit...
Page 53
ActiveX control Reusable software component that adds functionality to any ActiveX control container through exposed properties, methods, and events. The Measurement Studio data acquisition, user interface, and analysis controls are examples of ActiveX controls. ActiveX control Development environment that fully supports ActiveX controls and container integrates them into its own environment using COM.
Page 54
GUI to the rest of your program. This code can be compiled and run as soon as it is created. coercion Automatic conversion that Measurement Studio controls perform to change the numeric representation of a data element. Component Object Model. Microsoft specification for architecting and developing reusable software components.
Page 56
Glossary distribution Ability to install programs you develop with Measurement Studio to others working on different computers. Dynamic Link Library. A library of functions that link to a program and load at run time rather than being compiled into the program. Loading libraries only when they are needed saves memory in software applications.
Page 57
488.2-1987. See also GPIB. IMAQ Vision National Instruments image acquisition and analysis software that you can use to acquire images from National Instruments image acquisition (IMAQ) boards, display them in your program, perform interactive viewer operations, and analyze the images to extract information.
Page 58
A rectangular array of numbers or mathematical elements that represent the coefficients in a system of linear equations. Megabytes of memory. Measurement Studio User Manual ni.com...
Page 59
DAQ devices such as the E Series multifunction I/O (MIO) devices, SCXI signal conditioning modules, and switch modules. Measurement Studio National Instruments software that includes tools to build measurement applications in Visual Basic .NET, Visual C#, and Visual C++ .NET. meter A control used to input or display numerical data.
Page 60
Y axis (property) on a graph (object). The Y axis itself is another object with properties, such as minimum and maximum values. Measurement Studio User Manual file extension of ActiveX control files. .ocx www.opcfoundation.org...
Page 62
User Interface. vector 1D array. virtual instrument (VI) Program in Measurement Studio that models the appearance and function of a physical instrument. VISA Driver-software architecture developed by National Instruments to unify instrumentation software for serial, GPIB, and VXI instruments or controllers.
Page 63
Index ActiveX controls in Visual C++, 3-2 Add/Remove Class Libraries wizard, 4-8 adding or removing Measurement Studio class libraries, 4-8 Analysis .NET class library, 2-2 Enterprise Analysis, 2-3 Professional Analysis, 2-2 Standard Analysis, 2-2 Visual C++ class library, 3-3 Enterprise Analysis, 3-4...
Page 64
1-4 Preferences, 4-3 resources, 1-5 meter control, 2-9 Microsoft Excel Interface Visual C++ class library, 3-7 Measurement Studio User Manual Microsoft Word Interface Visual C++ class library, 3-7 National Instruments support and services, .NET class libraries Analysis, 2-2 Common, 2-3 NI-488.2, 2-4...
Page 66
Index NI-DAQmx, 3-8 NI-Reports, 3-9 NI-VISA, 3-9 overview, 3-1 User Interface, 3-10 Utility, 3-15 Measurement Studio User Manual waveform graph control, 2-6 Web resources, A-1 Windows Forms user interface controls, 2-5 ni.com...
Need help?
Do you have a question about the Measurement Studio and is the answer not in the manual?
Questions and answers