Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux device driver and ready-to compile user application for USB 6009

Solved!
Go to solution

Hi,

   I intend to use USB-6009 data acquisition card under Linux Platform. For that I need the linux device driver for USB-6009 Data Acquistion card and some read-to-compile-and-use 'User application program' that could take samples from the card, implement some buffering or write them to the file. It would be advantageous if I could also get a sample code to generate a low frequency sinusoidal signal using the D-to-A converter available on the board.

Also I need specific installation instructions for NI-DAQ software under standard linux environment.

 

Thanks for your prompt and detailed response,

Adeel Malik,

Research Engineer,

Institute of Telecommunication Research,

Mawson Lakes Boulevard,

Mawson Lakes,

South Australia, 5095,

Australia

Mobile: +61 0404 030 071

Email: adeelmalik78@yahoo.com

0 Kudos
Message 1 of 8
(7,535 Views)

Hi Adeel,

 

Welcome to the NI forums!  National Instruments currently supports Mandriva Linux Official, Red Hat Enterprise Linux WS, and SUSE Linux.  The following DevZone article has a handy chart that shows which drivers will work with each distribution of Linux: What Linux Distributions do National Instruments Drivers and Software Support?

 

More information can be found in the FAQ.

 

Depending on your distribution you should download and install NI-DAQmx 8.0 from our Drivers and Updates page, or if that is not possible use the most recent supported version of NI-DAQmx Base.  Specific installation instructions for each driver can be found in its readme file.  The driver installs with numerous shipping examples that should help you get started. 

 

You may be aware that the USB-6009 only has the capability of software-timed analog output, so depending on what frequency you want to generate this may or may not be adequate.  Please refer to the following knowledgebase for more information: USB-6008/6009 Continuous Analog Output.

 

If you have any other questions, please let me know which distribution of Linux you are running and what programming language you are using to develop your application.  Thanks for posting and have a great day!

 

-John

John Passiak
0 Kudos
Message 2 of 8
(7,511 Views)

Actually, allow me to make a correction:

 

DAQmx 8.0 does not support USB DAQ devices such as the 6009.  You will have to use DAQmx Base.  Sorry for the confusion.

 

-John 

John Passiak
0 Kudos
Message 3 of 8
(7,500 Views)

Hi John,

             Thanks for your update. I have successfully installed the daqmxbase software on my Red-Hat Linux machine. After that I issued 'lsdaq' configuration utility and it detected the USB-6009 card successfully. Now I wanted to run some of the examples that were located in folder:

/usr/local/natinst/nidaqmxbase/examples/ai

When I ran the 'make' command, it failed to build because the library liblvrtdark.so.8.2 couldn't find libstdc++.so.5 (although the machine had libstdc++.so.6) and so unable to resolve the references. I am pasting the first few error messages as below:

----------------------------------------------------------------------------------------------------------------
usr/bin/ld: warning: libstdc++.so.5, needed by /usr/local/lib/liblvrtdark.so.8.2, not found (try using -rpath or -rpath-link)
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::__throw_length_error(char const*)@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `__cxa_rethrow@CXXABI_1.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `__cxa_end_catch@CXXABI_1.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::logic_error::logic_error(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::logic_error::what() const@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)@GLIBCPP_3.2'
.
.
.
//usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned int, unsigned int, char const*) const@GLIBCPP_3.2'
/usr/local/lib/liblvrtdark.so.8.2: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCPP_3.2'
collect2: ld returned 1 exit status
make: *** [acquireNScans] Error 1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Could you please suggest how can I proceed further ?.
Regards,
Adeel
0 Kudos
Message 4 of 8
(7,411 Views)
Solution
Accepted by topic author AdeelMalik

Hi Adeel,

 

You'll need to install the libstdc++.so.5 library.  A Google search turned up a couple of helpful threads that give more information about how to do this if you are not sure: 

 

 

Let me know if you have any problems installing--you might want to also try contacting redhat support if you are having any trouble.  If you do run into any issues, please post so we can document the troubleshooting procedure to help out any customers who might experience this problem in the future.  Thanks for posting!

 

-John 

 

John Passiak
0 Kudos
Message 5 of 8
(7,399 Views)

Hi,

 

libstdc++.so.5 is very old most new libraries and code are built against libstdc++.so.6

I built my code as a stand alone with the libstdc++.so.5 but I need to compile and link the my application with other C++ code that has been compiled and linked against libstdc++.so.6. Now I can not do that as I cannot link to both libraries in my make file. Do you know if NI plans to recompile and build NIdaqmxbase with the more relevent libstdc++.so.6 libraries?

 

Or is there another solution for this?

 

Thanx 

   

0 Kudos
Message 6 of 8
(6,746 Views)
 

   usr/bin/ld: warning: libstdc++.so.5, needed by /usr/local/lib/liblvrtdark.so.8.2, not found (try using -rpath or -rpath-link)

 


 

Actually, that is a symptom of the LabVIEW Run-Time Engine: the LV RTE is compiled against libstdc++.so.5, not DAQmx Base (notice the linker errors).

"But I'm writing in C/C++, not LabVIEW!" you remark. "Why is my C/C++ program using the LV RTE?"

Because DAQmx Base is written in LabVIEW, not C. In order to provide a C API, we use LabVIEW to build a shared library (which is then callable from C). Libraries and executables made by LabVIEW require the LV RTE of the same version to run.

I would create a product suggestion [1] for LabVIEW to use the newer C++ library on Linux. You can also use the LabVIEW Idea Exchange [2] to promote your request.

[1] Product Suggestion Center
http://digital.ni.com/applications/psc.nsf/default?OpenForm&temp1=&node=

[2] LabVIEW Idea Exchange
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas
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)
Message 7 of 8
(6,713 Views)

*facepalm*

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 8 of 8
(3,892 Views)