Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add reference for NationalInstruments.DAQmx.dll

I am writing DAQ application using C# and I need to add reference to NationalInstruments.DAQmx.dll to be able to write analog output to device.
I found the NationalInstruments.DAQmx.dll located in C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current folder.
However when I try to add reference for this file in my project using Visual Studio 2005, I am getting error that it is not COM component.
I am using Measurement Studio 8.0 and NI-DAQmx 8.3 driver.
Does anyne know the cause. Does anyone know a workaround.
0 Kudos
Message 1 of 5
(6,813 Views)

Hi Anurag_Chauhan,

I'm not sure how you're referencing the dll, but you should try something along the lines of

Imports

NationalInstruments

Imports
NationalInstruments.DAQmx

I would take a look at one of the shipping examples to see how it is done. For .Net, you can find examples in this file path:

C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Examples\DAQmx

There are several from "Analog Out" that should get you started.

Hope this helps,

Andrew S.

National Instruments

0 Kudos
Message 2 of 5
(6,799 Views)
I was trying to add reference from Visual Studio using "Add Reference" option. I figured out that it was not showing NationalInstruments.DAQmx as the .NET or COM component available to be added because I was using Visual Studio 2003 which uses .NET 1.1 framework and I probably did not enable support for .NET 1.1 at the time of install. When I tried to add refernece by selecting DLL using browse option to pick the file I got error because the file is a .NET 2.0 assembly and thus .NET 1.1 did not recognize the format.
 
When I opened the project in Visual Studio 2005 I was able to add refernece. Then I was able to access the class (via "using" for C#, via "Imports" for Java). Thanks for your help.
0 Kudos
Message 3 of 5
(6,793 Views)
This does not work for me
0 Kudos
Message 4 of 5
(5,978 Views)

Hello Megger,

 

What exactly doesn't work for you?  Are you receiving the same error as the above post, and if so what software are you using?

0 Kudos
Message 5 of 5
(5,950 Views)