Measurement Computing 374318A-01 User Manual

National instruments network device 374318a-01user manual
Table of Contents

Advertisement

Quick Links

Measurement Studio
TM
Measurement Computing
Edition
TM
User Manual
Measurement Studio for MCC User Manual
March 2006
374318A-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 374318A-01 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Measurement Computing 374318A-01

  • Page 1 Measurement Studio Measurement Computing Edition User Manual Measurement Studio for MCC User Manual March 2006 374318A-01...
  • Page 2 Thailand 662 278 6777, United Kingdom 44 0 1635 523545 For further support information, refer to the Contacting Measurement Computing Corp. appendix. To comment on National Instruments documentation, refer to the National Instruments Web site at and enter ni.com/info the info code feedback ©...
  • Page 3: Important Information

    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 5: Table Of Contents

    Universal Library ...2-7 MccDaq Scan Components...2-7 User Interface...2-8 Windows Forms Controls ...2-9 Waveform Graph and Scatter Graph Controls ...2-10 Digital Waveform Graph Control...2-12 Complex Graph Control ...2-13 Legend Control...2-15 Numeric Controls ...2-15 © National Instruments Corporation Measurement Studio for MCC User Manual...
  • 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 ...
  • Page 7 Contents Appendix A Contacting Measurement Computing Corp. Glossary Index © National Instruments Corporation Measurement Studio for MCC User Manual...
  • Page 8: About This Manual

    Refer to the NI Measurement Studio Help within the Visual Studio environment for function reference and detailed information about the Measurement Studio class libraries, wizards, assistants, and other features. © National Instruments Corporation Introduction to Measurement Edition, is an overview of Measurement...
  • Page 9: Conventions

    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.
  • Page 10: Introduction To Measurement Studio Measurement Computing Edition

    To install Measurement Studio, your computer must have the following: • • • © National Instruments Corporation Microsoft Windows 2000/XP Microsoft .NET Framework 1.1 for Visual Studio .NET 2003 or Microsoft .NET Framework 2.0 for Visual Studio 2005 Standard, Professional, Enterprise Developer, Enterprise Architect, or Academic edition of Microsoft Visual Studio .NET 2003 and...
  • Page 11: Deployment Requirements

    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.
  • Page 12 11. In the Installation Summary dialog box, review the features you 12. Click Next to complete the installation. 13. If prompted, click the appropriate restart option. If you did not install © National Instruments Corporation Chapter 1 Introduction to Measurement Studio Measurement Computing Edition Click Install NI Measurement Studio for Visual Studio .NET 2003...
  • Page 13: Measurement Studio Features

    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.
  • Page 14 The following resources also are available to provide you with information about Measurement Studio. • • • • © National Instruments Corporation Chapter 1 Introduction to Measurement Studio Measurement Computing Edition Examples—Measurement Studio installs examples to the following paths: –...
  • Page 15: Measurement Studio Support For Visual Studio .Net 2003 Class Library Overview

    • • • • • • Refer to the following sections for information about each Measurement Studio .NET class library. © National Instruments Corporation Getting Started with Measurement Analysis Common MCC-488.2 Universal Library MccDaq Scan Components User Interface Studio, for...
  • Page 16: Analysis

    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.
  • Page 17: Windowing

    • Filters • • • • • • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Sine Wave Square Wave Triangle Wave Uniform White Noise Blackman Window Blackman-Harris Window Blackman-Nuttall Window Cosine Tapered window...
  • Page 18: Signal Processing

    Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries • • • Signal Processing • • • • • • • • • • • • • • • • • • • Linear Algebra • • • • •...
  • Page 19: Array And Numeric Operations

    • • • • Curve Fitting • • • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Determinant Dot Product Inverse Matrix Matrix Condition Number Matrix Multiplication Matrix Norm Matrix Rank Outer Product...
  • Page 20: Statistics

    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.
  • Page 21: Mcc-488.2

    Use the MccDaq Scan Components library to perform the following types of tasks: • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries namespace. This class library is included when you Device Board namespace.
  • Page 22: User Interface

    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.
  • Page 23: Windows Forms Controls

    For more information about easily using the .NET user interface controls, refer to the Using the Measurement Studio Windows Forms .NET Controls section in the NI Measurement Studio Help. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries...
  • Page 24: Waveform Graph And Scatter Graph Controls

    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.
  • Page 25 • Additional Operations • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Specify plots in the scatter graph control as X and Y data. Specify plots in the waveform graph control as X or Y data and optionally with date and time scaling.
  • Page 26: Digital Waveform Graph Control

    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 27: Complex Graph Control

    Complex Graph Control Use the Measurement Studio complex graph control, as shown in Figure 2-3, to display interface. A © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Specify anti-aliased digital plots. Expand and collapse signal plots interactively.
  • 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 29: Legend Control

    With all of the numeric controls and the classes that interface with them, you can perform the following operations: • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Pan and zoom interactively. Configure major, minor, and custom divisions and origin lines.
  • 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: •...
  • Page 31: Numeric Edit Control

    • • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Fill to the minimum or maximum value of the scale. Position the scale horizontally with left, right, or both and position the scale vertically with top, bottom, or both.
  • Page 32: Switch And Led Controls

    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.
  • Page 33: Property Editor Control

    • • • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Control Scale Arc Property Edit any .NET type at run time, including collections. Edit expandable properties that represent nested properties of another object, such as major divisions of an axis.
  • Page 34: Measurement Studio Support For Visual Studio 2005 Class Library Overview

    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...
  • Page 35: Switch And Led Array Controls

    For more information about using the switch and LED array controls, refer to the Using the Measurement Studio Windows Forms Control Array .NET Controls topic in the NI Measurement Studio Help. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Figure 2-10.
  • Page 36: Numeric Edit Array Control

    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: •...
  • Page 37: Asp.net Web Forms Controls

    Uplevel browsers include recent versions of Microsoft Internet Explorer and Mozilla Firefox. All other browsers are downlevel browsers. The following sections describe each of the Measurement Studio Web Forms user interface controls. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Waveform graph...
  • Page 38: Waveform Graph And Scatter Graph Controls

    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.
  • Page 39 Additional Operations • • • © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Specify plots in the scatter graph control as X and Y data. Specify plots in the waveform graph control as X or Y data and optionally with date and time scaling.
  • Page 40: Digital Waveform Graph Control

    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...
  • Page 41 For more information about using the digital waveform graph control, refer to the Using the Measurement Studio Web Forms Digital Waveform Graph .NET Control section in the NI Measurement Studio Help. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Plot digital waveform data, including digital signal state data and timing information.
  • Page 42: Complex Graph Control

    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 43: Legend Control

    The numeric controls include a knob, gauge, meter, slide, thermometer, and tank. The following sections describe operations available with the controls and the classes that interface with them. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Configure a graph to include multiple axes or independent ranges so that plot data fits the graph plot area.
  • 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.
  • Page 45 For more information about using the Web Forms knob, gauge, meter, slide, tank, or thermometer controls, refer to the Knob, Gauge, Meter, Slide, Tank, or Thermometer Class sections in the NI Measurement Studio Help. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Specify the start and sweep angle of the arc programmatically or from the Properties window.
  • Page 46: Numeric Edit Control

    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.
  • Page 47: Switch And Led Controls

    For uplevel browsers, the client-side script rendered by the AutoRefresh control uses a client callback to update the associated controls on the client without posting the page back to the server. © National Instruments Corporation Chapter 2 Measurement Studio Measurement Computing Edition .NET Class Libraries Figure 2-18.
  • Page 48: Measurement Studio Integrated Tools And Features

    NI Measurement Studio Help for more information about the functionality of these tools and features. Measurement Studio Menu The Measurement Studio menu provides an easy way to access the following National Instruments resources and tools: • • • © National Instruments Corporation...
  • Page 49: Creating A Measurement Studio Project

    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 50: Adding Or Removing Measurement Studio Class Libraries

    When you exit the wizard, the wizard adds or removes the appropriate references to or from the project, thus adding or removing the functionality associated with the class library. © National Instruments Corporation Chapter 3 Measurement Studio Integrated Tools and Features Figure 3-1.
  • 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.
  • Page 52: Getting Started With Measurement Studio

    Measurement Studio in Visual Studio .NET 2003: • • • • © National Instruments Corporation Walkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio .NET 2003 Walkthrough: Creating a Measurement Studio Measurement Computing DAQ Application in Visual Studio .NET 2003 Walkthrough: Creating a Measurement Studio MCCDaq Scan Components Application in Visual Studio .NET 2003...
  • Page 53: Walkthrough: Creating A Measurement Studio Application With Windows Forms Controls And Analysis In Visual Studio .Net 2003

    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 54 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. © National Instruments Corporation Chapter 4 In the Templates pane, select Windows Application. Specify MyMeasurementStudioProject of your choice.
  • 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 56 12. Select the NumericEdit control and drag and drop it onto the form. 13. Select the Gauge control and drag and drop it onto the form. 14. Right-click the gauge and select Properties to display the Properties 15. Type © National Instruments Corporation Chapter 4 Type for the Name. Click OK.
  • 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 58 // Display the mean on the gauge. gauge.Value = mean; Customizing your user interface © National Instruments Corporation Chapter 4 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.
  • 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 60: Walkthrough: Creating A Measurement Studio Measurement Computing Daq Application In Visual Studio .Net 2003

    Measurement Computing DAQ functionality such as analog input and digital I/O. This walkthrough is designed to help you learn how to add Measurement Computing DAQ © National Instruments Corporation Chapter 4 Mode Editor dialog box, change the Precision to shows the data plot, and the gauge and the numeric edit display the mean of the data.
  • 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 62 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. Adding user interface controls to the project © National Instruments Corporation Chapter 4 Application Wizard automatically adds references to the appropriate class libraries.
  • 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;...
  • Page 64 // Display value on meter. meter1.Value =volts; 2003 © National Instruments Corporation Chapter 4 Scroll down to move the cursor inside the click event handler of the button control. Add the following code to read a raw data point from a specified channel on the Measurement Computing device, convert the data to volts, and display the value on the meter.
  • Page 65: Walkthrough: Creating A Measurement Studio Mccdaq Scan Components Application In Visual Studio .Net 2003

    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 66 DAQ device, refer to the Quick Start Guide that ships with your device. You can also use the DEMO-BOARD simulated DAQ device to complete this walkthrough. Setting up the project © National Instruments Corporation Chapter 4 Generating and displaying the data—Using the...
  • 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 68 Adding user interface controls to the project 10. Right-click the AIScan component ( 11. Click on the ClockRate property and type © National Instruments Corporation Chapter 4 Select View»Toolbox to display the Toolbox. The Toolbox contains components and controls that you can add to your project.
  • 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();...
  • Page 70 End Sub [C#] private void aiScan1_ErrorOccurred(object sender, MccDaq.ScanComponents.ErrorOccurredEventArgs e) aiScan1.Stop(); MessageBox.Show(aiScan1.Status, "AI Scan Error"); © National Instruments Corporation Chapter 4 Double-click the component to open the code window. AIScan Add the following lines of code to the component to copy the analog data to an array.
  • Page 71: Walkthrough: Creating A Measurement Studio Mcc-488.2 Application In Visual Studio .Net 2003

    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 72 Setting up the project 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. © National Instruments Corporation Chapter 4 MCC-488.2 Library Measurement Computing GPIB Device Open Visual Studio .NET from Start»All Programs»Microsoft...
  • 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 74 ' Read the response from the Fluke45 Dim S As String = Device.ReadString(RdBufSize) ' Replace the newline character with a null and © National Instruments Corporation Chapter 4 Double-click the button control to display the cursor inside the click event handler of the button control.
  • 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';...
  • Page 76: Measurement Studio Walkthroughs For Visual Studio 2005

    MCC-488.2 Application in Visual Studio .NET Measurement Studio Measurement Computing DAQ Application in Visual Studio .NET 2003 for more walkthroughs available in Visual Studio 2005. © National Instruments Corporation Chapter 4 Form1 Walkthrough: Creating a Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio 2005...
  • Page 77: Walkthrough: Creating A Measurement Studio Application With Windows Forms Controls And Analysis In Visual Studio 2005

    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 78 © National Instruments Corporation Chapter 4 In the Project types pane, select Measurement Studio under Visual C# or Visual Basic, depending on which language you want to create the project in. In the Templates pane, select NI Windows Application. Specify MyMeasurementStudioProject of your choice.
  • 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 80 Adding user interface controls to the project In this section, you will build a user interface that looks like following screenshot. © National Instruments Corporation Chapter 4 Select View»Toolbox to display the Toolbox. The Toolbox contains components and controls that you can add to your project.
  • 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 82 13. Select the Gauge control and drag and drop it onto the form. 14. Click the gauge smart tag to display the Gauge Tasks. You access the 15. Type © National Instruments Corporation Chapter 4 Type for the Name. Click OK.
  • 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 84 // Use the Mean method to calculate the mean of the data. double mean = Statistics.Mean(data); // Display the mean on the gauge. gauge.Value = mean; © National Instruments Corporation Chapter 4 Double-click the button control to display the cursor inside the click event handler of the button control.
  • 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.
  • Page 86 13. Select the Format Mode property and in the Numeric Edit Format 14. Select File»Save Form1.cs to save your application. 15. Select Debug»Start Without Debugging to run the application. © National Instruments Corporation Chapter 4 Click the gauge smart tag to display the Gauge Tasks.
  • Page 87: Walkthrough: Creating A Measurement Studio Application With Web Forms Controls And Analysis In Visual Studio 2005

    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 88 The following components are required to complete this walkthrough: • • Setting up the project © National Instruments Corporation Chapter 4 Customizing the user interface—Using the Collection Editor and Auto Format dialog boxes, you will display the mean value on the gauge and the numeric edit, as well as customize your user interface.
  • 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 90 Adding user interface controls to the project In this section, you will build a Web page that looks like the following screenshot. © National Instruments Corporation Chapter 4 Select View»Toolbox to display the Toolbox. The toolbox contains components and controls that you can add to your project.
  • 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 92 14. On the numeric edit smart tag, type 15. Select the Gauge control and drag and drop it into a table cell. 16. On the gauge smart tag, type © National Instruments Corporation Chapter 4 numeric edit ID. gauge following screenshot shows the Web page with the user controls.
  • 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 94 // Display the mean on the gauge. gauge.Value = mean; Customizing your user interface © National Instruments Corporation Chapter 4 Select the Default.aspx tab to return to the Web Forms Designer. Right-click the legend and select Edit Items to display the LegendItem Collection Editor dialog box.
  • 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 96 14. Select File»Save Form1.cs to save your application. 15. Select Debug»Start Without Debugging to run the application. 16. After your program builds and runs, click Start. Notice the graph © National Instruments Corporation Chapter 4 Select Dark and click OK.
  • 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 98 You can reach Measurement Computing Corp. through the following ways: Mail Measurement Computing Corp. 16 Commerce Blvd. Middleboro, MA 02346 Telephone 508-946-5100 508-946-9500 Technical Support techsupport@MeasurementComputing.com Sales sales@measurementcomputing.com Other correspondence info@measurementcomputing.com Visit our Web site at © National Instruments Corporation www.measurementcomputing.com Measurement Studio for MCC User Manual...
  • Page 99 Callbacks are asynchronous and are accomplished with XML-HTTP. Client callbacks do not include postback data, and they do not force the page to refresh. Client callbacks do require a browser that supports the XML-HTTP protocol. © National Instruments Corporation Measurement Studio for MCC User Manual...
  • 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 101 LEDs, and other controls and indicators. File Transfer Protocol. Protocol based on TCP/IP to exchange files between computers. © National Instruments Corporation browser. extension that you can run independently of the .exe...
  • 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 105 A control used to input or display numerical data. User Interface. uplevel browser Recent generation Web browser that supports rich client interaction and functionality. See also © National Instruments Corporation downlevel browser. Measurement Studio for MCC User Manual Glossary...
  • 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.
  • Page 107 Measurement Studio Application with Windows Forms Controls and Analysis in Visual Studio 2005 (walkthrough), 4-29 Measurement Studio MCC 488.2 Application (walkthrough), 4-23 © National Instruments Corporation Measurement Studio MCC DAQ Application (walkthrough), 4-10 Measurement Studio MCC Scan Components Application (walkthrough), 4-16...
  • Page 108 Index InstaCal, 3-1 installation optional, 1-2 requirements, 1-1 knob .NET control, 2-16 .NET Web Forms control, 2-30 LED array control, 2-21 LED control, 2-18, 2-33 legend control, 2-15, 2-29 MCC-488.2 .NET class library, 2-7 Measurement Studio developing with, 3-1 Menu, 3-1 overview, 1-1 Preferences, 3-2 resources, 1-4...
  • Page 109 Creating a Measurement Studio Application with Webs Forms Controls and Analysis in Visual Studio 2005, 4-39 © National Instruments Corporation Creating a Measurement Studio Application with Windows Forms Controls and Analysis, 4-2 Creating a Measurement Studio Application with Windows Forms...

This manual is also suitable for:

Measurement studio

Table of Contents