Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Base 3.4 C API Performance Workaround

Problem:


The function DAQmxBaseCreateTask(const char, TaskHandle) delays for approximately 60 seconds when called. Initial investigation shows that the LabVIEW 2010 Run-Time Engine introduces this delay. The C API for DAQmx Base 3.3 does not have this delay because it uses the LabVIEW 8.2.1 Run-Time Engine.


Workaround:


The basic idea is to install DAQmx Base 3.4 and then use the DAQmx Base 3.3 C API.

The DAQmx Base 3.4 installer will install the correct OS interface infrastructure for openSUSE 11.1 and 11.2.

The C API component also includes the device driver logic and control for C-based programs, and so installing the DAQmx Base 3.3 C API also installs the DAQmx Base 3.3 driver logic and control.

Follow these steps to implement the work-around for openSUSE 11.2:


1) Install NI-DAQmx Base 3.4 [1], answering the prompts as follows:


A) Do you want to install NI-DAQmx Base for C? N
B) Do you want to install NI-DAQmx Base USB Device Support? Y

2) Install the NI-DAQmx Base 3.3 C API [2], assuming the DAQmx Base 3.3 iso is mounted on /mnt/iso:


A) rpm --install /mnt/iso/labview82-rte-8.2.1-2.i386.rpm
B) rpm --install /mnt/iso/nidaqmxbase-cinterface-3.3.0-f0.i386.rpm

3) Install libstdc++.so.5 for the LabVIEW 8.2.1 Run-Time engine:

A) /sbin/yast2 --install libstdc++33

[1] NI-DAQmx Base 3.4
http://joule.ni.com/nidu/cds/view/p/id/2128/lang/en

[2] NI-DAQmx Base 3.3
http://joule.ni.com/nidu/cds/view/p/id/1342/lang/en

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 1 of 3
(9,637 Views)

Workaround steps NI-DAQmx base 3.3.4 for OpenSuse 11.2
------------------------------------------------------

    "COPY NIDAQMX 3.4 CD TO ~/bin"
    "COPY NIDAQMX 3.3 CD TO ~/bin/NIDAQmx_3_3
     cd /usr/src/linux
     make cloneconfig
     make modules_prepare
     cd ~/bin
     ./INSTALL

ANSWER AT THE PROMPTS
--------------------
     Do you want to install NI-DAQmx Base for C? No
     Do you want to install NI-DAQmx Base USB Support? Yes

     cd NIDAQmx_3_3
     rpm --install labview82-rte-8.2.1-2.i386.rpm
     rpm --install nidaqmxbase-cinterface-3.3.0-f0.i386.rpm
     /sbin/yast2 --install libstdc++33
     cd /usr/src/linux/; make mrproper
     zcat /boot/symvers-2.6.31.5-0.1-default.gz > Module.symvers
     make cloneconfig
     make modules_prepare
     updateNIDrivers
     reboot

AFTER REBOOTING
---------------

     lsdaq

--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
NI USB-6008 OEM1:"Dev1"    (USB0::0x3923::0x71D6::0151EA70::RAW)
--------------------------------

      cd /usr/local/natinst//nidaqmxbase/examples/ai
      make

      time ./acquire1Scan

Acquired reading: 0.001168

real    0m9.955s
user    0m9.173s

      time ./acquireNScans

Acquired 1000 samples
data[0] = 0.001168
data[1] = 0.001168
data[2] = 0.001168
data[3] = 0.001168
data[4] = 0.001168
data[5] = 0.001168
data[6] = 0.001168
data[7] = 0.001168
data[8] = 0.001168
data[9] = 0.001168

real    0m10.264s
user    0m9.409s
sys     0m0.244s

Please let me know if you have any questions.

Regards,

Dave

0 Kudos
Message 2 of 3
(3,297 Views)

Confirmed, this works.

If you have already installed 3.4.0, uninstalling nidaqmxbase-cinterface-3.4.0-f2.i386.rpm and following your instructions from

cd NIDAQmx_3_3

...

does the job.

Don't forget to insert your actual kernel version.

0 Kudos
Message 3 of 3
(3,297 Views)