Instruments Corporation. National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
Page 4
WARNING REGARDING USE OF MEASUREMENT COMPUTING CORPORATION PRODUCTS MEASUREMENT COMPUTING CORPORATION DOES NOT AUTHORIZE ANY MEASUREMENT COMPUTING CORPORATION PRODUCT FOR USE IN LIFE SUPPORT SYSTEMS AND/OR DEVICES WITHOUT WRITTEN APPROVAL OF THE CEO OF MEASUREMENT COMPUTING CORPORATION. LIFE SUPPORT DEVICES/SYSTEMS ARE DEVICES OR SYSTEMS WHICH, A)ARE INTENDED FOR SURGICAL IMPLANTATION INTO THE BODY, OR B)SUPPORT OR SUSTAIN LIFE AND WHOSE FAILURE TO PERFORM CAN BE REASONABLY EXPECTED TO RESULT IN INJURY.
Page 6
Contents Numeric Edit Control... 2-17 Switch and LED Controls ... 2-18 Property Editor Control... 2-19 Measurement Studio Support for Visual Studio 2005 Class Library Overview ... 2-20 Windows Forms Array Controls ... 2-20 Switch and LED Array Controls ... 2-21 Numeric Edit Array Control ...
About This Manual Conventions The following conventions appear in this manual: <> Text enclosed in angle brackets represents directory names and parts of paths that may vary on different computers, such as < » The » symbol leads you through nested menu items and dialog box options to a final action.
Chapter 1 Introduction to Measurement Studio Measurement Computing Edition Measurement Studio integration tools are not supported in the Visual Studio 2005 Express Editions. • • • • • • Optional Installation—In order for links from Measurement Studio help topics to .NET Framework help topics to work, you must install the Microsoft .NET Framework SDK 1.1 for Visual Studio .NET 2003 or Microsoft .NET Framework SDK 2.0 for Visual Studio 2005.
Universal Library class library MccDaq Scan Components class library GPIB class library From the Windows Start menu, select Start»All Programs» National Instruments»<Measurement Studio>»Measurement Studio Documentation. The help launches in a stand-alone help viewer. From Visual Studio, select Help»Contents to view the Visual Studio table of contents.
Chapter 2 Measurement Studio Measurement Computing Edition .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.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Statistics • • • • 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.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries User Interface The Measurement Studio user interface controls are in the Windows Forms and Web Forms .NET class libraries. Refer to Table 2-1 for the UI controls provided by Measurement Studio. Table 2-1.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Waveform Graph and Scatter Graph Controls Use the Measurement Studio waveform graph and scatter graph controls, as shown in Figure 2-1, to display two-dimensional data on a Windows Forms user interface. Use the waveform graph to display two-dimensional linear data.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries • For more information about using the waveform and scatter graph controls, refer to the Using the Measurement Studio Windows Forms Scatter and Waveform Graph .NET Controls section in the NI Measurement Studio Help. Digital Waveform Graph Control Use the Measurement Studio digital waveform graph control, as shown in Figure 2-2, to display...
Page 28
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries With the complex graph control and the classes that interface with the control, you can perform the following operations: Plot Operations • • • • • • • Axis Operations •...
Page 30
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries • • Use the Measurement Studio knob, gauge, and meter controls, as shown in Figure 2-4, to input and display numeric data on your user interface. With the knob, gauge, and meter controls and the classes that interface with the controls, you can perform the following operations: •...
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries For more information about using the Windows Forms numeric edit control, refer to the NumericEdit Class section in the NI Measurement Studio Help. Switch and LED Controls Use the Measurement Studio switch and LED controls as Boolean controls on a Windows Forms user interface.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries For more information about using the property editor control, refer to the Using the Measurement Studio Windows Forms Property Editor Control topic in the NI Measurement Studio Help. Measurement Studio Support for Visual Studio 2005 Class Library Overview Measurement Studio support for Visual Studio 2005 includes all of the features and functionality described in the Measurement Studio Support for...
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Numeric Edit Array Control Use the Measurement Studio numeric edit array control, as shown in Figure 2-11, to control and visualize values of an array of With the numeric edit array control and the classes that interface with the control you can perform the following operations: •...
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Waveform Graph and Scatter Graph Controls Use the Measurement Studio waveform graph and scatter graph controls, as shown in Figure 2-12, to display two-dimensional data on a Web-based user interface. Use the waveform graph to display two-dimensional linear data.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries For more information about using the waveform and scatter graph controls, refer to the Using the Measurement Studio Web Forms Scatter and Waveform Graph .NET Controls section in the NI Measurement Studio Help. Digital Waveform Graph Control Use the Measurement Studio digital waveform graph control, as shown in Figure 2-13, to display...
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Complex Graph Control Use the Measurement Studio complex graph control, as shown in Figure 2-14, to display application. A part. With the complex graph control and the classes that interface with the control, you can perform the following operations: Plot Operations •...
Page 44
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries With all of the numeric controls and the classes that interface with them, you can perform the following operations: • • • • • • • Use the Measurement Studio knob, gauge, and meter controls, as shown in Figure 2-15, to input and display numeric data on your user interface.
Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Numeric Edit Control Use the Measurement Studio numeric edit control, as shown in Figure 2-17, to display numeric values and to provide a way by which end users can edit numeric values.
Chapter 3 Measurement Studio Integrated Tools and Features • • • • • • 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 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 ASP.NET.
Page 51
Chapter 3 Measurement Studio Integrated Tools and Features For more information about using the Add/Remove Class Libraries wizard to add or remove Measurement Studio class libraries, refer to the Adding or Removing Measurement Studio Class Libraries section in the NI Measurement Studio Help. Measurement Studio for MCC User Manual Figure 3-2.
Chapter 4 Getting Started with Measurement Studio Walkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio .NET 2003 Measurement Studio includes user interface controls, such as a waveform graph control and a gauge control, and analysis functionality such as signal generation and mathematical functions.
Page 55
Chapter 4 Getting Started with Measurement Studio Adding user interface controls to the project In this section, you will build a user interface that looks like following screenshot. Measurement Studio for MCC User Manual Select View»Toolbox to display the Toolbox. The Toolbox contains components and controls that you can add to your project.
Page 57
Chapter 4 Getting Started with Measurement Studio The following screenshot shows Generating, plotting, and analyzing the data [VB.NET] ' Declare and initialize an instance of WhiteNoiseSignal. Dim whiteNoise As New WhiteNoiseSignal() ' Store the generated data in a double array named data. Dim data As Double() = whiteNoise.Generate(1000.0, 256) ' Use the PlotY method to plot the data.
Page 59
Chapter 4 Getting Started with Measurement Studio 10. Select Gauge in the Source drop-down list. Setting the Source 11. Deselect ArrowKeys, Buttons, and Text for the InteractionMode Measurement Studio for MCC User Manual the Auto Format feature configures the appropriate control properties to reflect the style you chose.
Page 61
Chapter 4 Getting Started with Measurement Studio functionality to a Windows Forms application by taking you through the following steps: • • • Before You Begin The following components are required to complete this walkthrough: • • • • For information about installing and configuring your Measurement Computing Note DAQ device, refer to the Quick Start Guide that ships with your device.
Page 63
Chapter 4 Getting Started with Measurement Studio 10. Set the Range property for the meter with the drop-down Range type Generating and displaying the data [VB.NET] ' Declare a new Measurement Computing board object that uses board 0 Public DaqBoard As MccDaq.MccBoard = New MccDaq.MccBoard(0) [C#] private System.Windows.Forms.Button button1;...
Chapter 4 Getting Started with Measurement Studio The following screenshot shows acquired value. Walkthrough: Creating a Measurement Studio MCCDaq Scan Components Application in Visual Studio .NET 2003 Measurement Studio includes a component library and application templates that you can use to quickly create MccDaq Components applications with Visual Basic .NET and Visual C#.
Page 67
Chapter 4 Getting Started with Measurement Studio If you are working with an existing project, you can access the Add Class Libraries dialog box by selecting Measurement Studio»Add/Remove Class Libraries Wizard. Measurement Studio for MCC User Manual In the Project Types pane, expand the Measurement Studio Projects folder.
Page 69
Chapter 4 Getting Started with Measurement Studio The following screenshot shows component is shown in the component tray. Generating and displaying the data [VB.NET] ' This starts the scan AIScan1.Start() [C#] // This starts the scan private void button1_Click(object sender, System.EventArgs e) aiScan1.Start();...
Chapter 4 Getting Started with Measurement Studio 10. After your program builds and runs, click Start Scan. The following screenshot shows displaying the acquired values. Walkthrough: Creating a Measurement Studio MCC-488.2 Application in Visual Studio .NET 2003 • • • Before You Begin The following components are required to complete this walkthrough: •...
Page 73
Chapter 4 Getting Started with Measurement Studio Adding user interface controls to the project Measurement Studio for MCC User Manual Click Finish to display Form1 in the Windows Forms Designer. Select View»Toolbox to display the Toolbox. The Toolbox contains components and controls that you can add to your project. Select the Windows Forms tab.
Page 75
Chapter 4 Getting Started with Measurement Studio ' convert the string to a double Dim D As Double = Convert.ToDouble(S.Replace(NlChar, NullChar)) 'Plot the point WaveformGraph1.PlotYAppend(D, 1) Next System.Runtime.InteropServices.Marshal.FreeHGlobal(Buffer) [C#] stringwrtString = "val?"; rdBufSize = 100; char nlChar = '\n'; char nullChar = '\0';...
Chapter 4 Getting Started with Measurement Studio Walkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio 2005 Measurement Studio includes user interface controls, such as a waveform graph control and a gauge control, and analysis functionality such as signal generation and mathematical functions.
Page 79
Chapter 4 Getting Started with Measurement Studio IIf you are working with an existing project, you can access the Add/Remove Class Libraries dialog box by selecting Measurement Studio»View .NET Class Library Wizard. Measurement Studio for MCC User Manual Click Finish to display Form1 4-28 in the Windows Forms Designer.
Page 81
Chapter 4 Getting Started with Measurement Studio Measurement Studio for MCC User Manual Select the WaveformGraph control and drag and drop it onto the form. Right-click the waveform graph and select Edit Plots to display the WaveformPlot Collection Editor dialog box. You use the WaveformPlot Collection Editor to add or remove plots and to configure plot properties.
Page 83
Chapter 4 Getting Started with Measurement Studio The following screenshot shows with the user controls. Form1 Measurement Studio for MCC User Manual 4-32 ni.com...
Page 85
Chapter 4 Getting Started with Measurement Studio Customizing your user interface Measurement Studio for MCC User Manual Right-click the legend and select Edit Items to display the LegendItem Collection Editor dialog box. You use the LegendItem Collection Editor to add or remove legend items and to configure legend item properties.
Chapter 4 Getting Started with Measurement Studio 16. After your program builds and runs, click Start. Notice the graph 17. The following screenshot shows Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis in Visual Studio 2005 Measurement Studio includes user interface controls, such as a waveform graph control and a gauge control, and analysis functionality such as signal generation and mathematical functions.
Page 89
Chapter 4 Getting Started with Measurement Studio If you are working with an existing project, you can access the Measurement Studio ASP.NET Web Site Wizard dialog box by selecting Measurement Studio»View .NET Class Library Wizard. Measurement Studio for MCC User Manual Click OK.
Page 91
Chapter 4 Getting Started with Measurement Studio 10. Select the WaveformGraph control and drag and drop it into a 11. On the waveform graph smart tag, type graph for the name of the You access the smart tag by right-clicking the arrow button in the upper right corner of the control.
Page 93
Chapter 4 Getting Started with Measurement Studio Generating, plotting, and analyzing the data [VB.NET] ' Declare and initialize an instance of WhiteNoiseSignal. Dim whiteNoise As New WhiteNoiseSignal() ' Store the generated data in a double array named data. Dim data As Double() = whiteNoise.Generate(1000.0, 256) ' Use the PlotY method to plot the data.
Page 95
Chapter 4 Getting Started with Measurement Studio Measurement Studio for MCC User Manual Select graph, Plots[0] in the Source drop-down list and enter in the Text box. Click OK. Now that you have specified a legend item for the plot, changes you make to the plot are reflected on the legend. Right-click the graph and select Auto Format to display the Auto Format dialog box.
Page 97
Chapter 4 Getting Started with Measurement Studio The following screenshot shows the Web page with customization. Measurement Studio for MCC User Manual 4-46 ni.com...
Page 100
Glossary coercion Automatic conversion that Measurement Studio controls perform to change the numeric representation of a data element. complex graph A control that displays a data type represents a complex number of type a real part and an imaginary part. context-sensitive help Help for dialog boxes, the controls in dialog boxes, and keywords in source code that you can access with the key or a Help button, or by clicking the...
Page 102
Glossary gauge A control used to input or display numerical data. GPIB General Purpose Interface Bus. The standard bus used for controlling electronic instruments with a computer. Also called IEEE 488 bus because it is defined by ANSI/IEEE Standards 488-1978, 488.1-1987, and 488.2-1987.
Page 103
Driver-level software to control and communicate with Measurement Computing GPIB hardware. Measurement Studio National Instruments software that includes tools to build measurement applications in Visual Basic .NET and Visual C#. meter A control used to input or display numerical data.
Page 104
Glossary Peripheral Component Interconnect. High-performance expansion bus architecture commonly found in PCs. plot 1. Trace (data line) on a graph representing the data in one row or column of an array. 2. To display a new set of data while deleting any previous data on the graph.
Page 106
Glossary vector 1D array. VME eXtension for Instrumentation. Instrumentation architecture and bus based on the VME standard. Used in high-end test applications. waveform graph A control that displays two-dimensional data on a Windows Forms or Web Forms user interface; displays data that is uniformly spaced in one dimension.
Need help?
Do you have a question about the 374318A-01 and is the answer not in the manual?
Questions and answers