Overview
This code demonstrates the use of the DAQmx API and was written specifically for cDAQ controllers running NI Linux Real-Time. Specifically, the code implements a number of DAQmx features, including:
Note: This code does not outline best practices for maintaining real-time system behavior, which requires consideration of topics such as priority assignment and the avoidance of page faults. For more information on these topics, review the PREEMPT_RT Patch Wiki - HOWTO: Build an RT-Application.
This code was built specifically for a cDAQ-9134 Real-Time target, and relies on 3 C-Series modules: two NI-9211s in slots 1 and 2, and one NI-9401 in slot 3. Additionally, this code relies on two J-type thermocouples, connected to each of the NI-9211 thermocouple modules respectively.
To terminate code, increase temperature read by thermocouple to 34 degrees Celsius or higher.
Description
While this code requires the hardware configuration outlined above, it should be useful as a starting point for most DAQmx-based C/C++ development on NI Linux RT.
Note: For the most up-to-date C/C++ Tutorials for NI Linux Real-Time, visit ni.com/info and enter the Info Code NILRTCrossCompile.
Using DAQmx with Eclipse - Windows Host
Requirements
Software
Required:
C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2014
NI-DAQmx 15.0.1
Hardware
Hardware used for this example:
NI-cDAQ 9134
NI-9211 (x2)
NI-9401
This is great. The only issue I'm having is that it is looking for a bunch of other libraries used by libnidaqmx.so when I try to compile, such as libnidmxfu.so.1 and libnimdbgu.so.1. Any ideas? Where did you find the libnidaqmx.so library?
Thanks
This is perfect, exactly what I was looking for. The only problem that I have is that I would like it to be revised for the latest version of Eclipse and the NIDAQmx library.
I have the 2017 version of Eclipse and 17.1 NIDAQmx. I am getting "undefined reference" errors but the advice in step 6 above does not seem to be fixing them
Update to my previous comment. I was able to fix the "undefined reference" errors. In my case the library file was in a folder C:\Program Files (x86)\National Instruments\RT Images\NI-DAQmx\17.1.0\linux-x64 and the file was called libnidaqmx.17.1.0. I had to copy the file to my project folder and then remove the ".17.1.0" from the end of the file. After that the program did build just fine