11-29-2024 11:44 AM
In running a test program
viOpenDefaultRM(&defaultRM);
ViStatus stat = viOpen(defaultRM, "GPIB::1::INSTR", VI_NULL, VI_NULL, &instr);
I see in eventwvr
[nipalu] Warning: .\source\lib\windows\loadKern.cpp:145 - libKernelDriverInit: Could not load NIPALK. status=-50250
and viOpen returns VI_ERROR_LIBRARY_NFOUND
Clearly the library has been found (Loader Snaps doesn't show anything else) but the initialization is failing!
Can anyone point me at what might be wrong?
Alan
12-04-2024 09:28 AM
A driver typically consists nowadays of several layers of driver files. There is the user space driver interface, in the form of at least one but often several shared libraries. NI VISA uses a layered driver architecture with a generic VISA driver interface and bus specific low level "passport" drivers. So far all of that is user space and simply seems to work on your system.
But under modern OSes, user space code is not allowed to access physical hardware resources. For that you need kernel drivers. Each of the VISA passport drivers calls into a bus specific kernel driver such as GPIB, PXI or the standard OS serial port driver. The NI device drivers on their turn use other NI specific helper device drivers to manage DMA, Interrupt and memory access. This is the niPAL driver (Platform Abstraction Layer).
From the error message this is obviously not Windows but apparently Linux. And those device drivers need to be properly installed and Linux likes to throw in wrenches into the wheels of any driver that was not supplied in full source code. Most likely you try to use a NI-488.2 driver that was not specifically released for your Linux version and distribution. You will have to check what version you installed and what Linux distribution version you have and how compatible they are.
12-04-2024 10:13 AM
Thanks for explaining the layers. I hadn't appreciated that - I can see visa loading ni4882.dll and using this for GPIB calls, but as you say this won't be able to directly access hardware. This was windows as it happens where drivers do involve a lot more magic and a lot less visibility.
Alan
12-04-2024 10:23 AM
What Windows version and what NI-VISA and NI-488.2 version?
That event message looked quite verbose for Windows (I'm not used to see source code line messages from Windows). 😁