Skip navigation


Currently Being Moderated

How to Install Nikal1.1+NI488.2+NiVisa4.5+PyVisa+NIdaqmxBase on Ubuntu 8.04 (Only for human beings)

VERSION 16  Click to view document history
Created on: Sep 12, 2009 7:35 AM by Islero - Last Modified:  Dec 14, 2012 1:33 PM by Islero


Hello once again!! Here I am writing another tutorial for this great linux users-community. In this time I must say that it had been easier doing the manual because the number of members of this community has grown up and the number of posts and discussions too. In this case only I had to gather all information of several posts. It´s a pity that the level of members of linux-user is higher and higher BUT my level of English is the same of last time. I apologize for it.



Steps to Complete




At the first place I must say that the manual is adequate for a distro with these properties:


Ubuntu 8.04

Kernel:  2.6.24-24-generic [# uname -r]

gcc version: gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)  [# gcc --version]

cpu i386




Right after it, it's the moment to install several packages included in ubuntu repository which are necessary:


# apt-get install linux-headers-2.6.24-24-generic
# apt-get install alien


On the other hand I recommend to install libosmesa6 and libosmesa6-dev but using sinaptic.

To finish, remenber change bash to sh


# cd /bin
# ln -s bash sh




Now it's the moment to download nikal 1.10 , like it's a ISO you need to mount and after it copy the files to other place. I'm going to create all folders that I need in my Desktop (Escritorio in spanish).

# mkdir /home/vicente/Escritorio/tmp
# mount -o loop NIKAL110.iso /home/vicente/Escriorio/tmp
# mkdir nikal
# cp -R /home/vicente/Escritorio/tmp/  /home/vicente/Escritorio/nikal/
# chmod -R 777 /home/vicente/Escritorio/nikal/
# umount /home/vicente/Escritorio/tmp/

# cd /home/vicente/Escritorio/nikal/tmp


Ok now we must unpackage nikal-1.10.0f0.tar.gz to do it I prefer to use the gnome environment, open a navigator, go to

/home/vicente/Escritorio/nikal/tmp and click with secondary mouse button on nikal-1.10.0f0.tar.gz and click extract here.


# cd /home/vicente/Escritorio/nikal/tmp/nikal-1.10.0f0/rpms


With alien we will change *.rpm to *.deb. With dkpg command we will install the deb package.


# alien nikali-1.10.0-f0.noarch.rpm --scripts

# dpkg -i nikali_1.10.0-f0_all.deb


If there is something different in this tutorial from my previous one it is the fact that, some packages are going to create a scripts named * where * is the name of package installed. We must find and execute these scripts after each dpkg.


# cd /usr/local/natinst/nikal/bin
# .
# nikaliPostInstall
# ./updateNIDrivers
Reboot? yes


After it, check it that module nikal is working:


# modprobe nikal




The next step is to install NI488.2, first download NI-488.2-beta-2.5 and follow the same steps that we follow with nikal, remember unpackage  NI-488.2-beta-2.5.1b1.tar.gz.


# cd /home/vicente/Escritorio/NI4882/NI-488.2-beta-2.5.1b1
# ./INSTALL --nodeps


After to install using the method ./INSTALL --nodeps it appears errors post installation. At this moment if you check it nikal you will find that nikal isn't working. Don't worry follow these steps:


# cd /home/vicente/Escritorio/nikal/tmp/nikal-1.10.0f0/rpms

# dpkg -P nikali
# dpkg -i nikali_1.10.0-f0_all.deb
# cd /usr/local/natinst/nikal/bin
# .
# nikaliPostInstall
# ./updateNIDrivers
Reboot? yes


Right after it, you can check it that you have installed nikal, nipalk, gpibrtk and a new demon nipal.


# modprobe nikal

# modprobe nipalk
# modprobe gpibprtk
# /etc/init.d/nipal restart (appears a error but nipal is working)


I know that it is a pretty peculiar  method  (even for a human beings) but works. For example if you have a PCI/GPIB card you can test it writting up this


# gpibtsw


In my case I find this:







Ok now Visa 4.5. You must download Visa 4.5.1 mount, copy, umount and unpackage nivisa-4.5.0f0.tar.gz (if you prefer 'tar zxvf nivisa-4.5.1f0.tar.gz'), like nikal package. After it we must change packages .rpm to .deb. To do it follow these steps:


# mkdir /home/vicente/Escritorio/kk
# mount -o loop NI-VISA-4.5.1.iso /home/vicente/Escriorio/kk
# mkdir visa451
# cp -R /home/vicente/Escritorio/kk/  /home/vicente/Escritorio/visa451/
# chmod -R 777 /home/vicente/Escritorio/visa451/
# umount /home/vicente/Escritorio/kk/

# cd /home/vicente/Escritorio/visa451/kk

# tar zxvf nivisa-4.5.1f0.tar.gz


Be carefull with the path used, PLEASE We will use a installation-script and it's necessary that you must create the folders with the same names.


# mkdir nivisa-4.5.1

# cd rpms

# rm nipalki-2.4.0-f0.x86_64.rpm

# rm nivisak-4.5.1-f0.x86_64.rpm

# alien -k --scripts *.rpm

# cd ..

# cp rpm/*.deb nivisa-4.5.1/


Ok, the user Wimpie has made a fantastic installation-script to install nivisa, the community has to be thankful for his/her contribution.


(If you have tried to install visa by other way without success and you want to follow our method please, first run Wimpie's attached in this tutorial. you can run the script from any path. )



Download the script attached below and copy it at /home/vicente/Escritorio/visa451/kk , change the path in your case, but must be at folder /home/'name-user'/Desktop/visa451/kk, I hope don't lost me in translation. Run the script and cross your fingers



root@vicente-desktop:/home/vicente/Escritorio/visa451/kk# ./install_visa


Right after it, you must run updateNIDrivers.

# cd /usr/local/natinst/nikal/bin
# ./updateNIDrivers
reboot? yes


Several new kernel modules have to be installed or updating:


NI-KAL successfully updated.

nipalk.ko successfully updated.

NiViPciK.ko successfully updated.                                                                    
niorbk.ko successfully updated.                                                 
nidimk.ko successfully updated.                                                 
NiViPxiK.ko successfully updated.                                                                 
nipxirmk.ko successfully updated.



Now go to a Shell and write down:


# visaconf


If you have a PCI/GPIB card you will find something like this:







First you need download PyVisa (PyVISA-1.3-1.noarch.rpm) after it and before to install PyVISA we must install one package from repositories:


apt-get install python-ctypes


Ok, change *.rpm to *.deb and install:


# alien -k --scripts *.rpm

# dpkg -i pyvisa_1.3-1_all.deb


Ok, now you can run this example to test your PCI/GPIB card (Instrument with gpib address 9):



import pyvisa.vpp43 as vpp43
from visa import *

my_instrument = instrument("GPIB0::9::INSTR")


In my case after running the script I find this:


root@vicente-desktop:/home/vicente/Escritorio/pyvisa# python



Download NIdaqMXBase 3.3.0 it is a ISO file, you need mount and copy the files (see NIKAL installation). After you mount the ISO, go to folder nidaqmxbase and change the packages .rpm to .deb with this command:

# alien -k --scripts *.rpm


Right after it copy the Wimpie's script install_daqmx attached below at the same folder where you has generated the .deb packages. To finish execute the script and one again cross your fingers (very important):


# ./install_daqmx


Ok now run updateNIDrivers


# cd /usr/local/natinst/nikal/bin
# ./updateNIDrivers


So, It is the moment to probe our usb devices, for example NI-USB 6008.

root@vicente-desktop:/usr/local/natinst/nidaqmxbase/bin# lsdaq
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
NI USB-6008: "Dev1"    (USB0::0x3923::0x717A::01418C98::RAW)


And if you go to visaconf you will find something like this:






If you find after do it # lsdaq this error:



root@vicente-desktop:/home/vicente# lsdaq
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:


Device Error: incompatible firmware.  Serial Number: 01418C98


Execute <NI-DAQmx Base directory>/bin/FWUpdate to update.


you must go to folder /usr/local/natinst/nidaqmxbase and execute the script FWUpdate to update the firmware.


# cd /usr/local/natinst/nidaqmxbase

# ./FWUpdate



Let go to test now the device NI-cDAQ-9172 :


to be continued



Additional Notes

Today (11-29-2009) it is been one month and two weeks since my VI to trace I-V curves of photovoltaic modules started to run. In this time we have collected about 10.000 I-V curves (one curve each 2 minutes during solar hours) and the system has been working continuously during that days. I must say that I have not had any kind of problem after starting up, there aren't incomprehensible messages from Windows OS, I haven't a slowly PC after 44 days of working ...the windows users know what I mean. In my case for my monitoring system, I can say that the change has been worthwhile.


PC: Intel core duo, 1GB Ram, 1 PCI-GPIB card

Datalogger: agilent 34970A with daq and actuators cards using GPIB port.

Power supply: Kepco BOP 36-12M with GPIB port



Thanks for your help.

Comments (20)