Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Kernel dead when using NI-DAQmx API on Linux

Solved!
Go to solution

Hi, I am new to Linux and NI devices. 

 

We are working on the project and the goal is to use Python API on a Linux-based (Debian) to connect to an NI-9185 and read the acceleration data remotely.

I managed to get python script to work on my local PC (Direct Ethernet connect to NI-9185), but I have encounter several issues when I try to do the same on the Linux system.

 

I have installed the NI-DAQmx driver and followed the steps here without any error message. However, When I try to run the following code, the Jupyter Notebook Kernel always stops, and the log is also attached.

May I ask what may have caused the issue and how to resolve it? Also, I saw the NI-DAQmx-supported OS has only Ubuntu but no Debian. Is it even possible to get it to work on Debian? 

 

Really appreciate your time and help!

 

import nidaqmx

with nidaqmx.Task() as task:
print(nidaqmx.__version__)

 

Liwenhu_1-1693926325809.png

 

0 Kudos
Message 1 of 11
(2,835 Views)

What does sudo dkms status show?  How about sudo systemctl status nipal?

0 Kudos
Message 2 of 11
(2,831 Views)

I tried the commands, the returns are below, anything looks off?

Liwenhu_0-1693927460619.png

 

0 Kudos
Message 3 of 11
(2,828 Views)
Solution
Accepted by topic author Liwenhu

Yes, the nipal service is not running.  sudo systemctl start nipal.service should get it going for this session.  However, it should have started on boot when you rebooted after installing everything, so if it is not then we should figure that out.

Message 4 of 11
(2,818 Views)

Thank you the code works!

But do you know what may causing this to not start automatically? Is there anyway we can fix this?

 

0 Kudos
Message 5 of 11
(2,770 Views)

Does it fail to start again when you reboot?

0 Kudos
Message 6 of 11
(2,767 Views)

Yes, it does, I also tried on another Linux machine (ubuntu) and same thing happens.

0 Kudos
Message 7 of 11
(2,762 Views)

Also, when I follow the instruction to rap up the installation, the code (below) is not giving any response. Wandering if this is causing the issue.

BTW, due to the space limit on the server, I have only installed ni-daqmx package and nothing else, could this lead to the issue?

Liwenhu_0-1694014036094.png

 

0 Kudos
Message 8 of 11
(2,760 Views)

dkms status looks correct, so dkms autoinstall did what it needed to do.  It may be that modules built during the installation process and there was nothing left to do.

 

If you did apt-get install ni-daqmx or similar, it will automatically install all of the necessary dependencies, so that shouldn't be a problem.

 

What exact version of Ubuntu did you try it on?

0 Kudos
Message 9 of 11
(2,753 Views)

It's Ubuntu 20.04.

I reboot the Ubuntu again, and it is working now, I will try to reboot the server again later as well.

0 Kudos
Message 10 of 11
(2,746 Views)