Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nidaqmx does support Linux #122

Closed
hemanandsamba opened this issue Apr 19, 2021 · 10 comments
Closed

nidaqmx does support Linux #122

hemanandsamba opened this issue Apr 19, 2021 · 10 comments

Comments

@hemanandsamba
Copy link

hemanandsamba commented Apr 19, 2021

I am on Centos8:

uname -a
Linux afss-pil-15 4.18.0-240.15.1.el8_3.x86_64 #1 SMP Mon Mar 1 17:16:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

and nidaqmx works fine. There are two PCI6323 devices on my linux machine

Python 3.6.8 (default, Aug 24 2020, 17:57:11)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nidaqmx
>>> [dev.name for dev in nidaqmx.system.System.local().devices]
['NI_PCIE_6323_1', 'NI_PCIE_6323_2']
>>>

Why does the documentation still say it supports ONLY windows?

@Ahsoka
Copy link

Ahsoka commented Apr 30, 2021

Hey @hemanandsamba,

This is very cool! How did you set this up?

Thank you!
@Ahsoka

@hemanandsamba
Copy link
Author

hemanandsamba commented Apr 30, 2021

Hey @hemanandsamba,

This is very cool! How did you set this up?

Thank you!
@Ahsoka

Follow instructions at https://www.ni.com/en-us/support/documentation/supplemental/18/downloading-and-installing-ni-driver-software-on-linux-desktop.html with the rpm packages at https://www.ni.com/en-us/support/downloads/drivers/download.ni-linux-device-drivers.html#350003.

Once installed, we need to add supporting package for enabling TDMS file generation. This is achieved by:

sudo curl http://download.ni.com/support/softlib/labview/labview_runtime/2020/Patches/f1/Linux/LabVIEW2020f1RTE_Linux.tgz --output lvrt2020.tgz
sudo tar -xzf lvrt2020.tgz
sudo yum install nitdmsi-19.0.0.49152-f0.x86_64.rpm

Last metadata expiration check: 0:53:56 ago on Wed 07 Apr 2021 07:41:59 PM EDT.
Dependencies resolved.
====================================================================================================================================================================================================================
Package Architecture Version Repository Size
====================================================================================================================================================================================================================
Installing:
nitdmsi x86_64 19.0.0.49152-f0 @commandline 275 k

Transaction Summary
====================================================================================================================================================================================================================
Install 1 Package

Total size: 275 k
Installed size: 765 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: nitdmsi-19.0.0.49152-f0.x86_64 1/1
Installing : nitdmsi-19.0.0.49152-f0.x86_64 1/1
Running scriptlet: nitdmsi-19.0.0.49152-f0.x86_64 1/1
Verifying : nitdmsi-19.0.0.49152-f0.x86_64 1/1
Installed products updated.

Installed:
nitdmsi-19.0.0.49152-f0.x86_64
sudo yum install nitdmsi-19.0.0.49152-f0.x86_64.rpm

@Ahsoka
Copy link

Ahsoka commented May 1, 2021

Thank you very much! I can't wait to try this. Also a small note, the first link in your post is broken. Here's the correct link: https://www.ni.com/en-us/support/documentation/supplemental/18/downloading-and-installing-ni-driver-software-on-linux-desktop.html

@prlw1
Copy link

prlw1 commented Aug 9, 2021

I just had a go on a fresh ubuntu 20.04.2 installation, but failed. Oddly, I see no errors, just no devices either. Any thoughts on how to debug?

The card is recognised:

$ lspci | grep -i national
05:00.0 Unassigned class [ff00]: National Instruments PCI-6014
  1. Installed "NI Linux Device Drivers" (2021 Q3) for ubuntu 20, so apt search ^ni- lists packages
  2. apt update, and apt install nidaqmx
  3. python3 -m pip install nidaqmx

rebooting / installing keys of 3rd parties seems to have worked as

[   19.898133] nikal: loading out-of-tree module taints kernel.
[   19.898143] nikal: module license 'Copyright (c) 2002-2021 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/>.' taints kernel.

AFAIR the 6014 driver is included in nidaqmx, so nothing else should be necessary.

Unfortunately:

Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nidaqmx
>>> [dev.name for dev in nidaqmx.system.System.local().devices]
[]
>>> 

Also installed nitdmsi as per above with sudo alien -i nitdmsi-19.0.0.49152-f0.x86_64.rpm just in case, but no change. (Was that part of your procedure essential?)

@mcejp
Copy link

mcejp commented Aug 9, 2021

@prlw1 Might it be just a matter of permissions? What if you launch python with sudo?

@prlw1
Copy link

prlw1 commented Aug 9, 2021

Thanks, I hadn't though of that, but

$ sudo python3
[sudo] password for user: 
Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nidaqmx
>>> [dev.name for dev in nidaqmx.system.System.local().devices]
[]
>>> 

:-/

@prlw1
Copy link

prlw1 commented Aug 10, 2021

Prodding a tiny bit more:

$ lsmod | egrep ^ni
nipxirmk              303104  1
nimru2k               774144  3
nimxdfk               593920  5 nimru2k
nidimk                376832  6 nimru2k,nipxirmk
nimdbgk               466944  7 nimru2k,nipxirmk,nimxdfk
niorbk                122880  5 nimdbgk,nimru2k,nipxirmk,nimxdfk,nidimk
nipalk               1245184  11 nimdbgk,nimru2k,niorbk,nipxirmk,nimxdfk,nidimk
nikal                 126976  7 nimdbgk,nimru2k,niorbk,nipxirmk,nimxdfk,nidimk,nipalk
$ cat /run/nidevldu.status 
DevLoader Init time: 6008 ms
        - Resource Expert Init time: 5803 ms
        - PXI Init time: 202 ms
        - APAL synchronize count: 1

0 Device(s) Found:

@alpomb
Copy link

alpomb commented Sep 2, 2021

I have the same problem @prlw1 :(
Were you able to fix it?

@zhindes
Copy link
Collaborator

zhindes commented Feb 9, 2022

Duplicate of #54

@zhindes zhindes marked this as a duplicate of #54 Feb 9, 2022
@zhindes zhindes closed this as completed Feb 9, 2022
@MrMegaMango
Copy link

same problem as @prlw1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants