Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI845x 64 bits support

Hi all,

 

I have made a C#.NET application which drive NI8452 board.

 

The app is working perfectly in 32 bits mode.

When I switch to 64 bits, the app loads the 64 bits DLL and the first functions are working : ni845xFindDevice, ni845xOpen.

But the next function like "ni845xI2cSetPullupEnable" raise an error code -301706, in french "La référence de périphérique n'est pas valide. Vérifiez que la référence de périphérique fournie contient un nom de périphérique valide."

 

I tried to make a sample app in C++ (native) in 64 bits. But I don't find ni845x.lib in 64 bits version.

 

So I suspect that this board is not fully compatible 64 bits, or I made in pistake.

 

Thanks in advance for your help

 

 

 

0 Kudos
Message 1 of 10
(1,400 Views)

Check if there is any ni845x.lib under

C:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\lib64

ZYOng_0-1700574297948.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 2 of 10
(1,385 Views)

I already checked, there is no lib for 64 bits

 

maxmont_0-1700584617664.png

 

maxmont_1-1700584651198.png

 

0 Kudos
Message 3 of 10
(1,370 Views)

Hi all,

 

I would like to know if I made a mistake or if this board is not fully supported in 64 bits.

How can I get support from NI?

 

Thanks for your help

0 Kudos
Message 4 of 10
(1,338 Views)

Open a Service Request Case Using the NI Service Request Manager (SRM)

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 5 of 10
(1,323 Views)

OK, but I don't have service ID so I don't think that I can benefit some support.

 

0 Kudos
Message 6 of 10
(1,279 Views)

Hi all,

 

I have build by myself ni845x.lib in 64 bits from ni845x.dll.

I try a C/C++ sample provided by NI (in 64 bits) and I get the same error.

So I'm pretty sure that this board is not running with 64 bits application. 

 

I'm quite disappointed from a compagny like NI and by seeing the price of the board.

 

0 Kudos
Message 7 of 10
(1,255 Views)

Can you share the NIPM package list image to see if you installed it correctly?

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 8 of 10
(1,243 Views)

maxmont_0-1702018259095.png

 

0 Kudos
Message 9 of 10
(1,227 Views)

The conclusion that 64-bit is not supported would seem to be wrong, otherwise you could never successfully invoke ni845xFindDevice() or ni845xOpen(). What is most likely the problem is that in your C# interop file (you do not link in lib files in a C# application but instead interface to the DLL through an interop file which imports the different functions dynamically) the declaration for all the functions taking an NiHandle are wrong. The NiHandle is a handle, which is almost always a pointer sized variable type and that means you need to declare the functions to use a pointer sized integer type for this parameter. Otherwise when calling the function in 64-bit the actual 64-bit value returned from the DLL is coerced into the 32-bit integer that your interop interface uses and that will loose 32-bits of the value. On the next call the 32-bit value is passed to the function but the higher significant 32-bits are undefined, and that of course is not a valid handle.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(859 Views)