Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a Linux driver for the NI DAQ USB-6211?

Ah, brief update:
  i realized that the forum post here actually links to nidaqmxbase 3.1 , whereas i had been using 2.1 ! it's unfortunate that the easiest way to find the most recent drivers is to carefully comb the forums!

so, i've installed nidaqmxbase 3.1, as described above, and now i get a slightly more useful abort error:

--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
/usr/local/bin/lsdaq: line 7:  6015 Aborted                 (core dumped) /etc/natinst/nidaqmxbase/bin/daqmxbase_listdevices
--------------------------------


So , as previous,  if anyone understands what libnipalu is or why it won't work ... etc

thanks!


0 Kudos
Message 11 of 21
(7,666 Views)
.. and finally, if i run updateNIDrivers, i just get :

ERROR: make of nikal kernel module failed, not installing kernel module.


log attached.
0 Kudos
Message 12 of 21
(7,663 Views)
one more update:   so i noticed that some of the errors i was getting, (SA_INTERRUPT not defined, SA_SHIRQ not defined) were reported by people having problems with SATA drivers, and that the recommended fix there was to recompile the kernel with the SATA drivers compiled in, instead of as modules,  so i did this, and now lsdaq doesn't crash... it still doesn't find my boards though!
0 Kudos
Message 13 of 21
(7,648 Views)
hi everyone,
 
 just posting a sort of closure to my own stream of questions :

1. it looks like i'm using the comedi drivers, because i guess unlike National Instruments, those dudes know how to write drivers that install and work, even on debian based installs.

2. if anyone has a great solution to the problems i was having before, i think that my coworkers would be happier if their old labview things would still work in linux, so i'm still somewhat interested in hearing the wisdom on how to resolve these issues where everything seems fine but lsdaq won't find the boards, and updateNIDrivers won't work because nikal can't compile itself.


but seriously, dear national instruments representative who hopefully reads this : i know it's not your fault personally, but the current state of linux support is fairly pathetic and reflects poorly on NI as a company that can't support its own products.

0 Kudos
Message 14 of 21
(7,628 Views)


@chicago_joe wrote:
1. it looks like i'm using the comedi drivers, because i guess unlike National Instruments, those dudes know how to write drivers that install and work, even on debian based installs.

Personally I think that the comedi drivers are an excellent choice provided that they have the functionality you desire.  Please keep in mind that these drivers were able to be written because NI provided register level programming manuals and driver development kits for the hardware.  Without this information from NI these drivers would have been much more difficult to develop.


@chicago_joe wrote:
2. if anyone has a great solution to the problems i was having before, i think that my coworkers would be happier if their old labview things would still work in linux, so i'm still somewhat interested in hearing the wisdom on how to resolve these issues where everything seems fine but lsdaq won't find the boards, and updateNIDrivers won't work because nikal can't compile itself.

In this case it sounds like the comedi drivers may not be the best choice because of your desired LabVIEW integration.  So lets take a look at you NI-KAL problem.  The first thing I noticed from the log you posted is that not only are you using a Linux distribution that NI does not officially support, but you are also using a distribution that has not been officially released.  It is very unlikely that NI will ever provide support for a Linux distribution that the distributor considers unstable.

With that said you have two NI-KAL compiler errors against the 2.6.24 kernel.  If you are comfortable with C both can be easily fixed by editing /usr/local/natinst/nikal/src/nikal.c.  The first error is that "enable_wake" member no longer exists (Hint: search for enable_wake and delete the line).  The other error is that SA_INTERRUPT has been replaced by IRQF_DISABLED and SA_SHIRQ has been replaced with IRQF_SHARED (Hint: search for these two variables and replace them).  After your edits you can try running updateNIDrivers to recompile NI-KAL.

Shawn Bohrer
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
Message 15 of 21
(7,587 Views)
Hi,
 
I banged my head against the "abort (core dumped)" problem and here's (succintly) how I solved it:
 
  • You need to use alien (get it with "sudo apt-get install alien") to convert the .rpms into .deb with the command alien -d --scripts *.rpm
  • Then you need to install the debs thus created with dpkg -i *.deb
  • You're not yet done, you need also to install the rpms (this appears redundant, but if you install just the debs, you lack some libraries, and if you just install the rpms, you lack some symbolic links). Get the rpm package manager (I think it's required by alien so it will be installed, else use sudo apt-get install rpm).
  • Use rpm to install the rpms on debian. Since debian's not RPM based, RPM will complain about dependencies, so you need to use --nodeps. One way you can do that is with commands: mv /usr/bin/rpm /usr/bin/rpm.real and the do pico /usr/bin/rpm (or emacs depending on your favorite editor) and type:

