WPF in Test and Measurement

Publish Date: Jul 26, 2018 | 2 Ratings | 4.00 out of 5 | Print


Based on the Benefits of WPF Technology described in the previous tutorial, you may choose WPF to build your next .NET test or measurement application for enhanced visual feel and improved usability. To save development time, National Instrumens offers NI Measurement Studio, a suite of tools and class libraries for WPF, Windows Forms and Web Forms application development.

Table of Contents

  1. WPF Tools for Building Test and Measurement UIs
  2. What is NI Measurement Studio?
  3. NI Measurement Studio Features
  4. NI Measurement Studio WPF Controls
  5. Additional Resources

1. WPF Tools for Building Test and Measurement UIs

In applications where data collection is inevitably followed by processing and visualization, the user interface represents the space where engineers and scientists make important decisions based on the data they see. To design an intuitive interface, user input controls should mimic the controls present in physical instruments. Buttons, sliders, knobs and switch controls help create a similar user experience to laboratory instrumentation. Similarly, graphs and charts represent signals in ways that a user can understand trends, behavior and correctness of the systems being measured or tested. Numerical values are best represented as gauges, meters and tanks so that a user can easily interpret whether a value fits within expected limits. Building such user interface components from scratch is a difficult and lengthy task.

National Instruments has just released a suite of WPF user interface controls specifically designed for measurement, automation and test industries as part of the NI Measurement Studio suite of tools. Developers can customize and extend these controls to create professional and intuitive user experiences for internal, as well has externally sold applications.

Back to Top

2. What is NI Measurement Studio?

NI Measurement Studio is an integrated suite of tools and class libraries created specifically for .NET programmers. It is designed for engineers and scientists building test, measurement, and control applications using Microsoft Visual Studio 2010/2008/2005. Measurement Studio increases developer productivity by extending the Microsoft .NET Framework and provides measurement and automation classes as well as WPF, Windows Forms and Web Forms controls for Visual Basic .NET and Visual C#.

Building on more than 20 years of measurement programming expertise, NI Measurement Studio includes features for simplified integration with data acquisition and instrument control interfaces, advanced analysis libraries, measurement data networking, wizards, and interactive code designers for test and measurement application design. With Measurement Studio, you use your Visual Studio programming knowledge to quickly create and deploy a complete measurement solution.

Back to Top

3. NI Measurement Studio Features

Direct Integration With Visual Studio

NI Measurement Studio tools integrate natively into Visual Studio .NET so you can use them exactly as you would Microsoft tools. Measurement Studio dramatically reduces application development time with project templates, wizards, and hardware API assistants.

  • Integrated Templates, Wizards, and Help Documentation
  • Drag-and-Drop User Interface (UI) Controls

Engineering-Specific User Interface Controls

Measurement-specific user interface (UI) components that you can drag, drop, and extend to create a custom interface to your measurement applications. Create professional measurement and automation GUIs for WPF, Windows and Web applications without spending months on development. These controls include buttons, knobs, slides, gauges, tanks, dials, and graphs. Because the Measurement Studio controls are extensible, the UI components empower you to present data in a more informative manner than vendor-defined box instruments.

  • Present Data in an Intuitive and Impactful Format
  • Easily Create Professional UIs

Advanced Analysis and Signal Processing Libraries

Powerful analysis classes in Visual Basic .NET and Visual C# .NET to convert raw data into meaningful information. With Measurement Studio analysis interfaces, you can employ a wide variety of signal processing and data analysis tools, such as curve fitting, spectral analysis, statistics, and visualization. By performing analysis inside your application, you can integrate more intelligent data processing before storing or presenting the information.

  • Draw Meaningful Information From Your Data
  • Inline Processing of Raw Data

Simplified Hardware Communication

Whatever you use to acquire your data—a GPIB, USB, or serial instrument; a plug-in data acquisition device; PXI hardware; or a modular instrument—NI Measurement Studio provides a high-level interface for your hardware that is native to your development language. In addition to the interfaces, Measurement Studio provides innovative, code-generating hardware API assistants that help you quickly create measurement applications.

  • Shorter Time to Meaningful Measurements
  • Productivity Tools to Accelerate Development

