Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Red Hat Enterprise Linux 5 How-to

Solved!
Go to solution

I have just succeeded in getting DAQmx installed and working under RHEL 5 and I wanted to post the instructions here in the hope that I might save someone else a great deal of time.

First, I want to thank everyone who has contributed to the NI forums regarding installing the DAQmx software under Linux. Most of the information contained in this How-to came straight from these two posts: Fedora Core 6 How-to and Fedora Core 5 - kernel 2.6.20 -NIKAL 1.5 howto

A special thanks goes out to ninevoltz, who took the time to apparently figure most of this stuff out and has even pushed back on the kernel developers regarding the modpost symbol length limitation.

Here are the steps that I took while installing a PCIe-6259 on Red Hat Enterprise Linux 5, kernel 2.6.18-53.1.19.el5:

  1. Add UTS_RELEASE to the version.h file
    • cd /lib/modules/2.6.18-53.1.19.el5/source/include/linux
    • cp version.h version.h.dist
    • cat utsrelease.h version.h.dist > version.h

  2. Create a link to asm_offsets.h with an underscore in its name
    • cd /lib/modules/2.6.18-53.1.19.el5/source/include/asm
    • ln -s asm-offsets.h asm_offsets.h

  3. Modify the modpost application to accept symbol names longer than 500 characters
    • cd /lib/modules/2.6.18-53.1.19.el5/source/scripts/mod
    • cp modpost.c modpost.c.dist
    • Change line 1116 from "#define SZ 500" to "#define SZ 1024"
    • cd /lib/modules/2.6.18-53.1.19.el5/source
    • make (Note: This will fail, but will get far enough to rebuild the modpost program.)

  4. Download NIDAQ800_RedHat.iso from ni.com and install it
    • mount -o loop NIDAQ800_RedHat.iso /mnt
    • cd /mnt
    • ./INSTALL
    • cd
    • umount /mnt

  5. Remove the rusty NI packages installed by NIDAQ800_RedHat.iso
    • rpm -e --nodeps nipali nikali nipxirmi niorbi nidimi

  6. Download NI-VISA-4.3.0.iso from ni.com and install it
    • mount -o loop NI-VISA-4.3.0.iso /mnt
    • cd /mnt
    • ./INSTALL
    • cd
    • umount /mnt

  7. Recompile the NI kernel modules
    • /usr/local/bin/updateNIDrivers

  8. reboot

This proceedure worked great on my system, I was even able to run the /usr/local/bin/DAQmxTestPanels application successfully. I had read that some others had to wrestle with MesaLib in order to get this to work.

So, whoo hoo! And, good luck.

Warren

