1.3 expand ansi c and .net development with express … · Œadd-on test and measurement tools for...

14
47 1.3 Expand ANSI C and .NET Development with Express Technology Bridging Validation and Test with Common Software Technology

Upload: lediep

Post on 26-May-2018

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

47

1.3 Expand ANSI C and .NET Development with Express Technology

Bridging Validation and Test with Common Software Technology

Page 2: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

48

Interactive versus Automated Measurements/Tests

Interactive Measurements

� Benchtop� Non-programmed

Automated Measurements

� Data Acq, Instr I/O� Programmed

Automated Tests

� Series of meas/tests� Sequencing (Pass/Fail)

Validation Manufacturing/RepairDesign

For those of you who prefer a text-based approach to automated measurements, National Instruments also provides text-based programming tools. These can be used to automate measurements in much the same was as LabVIEW offered in the previous session, but they adhere to the time-tested constraints of textual programming.

Page 3: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

49

Text-Based Tools for Automated Test

� LabWindowsTM/CVITM for ANSI C developers� Advanced data acquisition and analysis libraries for test

and measurement� Measurement Studio for Microsoft .NET developers

� Add-on test and measurement tools for C#, Visual Basic .NET and unmanaged Visual C++

Developers who want an open standard like C can use LabWindows/CVI, a development environment that enables users to create sophisticated GUIs controlled by ANSI C code.

Developers who want to leverage the latest Microsoft computing technology can use Measurement Studio, a set of add-on tools for the Microsoft Visual Studio .NET languages, as well as both managed and unmanaged Visual C++ code. Unmanaged code development is for those who do not want to change their current VC++ 6.0 applications to become a part of .NET. Managed code is the VC++ 7.0 code that makes use of .NET libraries.

Page 4: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

50

ANSI C Development with LabWindows/CVI� C development environment� Interactive function panels� Drag-and-drop user interface� Multi-threading capabilities� Event-driven programming� Advanced analysis libraries� Tight integration with test and

measurement hardware� Build and distribute executables

LabWindows/CVI 7.0 introduced the workspace window to increase developer productivity. The workspace window contains the different components of the LabWindows/CVI environment, such as the source windows, user interface editor, and function tree editor. The output window region of the workspace window contains various error, debug output, and results windows. The workspace window also displays the project tree and the library tree. The project tree provides access to files for each project in the workspace. The library tree provides access to function panels for the functions in the LabWindows/CVI libraries and loaded instruments.

The following LabWindows/CVI features are designed to minimize the development effort required to create engineering and scientific instrumentation applications.

• Function Panels—Function panels are graphical representations of LabWindows/CVI functions and their parameters that you can use to test function calls and paste them into your program.

• Automatic Skeleton Code Generation—With LabWindows/CVI CodeBuilder, you can create skeleton code to help you begin your program and minimize development time.

• Tight Integration between Compiler and Linker—LabWindows/CVI automatically includes header files required for its internal libraries.

• Run-Time Error Checking—LabWindows/CVI prevents you from overwriting memory locations and detects errors that other environments might not.

• Interactive Execution of Library Functions—The Interactive Execution window allows you to test code functionality without having to write a complete program.

Page 5: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

51

•Instrumentation Libraries—LabWindows/CVI includes instrument driver, data acquisition, GPIB, VXI, and Analysis libraries.

•Compatibility and Portability—LabWindows/CVI is a complete ANSI C development environment. In addition, any code you write today will be supported on all future versions of LabWindows/CVI. Code you develop in the Windows 2000/NT/Me/98 environments can be accessed from other Win32 development environments. LabWindows/CVI can access third-party DLLs and libraries on these platforms.

•Add-On Toolkits—Add-on toolkits perform specific sets of tasks to help you build applications more quickly. Available toolkits include Structured Query Language (SQL), Image Processing, Statistical Process Control (SPC), Proportional Integral Derivative (PID) Control, and more.

Page 6: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

52

