From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USb 6501 control with Excel 64 bit

Hello,

I am using USb 6501 to control various inputs on my board using the below Excel VBA code.

https://forums.ni.com/t5/Example-Code/Using-DAQmx-with-Microsoft-Excel-Visual-Basic-for-Applications...

This works fine with  32 bit excel on 64 bit Windows 10 PC. But this code doesn't work with 64 bit Excel on Windows 10 64 bit PC. Tried to modify the code as per suggestions from google search (Like changing "Long" to "LongPtr" etc..) and is not helping. Any changes in NI DAQmx C API needed?

Really appreciate a help on this so that I can control USB 6501 using 64 bit Excel VBA.

Thanks,

Leyo

0 Kudos
Message 1 of 6
(1,261 Views)

I am guessing that this has to do with the C DLL being 32-bit and you cannot load a 32-bit library in a 64-bit application.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PA7SSAW&l=en-US

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(1,252 Views)

Thanks.. This a bad news..

Ni DAQmx DLL supports both 32 bit and 64 bit windows 10, but not 64 bit applications like Excel or Labview, right.

Does Ni have any plans to  fix this so that we can use  NI DAQmx in 64 bit applications?

Thanks,

Leyo

0 Kudos
Message 3 of 6
(1,221 Views)

Based on my search, DAQmx does come with both 32-bit and 64-bit DLLs

santo_13_0-1634526222967.png

 

SysWOW64 = 32-bit dll

System32 = 64-bit dll

 

I know, the 64 and 32 in folder names do not directly match the actual bitness - this is how Windows manages to run 32-bit apps on 64-bit OS.

 

In your VBA app add a reference to the one from System32 and that should work.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 6
(1,217 Views)

Thanks.

 

LeyoJoseph_0-1634568485994.png

As  shown above, Excel VBA reference can only be added to .tb files. There is no equivalent file in System folder. I tried to add the "nicaiu.dll" file as you suggested,  excel VBA didn't allow me to add.

I am stuck now...don't know what to do. As many people are using 64 bit version of office, NI has to help us with a solution.

0 Kudos
Message 5 of 6
(1,204 Views)

Looks like the tlb files are available only in 32-bit.

 

It would be good to reach out to NI Support for help.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 6
(1,201 Views)