Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Simple DAQ Example in Visual C# .NET with the Measurement Studio 6.0 ActiveX Controls

5 ratings | 4.00 out of 5
Print

Downloads

Filename: simple_daq_read_in_c_sharp.zip
Requirements: View

This simple data acquisition example demonstrates how to integrate Measurement Studio ActiveX controls into the Visual Studio .NET development environment. Using the Measurement Studio Analog Input control (CWAI), the data is acquired continuously, then plotted on a Measurement Studio Graph control (CWGraph). To run this program, configure the CWAI control to acquire data from an existing device and channel. To configure the control, right-click the CWAI control and select Properties. On the Conditions tab, select Stop and Continuous.

NOTE: The Measurement Studio ActiveX controls were designed for use in Visual Basic 6. When using these controls in Visual Studio .NET, keep the following differences in mind:
- Visual Studio .NET generates a Run-time Callable Wrapper (RCW) around each control, and you must go through the Interop layer to use the controls. As a result, some class names are different.
- Hosting an ActiveX control in Visual Studio .NET requires unmanaged code permissions.
- Hosting an ActiveX control in a Windows Form increases the size of your project files because the entire control is embedded in the form.

For more information about using ActiveX controls in Visual Studio .NET, refer to the Visual Studio .NET help.

Requirements


Filename: simple_daq_read_in_c_sharp.zip

Software Requirements


Application Software: Measurement Studio Visual Basic Support 6.0
Language(s): C#
Additional Software: Visual Studio 7.0

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy)

 
5 ratings | 4.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).