LabWindows/CVI Technology Continuity� LabWindows/CVI 7.0 � 2003

� Integrated Workspace, tree control, advanced instrument and data acquisition control� LabWindows/CVI 6.0 � 2001

� ActiveX Container, additional user protection� LabWindows/CVI 5.5 � 1999

� Tables, multithreading with debugging� LabWindows/CVI 5.0 � 1998

� New instrument driver technologies� LabWindows/CVI 4.0 � 1996

� External C/C++ compiler support� LabWindows/CVI 3.1 � 1995

� Automatic program generation� LabWindows/CVI 3.0 � 1994

� Introduction of LabWindows/CVI for Windows� LabWindows for DOS 2.0 � 1991

� GUI tools and memory extender� LabWindows for DOS 1.0 � 1989

� Introduction

ANSI

C

LabWindows/CVI first emerged as a set of libraries and a development environment for creating instrumentation systems using under DOS. Over the years, new features were added to LabWindows/CVI such as the user interface editor and the integrated workspace environment, but it remains an ANSI C compiler. This continuity protects you from changes in technology that occur over time; CVI code written 10 years ago still compiles and runs in the latest version of LabWindows/CVI.

Page 7: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

53

Data Acquisition with LabWindows/CVI� Integrates with all NI measurement

hardware� Simplifies data acquisition

� Automatic configuration and test panels� Built-in channel configuration and scaling� DAQ Assistant

With LabWindows/CVI, you can get up and running quickly to acquire and generate signals from plug-in boards, USB devices, and Ethernet-based systems. LabWindows/CVI gives you the ability to easily perform high-speed waveform single-shot and continuous acquisition and generation, as well as accurate and fast single point analog and digital I/O. These I/O capabilities, combined with special datatypes and measurement analysis functions, are specifically designed to obtain the data or measurement you need from your system under test as quickly and as easily as possible.

LabWindows/CVI also includes functionality to ease data acquisition application development, including automatic configuration and test panels, the DAQ Assistant, and built-in channel configuration for scaling and naming raw data.

Page 8: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

54

Instrument Control with LabWindows/CVI� LabWindows/CVI communicates easily with instruments

� Instrument drivers� Instrument I/O Assistant

� Tools for parsing, analyzing, and presenting instrument data

LabWindows/CVI is ideal for acquiring, analyzing, and presenting data—regardless of whether that data is acquired from a traditional instrument or a data acquisition board. LabWindows/CVI provides tools to integrate with a wide range of instrument control buses, including GPIB, USB, Serial, PXI, Ethernet, and VXI. After acquiring the raw data, LabWindows/CVI has the tools for parsing, analyzing, and presenting the data.

In addition to providing direct I/O support for nearly any instrument that supports a programmatic interface, National Instruments has hundreds of instrument drivers. An instrument driver is a LabWindows/CVI library that contains high-level functions that allow you to control a specific instrument or family of instruments. You may not use an instrument driver if you only need to send a few commands to your instrument, a pre-existing driver does not exist, or you do not need to distribute a set of commands to others. Express technology introduced the Instrument I/O Assistant to provide an interactive tool for connecting to and controlling instruments, which you will learn more about later in this presentation.

Page 9: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

55

Measurement Studio for Visual Studio .NET� Adds native controls and class libraries for test and control

� User interface controls� Advanced analysis� Hardware classes

� Comparable data acquisition and instrument control capabilities to LabWindows/CVI� Integrated function libraries� DAQ Assistant, Instrument I/O Assistant

� Fully integrated into Visual Studio environment

Measurement Studio is the most comprehensive suite of native measurement and automation tools and class libraries for Visual Studio .NET. Measurement Studio dramatically reduces application development time with wizards, simplified data networking, and .NET user interface controls designed specifically for test application development.

