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
(405 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
Semiconductor Validation & Production Test
Soliton Technologies
NI CLD, CTD
LabVIEW + TestStand + TestStand Semiconductor Module (2013 - 2020)
NI STS for Mixed signal and RF
0 Kudos
Message 2 of 6
(396 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
(365 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
Semiconductor Validation & Production Test
Soliton Technologies
NI CLD, CTD
LabVIEW + TestStand + TestStand Semiconductor Module (2013 - 2020)
NI STS for Mixed signal and RF
0 Kudos
Message 4 of 6
(361 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
(348 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
Semiconductor Validation & Production Test
Soliton Technologies
NI CLD, CTD
LabVIEW + TestStand + TestStand Semiconductor Module (2013 - 2020)
NI STS for Mixed signal and RF
0 Kudos
Message 6 of 6
(345 Views)