Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

build a ribbon in C# whitch use NI-6501

Hi.

 

I want to build a ribbon to Microsoft Office Excel with Microsoft Visual Studio 2010.

I have a problem to assembly the NI DLLs' with my application.

I have added the both files : "NationalInstruments.DAQmx.dll" , "NationalInstruments.Common.dll" as references, and so, the VS2010 doesn't recognized the code I wrote.

I looked an exsample from the CD, and I dont know what is the different between the references.

 

What did I do worng, what did I miss?

 

Thanks, Lior

 

0 Kudos
Message 1 of 7
(2,016 Views)

Hi Lior,

 

I just had a couple of questions to ask you. Are you using a library in NationalInstruments.DAQmx.dll or in NationalInstruments.Common.dll? Also what was the name of the CD you were using, and the name of the example? Also, what is the application involving Microsoft Excel? I just wanted to clarify so I can better answer you question.

 

 

Sunaina K.
Product Marketing Manager for CompactRIO & TSN

Making the intangible, tangible
0 Kudos
Message 2 of 7
(1,995 Views)

Thank you for the reply.

 

I use both libraries: NationalInstruments.DAQmx.dll & NationalInstruments.Common.dll.

About the CD, I  downloaded this software version : NIDAQ917f2.

The example I used is "ReadDigChan".

 

The application I want to buils is to read data from the NI device and display it on the cell in the active sheet in Microsoft Excel.

I want to realize the application by clicking an Add-On whicth I build in C#.

I hope this is more helpfull for you to answer me.

 

Greetings ,

 

Lior Malik

0 Kudos
Message 3 of 7
(1,991 Views)

Hi Liorm,

 

I was able to pull up the example you mentioned and did not see the references to NationalInstruments.DAQmx.dll or NationalInstruments.Common.dll. I am not quite clear on the error you are running into. Is the code not compiling, or are the values showing up incorrectly in Excel? If you could include a screen shot off the error you are running into, that would be very helpful. 

Sunaina K.
Product Marketing Manager for CompactRIO & TSN

Making the intangible, tangible
0 Kudos
Message 4 of 7
(1,976 Views)

Hi Sunaina,

 

I added two images to show the situation. Picture "Working" is a photo of your example. Picture "Not Working" is a photo of my software. I added the reference to two DLL files and still it does not work.

for now I just build the software as application software and not Add-On for Excel, which mean that the problem is not to do the Add-On to Excel, but the references only.

 

I dont know if it is importent but I am working on Visual Studio 2010.

 

Lior

Download All
0 Kudos
Message 5 of 7
(1,971 Views)

Hi Liorm,

 

I found a couple of good websites with troubleshooting tips on this problem:

 

http://stackoverflow.com/questions/3304741/vs2010-getting-type-or-namespace-name-could-not-be-found-...

 

http://social.msdn.microsoft.com/Forums/eu/csharpide/thread/1a1c2ca7-5296-4a3f-b9e2-3323dbbd076d

Sunaina K.
Product Marketing Manager for CompactRIO & TSN

Making the intangible, tangible
0 Kudos
Message 6 of 7
(1,948 Views)

Hi Sunaina

 

I'm sorry for the late respond, the links you sent was very usefull!

the problem was that the version I had installed didnt support framework 4, thus I installed newer version which support it.

 

Thank you very much

Lior

0 Kudos
Message 7 of 7
(1,923 Views)