Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
11 ratings:
 2.90 out of 5     Rate this Document

Microsoft Visual C# and Visual Basic .NET Wrappers for National Instruments Modular Instruments Drivers

Primary Software: Measurement Studio>>.NET Support
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Modular Instruments

Problem:
I am trying to write an application in Microsoft Visual C# or Visual Basic .NET that uses National Instruments modular instruments. What are my options for programming modular instruments from either Visual C# or Visual Basic .NET?

Solution:
National Instruments currently offers a native .NET API for NI-Scope 3.2 or later. A link to the download site can be found below.

Currently, a native API for other modular instruments products is not available. Feedback on this API, and requests for similar support for other instruments is appreciated and can be made to the product suggestion center.

For many modular instruments products, .NET wrappers have been created and are attached below. The attached wrappers are based on the ANSI C API that is installed with the drivers of the respective instruments.

These wrappers were created for the following drivers.

  • NI-FGEN - Versions 2.3 and above
  • NI-HSDIO_13 - Versions 1.3.0.4 and above
  • NI-HSDIO_153 - Versions 1.5.3 and above
  • NISCOPE_Original - Versions 2.6.1 and above
  • NISCOPE_Updated - Versions 3.2 and above. Includes 3.4 
  • NIDMM - Versions 2.2 and above 
  • NIDMM_Updated - Versions 2.8 and above
  • NI-SWITCH - Version 2.2
  • NI-RFSG - Version 1.1
  • NI-DCPower - Version 1.1

To use these wrappers from an existing project, add them to the solution by going to the Solutions Explorer. Right-click on the project name, select Add » Add Existing Item. Select the .cs or .vb file for the instrument of your choice in your Visual C# or Visual Basic .NET project.

You can refer to the individual wrapper files to make sure you include the correct namespaces. The individual .cs and .vb files contain comments that describe the individual functions.

Note The NIScope_Updated wrapper has been updated to include the OSP functionality of the NI 5142 and as a result it will require NI-Scope 3.2 or greater.

Note The NIDMM_Updated wrapper will require NI-DMM 2.8 or greater

If you are looking for examples, there are links below in the related links section that contain some already pre-written examples.



Related Links:
Drivers and Updates: NI-Scope .NET API
Product Suggestion Center
KnowledgeBase 3WA8DDLE: Using NI-HSDIO with Microsoft Visual Basic 6.0
KnowledgeBase 4IEGDQDE: Using NI-FGEN with C# and Visual Basic .NET

Attachments:

NIDMM_Updated.zip

NIDMM.zipNISWITCH.zipNIFGEN.zipniRFSG.zipniDCPower.zip
NIScope_Updated.zipNISCOPE_Original.zipniHSDIO_13.zipHSDIO_153.zip


Report Date: 05/04/2004
Last Updated: 05/07/2008
Document ID: 3939UN5B

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit