NI-DAQ Cards on Linux
From Mech
Overview
Project by: James Yeung, Master in Electrical and Computer Engineering, 2010.
Last updated: April 23, 2010
The goal of this project was to get the National Instruments Data Acquisition Cards to work on Linux. More specifically, the two cards that will be documented here are:
- NI PCI-6220 16-Bit, 250 kS/s, 16 Analog Inputs
- NI PCI-6713 12-Bit, 1 MS/s per Channel Analog Output Board
This wiki document assumes that you have real-time patched SUSE 11.0 operating system installed. You can follow the guide here.
Installing Drivers and C-API
The supporting software is all available on the National Instruments website. The specific package that we will need is NI-DAQmx 8.0.1. This package contains the drivers, C-API library, documentation on the library functions and example code.
Instructions
- Download the NI-DAQmx 8.0.1 here
- The file that you download is an ISO, or an image of a disk. You could burn it on a CD and run it from a physical disk, but we will be mounting the ISO virtually.
- Install necessary supporting packages.
- Open a terminal window. GNOME Terminal would do.
- Use zypper to install the packages. >> zypper in kernel-source-rt kernel-syms-rt
- Configure SUSE to startup in 4G memory mode.
- This is not necessary if your system is 32-bit.
- Go to the grub folder. >> cd /boot/grub
- Add "set mem=4096" to the entry. >> vi ********************** (to be finished)
- Restart the computer with 4G memory mode.
- Install NI-DAQmx
-
>> cd ~/Downloads/
>> tar
>> cd nidaqmx801
>> mkdir /mnt/daqmx
>> mount -t iso9660 -o loop nidaqmx801.iso /mnt/daqmx
>> cp /mnt/daqmx/disk .
>> cd disk
>> sudo ./INSTALL
- Follow the prompts to install.
- Restart the computer.
- Restart the computer.
- Open terminal and type
- >> nilsdev
- You should be able to see information about the NI-DAQ cards.