Message 1 of 14
(7,684 Views)
Solution
Accepted by topic author wwthomps
Hey Warren thanks for the how-to.  I think it can be slightly simpler if you know some tricks, so here is my attempt.  Before I start though I need to caution that both mine and Warrens instructions do fix the fact that RHEL 5 has a 4 K kernel stack which can cause NI-DAQmx to crash the system in some workloads.  I would highly recommend that users test their use case on a non production system.
  1. Modify the modpost application to accept symbol names longer than 500 characters
    • cd /lib/modules/$(uname -r)/source/scripts/mod
    • cp modpost.c modpost.c.dist
    • Change line 1116 from "#define SZ 500" to "#define SZ 1024"
    • cd /lib/modules/$(uname -r)/source
    • make modules_prepare
  2. Download the latest version of NI-KAL from ni.com and install it.
    • mkdir -p /mnt/kal
    • mount -o loop /mnt/kal
    • cd /mnt/kal
    • ./INSTALL
  3. Download NIDAQ800_RedHat.iso from ni.com and replace the installerUtility.sh script
    • mkdir -p /mnt/daq
    • mkdir /tmp/daq
    • mount -o loop NIDAQ800_RedHat.iso /mnt/daq
    • cp /mnt/daq/* /tmp/daq
    • cd /tmp/daq
    • tar xvzf nidaqmx-8.0.0f1.tar.gz
    • cp /usr/local/natinst/nikal/bin/installerUtility.sh /tmp/daq/bin/installerUtility.sh
    • tar cvzf nidaqmx-8.0.0f1.tar.gz bin/ rpms/
  4. Install NI-DAQmx
    • ./INSTALL

Shawn Bohrer
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
Message 2 of 14
(7,621 Views)
Thanks! I've been wondering if this were possible.
0 Kudos
Message 3 of 14
(7,314 Views)

Well NIDAQmx installed just fine on RH5 for me, but I get a weird error:

 

DAQmx Error: The software has entered an unknown state - usually as a result of a cascade failure induced by an unexpected series of state inputs. The operation could not be completed as specified and you should immediately terminate all further transactions if you are able to do so.
Task Name:

Status Code: -50150
End of program, press Enter key to quit

 

 I have NIDAQmxBase installed on the same system. Is that causing a conflict?

0 Kudos
Message 4 of 14
(7,300 Views)

I just re-read my post and I want to correct that these instructions "do NOT fix the fact that RHEL 5 has a 4 K kernel stack".

 


david.miller wrote:

Well NIDAQmx installed just fine on RH5 for me, but I get a weird error:

 

DAQmx Error: The software has entered an unknown state - usually as a result of a cascade failure induced by an unexpected series of state inputs. The operation could not be completed as specified and you should immediately terminate all further transactions if you are able to do so.
Task Name:

Status Code: -50150
End of program, press Enter key to quit

 

 I have NIDAQmxBase installed on the same system. Is that causing a conflict?


NI-DAQmx and NI-DAQmx Base can be installed at the same time so that should not be the problem.  What are you doing when you receive this error?

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 5 of 14
(7,216 Views)
I get that error just whenever I try to run one of the examples. It seemed to install correctly, but crashes when I test the drivers.
0 Kudos
Message 6 of 14
(7,180 Views)

Hi David,

 

First of all, what is the example that you are running, in what API, and what hardware are you using with this example? Also, have you tried running any other examples?

 

The -50150 error that you are receiving has previously come from driver incompatibilities based on certain hardware. Here is a related forum post that identifies this issue with a cDAQ  9205.

 

Chris N White
Applications Engineer::High Speed Product Group

0 Kudos
Message 7 of 14
(7,164 Views)

It didn't work for me!!!!

 

I got this after ./INSTALL

 

 

Installing NI-DAQmx for Linux Installer Distribution version 8.0.0f1...
Skipping nikali-1.2.0-f0.i386.rpm installation, same or newer already installed.
Skipping nirpci-3.2.2-f1.i386.rpm installation, same or newer already installed.
Pre Installation .............................
Preparing...                ########################################### [100%]
        file /usr/local/natinst/nipal/bin/palModuleMgr.sh from install of nipali-1.10.2-f0 conflicts with file from package nipalki-2.3.0-f1
        file /usr/local/natinst/nipal/src/objects/nipalk-unversioned.o from install of nipali-1.10.2-f0 conflicts with file from package nipalki-2.3.0-f1
Error installing NI-DAQmx for Linux Installer Distribution 8.0.0f1.

Installer is aborted.
[root@localhost ni]#


Any ideas????
0 Kudos
Message 8 of 14
(7,042 Views)

ivorystag wrote:
        file /usr/local/natinst/nipal/bin/palModuleMgr.sh from install of nipali-1.10.2-f0 conflicts with file from package nipalki-2.3.0-f1
        file /usr/local/natinst/nipal/src/objects/nipalk-unversioned.o from install of nipali-1.10.2-f0 conflicts with file from package nipalki-2.3.0-f1
Any ideas????

Interesting.  It appears that you installed one of the newer NI drivers so you have new versions of some of the shared components.  What is strange is it looks like you are missing at least one piece of the new driver.  If you have nipalki-2.3.0-f1 installed you should also have a nipali-2.3.0-f1.  Can you run:

 

rpm -qa | grep nipal

 

And post the output.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 9 of 14
(7,032 Views)

Hi,

 

This is what I got........ 

 

[root@localhost bin]# rpm -qa | grep nipal
nipalki-2.3.0-f1
[root@localhost bin]#

 

 

0 Kudos
Message 10 of 14
(7,029 Views)