#!/bin/sh
exec /usr/bin/rpm.real --nodeps $*

  • Remember to chmod +x /usr/bin/rpm. Another caveat is that Ubuntu uses dash by default while the scripts in the RPMs were written for bash; so change your symbolic link in /bin/sh (do rm /bin/sh and then ln -s /bin/bash /bin/sh).
  • Lastly install the rpms in the folder where you extracted the ISO image with rpm *.rpm. You may need to install NI-VISA separately with rpm /nivisa/*.rpm

Please keep in mind that I'm writing this off the top of my head; the commands may not all be exactly right (as I did this a little while ago), but I hope it's helpful anyways. Also, I was using a USB-6211 which is a slightly different model.

Message 16 of 21
(7,575 Views)
Hello Shawn,

IRQF_DISABLED and IRQF_SHARED did solve _one_ issue not beeing able to compile nikal.c for 2.6.24-kernel.
Thanks a lot!

The _other_ problem was, the installer didn't find pte_offset:
/usr/local/natinst/nikal/src/objects/nikal.c:1659: error: implicit declaration of function ‘pte_offset
and the installer complained about
pte_offset function: /bin/grep: /lib/modules/2.6.24-xxx/build/include/asm-i386/*: No such file or directory

The simple solution was like that:
"asm-i386" subdir is really non existent anymore but replaced with "asm-x86".
So i linked it to a asm-i386 and all went well 🙂

Thanks for this forum and Your help!
Loetknecht
Message 17 of 21
(7,546 Views)

Kit: thank you so much for the clear install directions. I did get my USB-6211 to function under Ubuntu 8.10 / Linux 2.6.24-19, however the steps I required were slightly different, and so I include them here:

 
Below are the steps to install NI DAQmx Base under Ubuntu 8.10, as they worked for me. Your milage may vary.

1.  Download the ISO file for the latest version of DAQmx Base. As of this writing, it is version 3.1 available at http://joule.ni.com/nidu/cds/view/p/id/967/lang/en.

2. Open a termnal and cd into the directory you downloaded the iso to.

3. Mount and extract the iso. (individual steps shown below)

     a) mkdir ni_cd

     b) mkdir ni_ex

     c) sudo mount -o loop nidaqmxbase-3.1.0.iso ni_cd

     d) cp -r ni_cd/* ni_ex/

     e) sudo umount ni_cd

     f) rmdir ni_cd

     g) rm nidaqmxbase-3.1.0.iso #optional, to save space

     h) cd ni_ex

4. Now you are in the directory with the extracted iso contents.
5.  Run "apt-get install alien" to install the alien program, used to convert rpms to debs.

6.  Run "alien --scripts -d *.rpm" to create the deb packages.

7.  Install the debs by running "dpkg -i *.deb".

8. If you run "lsdaq" now you should get an error message about a missing "liblvrtdark.so.8.2". To fix this, you must install several of the rpms, as kit discovered, because of missing sim-links.:

  a) In your ni_ex directory, run "rpm --nodeps -i *.rpm".

  b) "cd nivisa/lvruntime"

  c) "rpm --nodeps -i *.rpm" #this will install the symlink liblvrtdark.so.8.2 which is required for lsdaq.

  d) NOTE: depending on your purposes, you may have to install some more of the rpms in the nivisa directory.

     also note: if you experience errors (not just warnings) at this step you may need to take kit's suggestion of fiddling with /bin/sh and /usr/bin/rpm, from a previous post of his.

9. Now, reboot your machine for good measure.

10. Test your install by plugging in your USB-6211 (or similar) and running "lsdaq". It should acknowledge the device after a second or so.

11. Test your device by  running NI's example programs:

    a) cd /usr/local/natinst/nidaqmxbase/examples/ai    #analog input examples directory

    b) make     #compile the examples

    c) ./acquireNScans    #after running this you should see 10 data samples taken from your device.

 

In light of the difficulties experienced in choosing rpms I wonder if NI could use a less distro-specific packaging system for their software.

 

Thank you NI for providing the specs and Linux drivers for your  equipment, particularly the register-level specifications. Those two policies make NI products/services much more attractive for me.

 

Yours,

 Chris

Stevens Institite of Technology

Message 18 of 21
(6,889 Views)

Hi all,

 

I tried to isntall a NI USB 6009 on Kubuntu 10.10 with 2.6.35-24-generic kernel for some days now... without success so far.

Basically what I did is:

 

a)Followed your steps with NI DAQmx Base 2.10, but no success with step 10, lsdaq doesn't show any devices.

 

b)same with NI DAQmx Base 3.4.0, except step 8 isn't necessary any more.

 

I read about firmware issues with DAQmx and DAQmx base, so I installed the base firmware using windows.

lsdaq doesn't show the device, lsusb does.

 

Any Ideas?

0 Kudos
Message 19 of 21
(3,259 Views)

Hi MTer,

 

I wanted to let you know that, although we don't appear to have any DAQmx Base drivers that are specifically tested with Kubuntu (as you can find by searching here), you may want to try posting this in the Linux Community as another resource to find some answers.

 

Hope this helps,

Andrew

National Instruments
0 Kudos
Message 20 of 21
(3,201 Views)