Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

install NI-DAQmx driver in Linux device

Hi, I have installed NI-DAQmx driver and also nidaqmx python library in my linux machine. 

 

This error show up when I execute below code:

 

Vincent_007_0-1676986449737.png

File "/usr/local/lib/python3.8/dist-packages/nidaqmx/_lib.py", line 213, in _import_lib
raise DaqNotFoundError(
nidaqmx._lib.DaqNotFoundError: Could not find an installation of NI-DAQmx. Please ensure that NI-DAQmx is installed on this machine or contact National Instruments for support.

 

 

Is there anyone knows how to fix it?

Message 1 of 5
(3,233 Views)

I have similar issue, unfortunately did not find a fix yet.

 

my test code is:

import nidaqmx
system = nidaqmx.system.System.local()
len(system.devices)
for device in system.devices:
    print(device.name)

And the result for "python testdaq.py" is:

Traceback (most recent call last):
  File "/home/testdaq/testnidaqmx.py", line 3, in <module>
    len(system.devices)
  File "/usr/local/lib/python3.10/dist-packages/nidaqmx/system/_collections/device_collection.py", line 72, in __len__
    return len(self.device_names)
  File "/usr/local/lib/python3.10/dist-packages/nidaqmx/system/_collections/device_collection.py", line 90, in device_names
    cfunc = lib_importer.windll.DAQmxGetSysDevNames
  File "/usr/local/lib/python3.10/dist-packages/nidaqmx/_lib.py", line 160, in windll
    self._import_lib()
  File "/usr/local/lib/python3.10/dist-packages/nidaqmx/_lib.py", line 205, in _import_lib
    raise DaqNotFoundError(
nidaqmx._lib.DaqNotFoundError: Could not find an installation of NI-DAQmx. Please ensure that NI-DAQmx is installed on this machine or contact National Instruments for support.

 

0 Kudos
Message 2 of 5
(3,059 Views)

Small progress happened, got rid of the error message. Did the following:

 

#installs the nidaqmx from apt
apt install ni-daqmx
#reboot has to be done
reboot

But the errror kind of  persists.

I edited a bit my testprogram:

import nidaqmx
system = nidaqmx.system.System.local()
print("There is %d devices available " % (len(system.devices)))
for device in system.devices:
    print(device.name)

So "python testdaq.py" provides following output:

There is 0 devices available

while lsusb gives:

Bus 001 Device 003: ID 3923:71df National Instruments Corp. NI USB-6525

I guess the issue may be that the nidaqmx for linux does not support my beautiful usb6525 device :(, or does anyone have different knowledge? 

0 Kudos
Message 3 of 5
(3,053 Views)
0 Kudos
Message 4 of 5
(3,043 Views)

All USB-based DAQmx devices (with the exception of USB cDAQ) are not supported on Linux Desktop and Linux RT.

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