01-13-2011 03:57 AM
Hello !
I installed NIDAQmxBase in Ubuntu 10.04.1 Server following the various instructions in this forum. After a lot of trial and error I managed to get the NI-USB 6009 recognized in lsdaq.
-------------------------------- Detecting National Instruments DAQ Devices Found the following DAQ Devices: NI USB-6009: "Dev1" (USB0::0x3923::0x717B::01586A5A::RAW) --------------------------------
However the examples hang.
These are my kernel modules:
arc4 1153 2 bitblit 4707 1 fbcon cfg80211 126528 2 rt2x00lib,mac80211 crc_ccitt 1339 1 rt2800usb fbcon 35102 71 font 7557 1 fbcon i2c_isch 3375 0 led_class 2864 2 rt2x00lib,sdhci lp 7028 0 mac80211 205402 2 rt2x00usb,rt2x00lib mii 4381 1 r8169 Module Size Used by nidimk 322759 2 nipxirmk nikal 57594 1 nipalk niorbk 95647 2 nipxirmk,nidimk nipalk 1220783 6 NiViPciK,nipxirmk,nidimk,niorbk nipxirmk 115018 1 NiViPciK 79087 0 output 1871 1 video parport 32635 1 lp pata_sch 1963 0 psmouse 63245 0 r8169 34364 0 rt2800usb 31531 0 rt2870sta 461971 0 rt2x00lib 27541 2 rt2800usb,rt2x00usb rt2x00usb 9703 1 rt2800usb sdhci 15654 1 sdhci_pci sdhci_pci 5502 0 serio_raw 3978 0 snd 54180 6 snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer snd_hda_codec 74201 2 snd_hda_codec_idt,snd_hda_intel snd_hda_codec_idt 51978 0 snd_hda_intel 22101 0 snd_hwdep 5412 1 snd_hda_codec snd_page_alloc 7172 2 snd_hda_intel,snd_pcm snd_pcm 70918 2 snd_hda_intel,snd_hda_codec snd_timer 19098 1 snd_pcm softcursor 1189 1 bitblit soundcore 6620 1 snd tileblit 2031 1 fbcon usb_storage 39585 2 vga16fb 11385 1 vgastate 8961 1 vga16fb video 17375 0
These are the running processes (for clarity I included only the processes with names starting with ni):
1222 pts/0 00:00:00 nipalps 1234 ? 00:00:00 niLxiDiscovery 1242 ? 00:00:00 nimdnsResponder 1248 ? 00:00:00 nipalsm
These are the installed ni packages:
ii nidaqmxbase-board-support 3.4.0-1 NI-DAQmx Base Hardware Support ii nidaqmxbase-cinterface 3.4.0-1 NI-DAQmx Base API (C version) ii nidaqmxbase-common 3.4.0-1 NI-DAQmx Base Common Configuration Utilities ii nidaqmxbase-labview2009-vis 3.4.0-1 NI-DAQmx Base API (LabVIEW 2009 version) ii nidaqmxbase-labview2010-vis 3.4.0-1 NI-DAQmx Base API (LabVIEW 2010 version) ii nidaqmxbase-labview85-vis 3.4.0-1 NI-DAQmx Base API (LabVIEW 8.5 version) ii nidaqmxbase-labview86-vis 3.4.0-1 NI-DAQmx Base API (LabVIEW 8.6 version) ii nidaqmxbase-usb-support 3.4.0-1 NI-DAQmx Base USB Device Support ii nidimi 1.10.0-f0 NI-DIM ii nimdnsresponder 1.1.0-f3 National Instruments mDNS Responder Service ii niorbi 1.9.3-f0 NI-ORB ii nipxirmi 1.6.0-f0 NI-PXI Platform Services ii nirpci 4.2.0-f0 NI-RPC user library un nis <keine> (keine Beschreibung vorhanden) ii nivisa 5.0.0-f0 NI-VISA Runtime Engine -- Abtraction layer for access to NI-488, PCI/PXI, USB, ii nivisak 5.0.0-f0 NI-VISA Runtime Engine Kernel Support
These are the dependencies of the example program:
linux-gate.so.1 => (0xb78df000) libnidaqmxbase.so.3 => /usr/local/lib/libnidaqmxbase.so.3 (0xb78d2000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb78b3000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7758000) libnidaqmxbaselv.so => /usr/local/lib/libnidaqmxbaselv.so (0xb774e000) /lib/ld-linux.so.2 (0xb78e0000) liblvrtdark.so.10.0 => /usr/local/lib/liblvrtdark.so.10.0 (0xb6529000) libstdc++.so.6 => /usr/local/lib/LabVIEW-2010/patchlib/libstdc++.so.6 (0xb6447000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6421000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb641d000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6404000)
I would greatly appreciate your help to find out what makes the examples hang.
Due to post size limitations I will post my gbd debug session in the next post.
Martin Jukel
Solved! Go to Solution.
01-13-2011 04:37 AM
It turned out the I was just too impatient. However, it seems strange to me why it takes so long to start
time ./acquire1Scan Acquired reading: 0,003858 real 1m9.577s user 1m8.840s sys 0m0.388s
As you can see the process takes 100% CPU time (confirmed by monitoring with top also).
I modified the acquireNScans sample so that 100x1000 samples are taken. This is the result:
time ./acquireNScans Acquired 1000 samples data[0] = -0,005064 data[1] = -0,001240 data[2] = -0,005064 data[3] = -0,002515 data[4] = -0,001240 data[5] = -0,002515 data[6] = 0,000034 data[7] = 0,003858 data[8] = 0,002583 data[9] = 0,002583 real 1m19.248s user 1m9.744s sys 0m0.616s
Therefore it seems to me that this is a startup problem, because with acquireNScans the elapsed real time is 9,671s longer whereas the consumed user time is only 0,904s longer.
Help to find the cause for this would still be appreciated.
Martin Jukel
01-13-2011 09:55 AM
@Martin Jukel wrote:Therefore it seems to me that this is a startup problem, because with acquireNScans the elapsed real time is 9,671s longer whereas the consumed user time is only 0,904s longer.
Yes, and there is a workaround. Please see my post in another thread:
libnipalu.so failed to initialize
http://forums.ni.com/t5/Multifunction-DAQ/libnipalu-so-failed-to-initialize/m-p/1282246#M60196
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
01-18-2011 07:57 AM
It works now as expected. Many thanks for your help.
Martin
03-20-2011 03:59 AM
Hi,
I was happy to see that someone managed to install NIDAQmxBase in Ubuntu 10.04.1, which is exactely what I want to do. When I read further though, I realized that you'd already solved that problem...
I've been lookin around in the forum to find solutions, but I'm not sure where to start. I read somewhere that the drivers need to be compiled for the used kernal. I that necessary?
Could you give some hints on what forum entries to look at?
Thanks.
12-26-2011 08:03 PM
Hi Martin,
I am trying to install the NiDAQmxBase in Ubuntu 11 because I need to work with a NI-USB 6009. Could you please give me any clues? I've looking in the forum for some time without any success at all.
Thanks in advance
Acebo