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

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

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 in either Visual C# or Visual Basic .NET?

Solution:
National Instruments currently offers a free, object-oriented, native .NET API for NI-SCOPE 3.2 or later; however, a native API for other modular instruments products is not available. Feedback on this API and requests for similar support for other instruments are appreciated and can be made to the Product Suggestion Center.

For many modular instruments products, .NET wrappers have been created and are attached below. These wrappers are based on the ANSI C API that is installed with the drivers of the respective instruments.
The following wrappers are the latest available. Noted in the list are the driver versions for use with the updated wrappers:
  • NI-FGEN_NEW — 2.6.1 and above
  • NI-HSDIO_NEW — 1.5.4 and above
  • NI-DMM_30 — 3.0 and above, supports use in 64-bit applications
  • NI-SWITCH_NEW — 3.8 and above
  • NI-DCPower_NEW — 1.3 and above

Previous:
  • 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
  • NI-SCOPE — Version 3.5
  • NI-RFSA — Version 2.1 with examples
  • NI-DMM — Versions 2.2 and above
  • NI-DMM_Updated — Versions 2.8 and above
  • NI-SWITCH — Version 2.2
  • NI-RFSG — Version 1.1
  • NI-DCPower — Version 1.1
  • Spectral Measurements Toolkit — Version 2.4 with examples
To use these wrappers from an existing project, add them to the solution using the Solutions Explorer in Microsoft Visual Studio. 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.

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.

The releated links section below contains links to pre-written examples.

Note In order to use the Spectral Measurements Toolkit (SMT) wrapper, you must have installed LabWindows/CVI support for the SMT. Also, if the SMT wrapper and the NI-RFSA wrapper are used in the same application, there may be some conflicting types, such as smtSpectrumInfo. These types will need to be removed from one of the wrappers to avoid this re-definition.



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:


NI-DMM_30.zipNI-FGEN.zipNI-HSDIO_13.zipNI-HSDIO_153.zipNI-SCOPE.zipNI-RFSA.zip
NI-DMM.zipNI-DMM_Updated.zipNI-SWITCH.zipNI-RFSG.zipNI-DCPower.zip
SMT.zipNI-DCPower_NEW.zipNI-DMM_NEW.zipNI-HSDIO_NEW.zip
NI-SWITCH_NEW.zipNI-FGEN_NEW.zip


Report Date: 05/04/2004
Last Updated: 01/14/2010
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