Code designers interactively define reusable data acquisition tasks and automatically generate code. Advanced analysis libraries and rich object-oriented hardware APIs, such as data acquisition and instrument control, enable the development of sophisticated measurement applications. Through the Measurement Studio add-ons, Visual Studio has data acquisition and instrument control capabilities similar to those of LabWindows/CVI.

The highly extensible .NET class libraries in Measurement Studio for Visual Studio .NET deliver unparalleled flexibility. Measurement Studio is completely integrated into the Visual Studio environment, meaning that the Measurement Studio libraries and Help resources can be accessed side-by-side with their native Visual Studio counterparts.

Page 10: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

56

Measurement Studio Data Analysis Tools� Waveform, array-based, and single-point analysis� Measurement-oriented analysis libraries� Hundreds of built-in functions for

inline analysis:� Curve fitting and interpolation� FFT and frequency analysis� Signal generation� Mathematics� Probability and statistics� Time and frequency domain analysis� Digital signal processing

Measurement Studio provides hundreds of built-in comprehensive tools designed specifically for extracting useful information from any set of acquired data and for analyzing measurements and processing signals. Measurement Studio offers functions that you can easily incorporate into your programs in order to perform inline analysis and to add decision-making capabilities to your applications. Available functions include mathematics libraries, advanced signal processing tools, measurement analysis functions, such as FFT and power spectrum, signal generation, digital filters, and curve fitting. In this seminar, we will not cover these analysis functions in depth. For more information, visit ni.com/analysis.

Page 11: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

57

Measurement Studio UI Controls� Controls, indicators needed

for test and measurement� Knobs, dials, buttons,

switches, graphs, and LEDs� Designed to be extensible

� Developers can use .NET to add new functionality

Visual Studio does not provide any scientific controls and indicators, but they are often essential for test and measurement applications.

Measurement Studio includes native .NET controls such as graphs, dials, gauges, LEDs, sliders, tanks, numeric edits (double data type), and knobs. All of these controls can be configured to create robust and professional user interfaces that integrate seamlessly with your .NET application. Attributes such as color, font size, and graph type can be instantly reconfigured, and you can even rotate, zoom, and pan your graphs at runtime.

Page 12: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

58

Time-Saving Features in Both Environments

� DAQ Assistant� Interactive interface to NI-DAQmx architecture� Customize timing, triggering, and scales

� Instrument I/O Assistant� Interactive approach to instrument connectivity� Auto data parsing� Complete code generation

LabWindows/CVI and Measurement Studio both provide the following productivity tools (which also are found in LabVIEW) to accelerate development and enable more powerful DAQ and instrument control applications:

• DAQ Assistant—Provides a user interface to interactively configure measurement tasks, channels, and scales, specifying timing and triggering characteristics of the measurements. It is fully integrated into LabWindows/CVI and Visual Studio .NET.

• Instrument I/O Assistant—Provides a user interface to interactively write commands to a device, read data that the device returns, and specify how to parse the response into a format relevant to your application. It is fully integrated into LabWindows/CVI and Visual Studio .NET.

These Assistants simplify writing DAQ and instrument control applications by automatically generating code from your configuration in either C (LabWindows/CVI) or Visual Basic .NET, Visual C# and Visual C++ (Measurement Studio).

Page 13: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

59

Demo � Instrument Control in LabWindows/CVI

In this demonstration, you will see how the Instrument I/O Assistant can be used within LabWindows/CVI to interactively configure instrument queries, parse the responses and then generate code to allow developers to quickly create automated instrument control applications.

Page 14: 1.3 Expand ANSI C and .NET Development with Express … · ŒAdd-on test and measurement tools for C# ... environment that enables users to create sophisticated GUIs controlled by

60

Summary� LabWindows/CVI

� Provides technology continuity from one version to the next� Easy access to GUI editor, project files, libraries, and debugging� Integrates with all NI measurement devices

� Measurement Studio for Microsoft Visual Studio .NET� Most comprehensive suite of .NET add-on measurement tools� Native .NET controls and class libraries for acquiring, analyzing

and presenting test data