Extensible Classes and Components

The architecture of off-the-shelf components is critical in determining the amount of customization possible with a control or class library. The Measurement Studio classes and user interface (UI) controls are designed to maximize their customization. By using the Measurement Studio component base classes as a foundation for extensibility, you can easily inherit from and extend the classes to create customized classes and controls, such as a custom graph or proprietary I/O bus communication.

  • Extend Classes, Controls, and Hardware Interfaces
  • Customize the User Experience

Compatibility With NI TestStand

NI TestStand is ready-to-run test management software that is designed to help you develop validation and automated test systems faster. You can use NI TestStand with Measurement Studio to develop test modules in any .NET language and deploy test systems to production with easy-to-use operator interfaces created using Measurement Studio user interface (UI) controls.

  • Automate the Test Process
  • Flexible Debugging

Back to Top

4. NI Measurement Studio WPF Controls

The new Measurement Studio WPF controls offer the following benefits:

  • Templates and styles to customize the look and feel of the controls
  • Extensive support for multiple data sources, including arrays, waveforms, and .NET collections; and an extensibility system to support custom data types
  • Integration with Visual Studio 2010, including a new WPF project template, toolbox integration, and the Add/Remove Class Libraries Wizard
  • Native support for DateTime, TimeSpan, PrecisionDateTime, PrecisionTimeSpan, and all primitive data types, plus Complex, Point, and Point3D data for graphs
  • Reusable primitive components, such as scales
  • Rich design-time experience, including multi-level context menus, and increased functionality for smart tags

WPF Graph Controls

Measurement Studio WPF graph controls include support for customizing the appearance of graphs, customizable annotations, and cursor, plot, legend, and axis features. Additionally, specific WPF graph controls include the following functionality:

Graph—Use this graph to display 2D Cartesian data that requires two axes. You can plot and chart with the Graph control, and you can display data using lines, points, bars, and areas. The graph control supports multiple plots.

WritableGraph—Use this graph to provide your end users with the ability to draw data into the graph. As with the graph control, you can plot and chart data, and you can display written data using lines, points, bars, and areas. This graph supports multiple plots. The written data and plots are controlled by the InputData and InputPlots properties, separate from the Data and Plots properties inherited from the graph.

IntensityGraph—Use this graph to display 3D data on a 2D plot, with color representing the third dimension. You specify the three-dimnensional data as a 2D array of singleton values. The IntensityGraph renders each value as a rectangle filled with the color that is associated with that value from the intensity graph ColorScale class. The size of the plot area and the ranges of the x and y axes determine the size of the rectangles. You can plot and chart with the intensity graph control.

PolarGraph—Use this graph to display 2D complex or point data composed of angle and radius values. The PolarGraph supports multiple plots. You can use the PolarAngularAxis to specify the system used to divide the circumference of the circle, in degrees or radians.

WPF Numeric Controls

The new Measurement Studio WPF numeric controls provide the following functionality:

NumericTextBoxDouble and RadixNumericTextboxInt32—Store, display, and edit numeric data types using the NumericTextBoxDouble and the RadixNumericTextboxInt32 controls.

KnobDouble,GaugeDouble, and MeterDouble— Interact with and display numeric values in a radial scale using the KnobDouble control, and display numeric values in a radial scale using the GaugeDouble and MeterDouble controls.

SliderDouble and TankDouble—Interact with and display numeric values in a linear scale using the SliderDouble, and display numeric values in a linear scale using the TankDouble.

WPF Boolean Controls

The new Measurement Studio WPF Boolean controls to display and edit Boolean data:

  • BooleanButton
  • BooleanContentButton
  • ArrowButton
  • Switch
  • LED
  • PowerButton

Back to Top

5. Additional Resources

Next Tutorial: Getting Started with WPF

Learn about NI Measurement Studio Tools for .NET Developers

Back to Top

Bookmark & Share


Rate this document

Answered Your Question?
Yes No