Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

which dll to use for .NET interface? langint.dll or NationalInstruments.NI4882.dll?

Hello,

I'm just starting to write some C# code to interface with a PCI-GPIB card.

Which dll should I use: langint.dll or NationalInstruments.NI4882.dll?

Are there any advantages to one over the other?  Will NI still be supporting both in a couple of years?
Does Measurement Studio care which one I use?  Does one provide better documenation???

Any help would be appreciated.

Tim.
0 Kudos
Message 1 of 5
(6,621 Views)

Hi Tim.

If you are starting a new project, you should use NationalInstruments.NI4882.dll. It provides better documentation, examples, integration with Visual Studio, integration with Measurement Studio, and is the library that the Instrument I/O Assistant generates code for. It also provides a more natural .NET programming experience by representing programming idioms in a manner consistent with the rest of the .NET Framework. It will continue to be supported and will definitely be supported in Visual Studio 2005 and .NET Framework 2.0.

langint.dll, on the other hand, is a flat wrapper on top of the C API. Its purpose is to help developers who are very familiar with the C API and just want to port a C program to .NET (likely C#). I'm not sure whether it will be supported in Visual Studio 2005 and .NET Framework 2.0. I will look into this.

 

0 Kudos
Message 2 of 5
(6,616 Views)
Thanks for the info - you nailed it. Thanks for pointing out the documentation; it's very helpful.

OK, another newbie question:

I've done some simple gpib programming before, but I'm new to C# and OOP stuff. Is there any example code available that shows how to build a board class, an instrument class, and maybe a base class for a Power Meter or Sig gen, etc?

I'm not familiar with the low level control like error checking, or exception handling, and definitely not in an OOP context. I'm willing to wade into it, but I'm looking for whatever help I can get.
0 Kudos
Message 3 of 5
(6,600 Views)
Hi Tim,
 
There are examples that ship with the 488.2 driver.  When you install the 488.2 driver, you must select to install support for Measurement Studio.  This will install the 488.2 examples in the National Instruments program directory under Measurement Studio.  This is explained in this KnowledgeBase entry:
 
 
You can also try searching the Example Code library for other examples:
 
 
 
0 Kudos
Message 4 of 5
(6,583 Views)

There are some example installed for the NI.NI4882.dll (native .NET GPIB library) under C:\Program Files\National Instruments\MeasurementStudio2003\DotNET\Examples\GPIB as well. This examples are installed along with documentation when you enable .NET support during the GPIB installation process.

Bilal Durrani
NI
0 Kudos
Message 5 of 5
(6,571 Views)