Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB in Debian Linux

I work in a Lab (LPS Escola Politécnica da Universidade de São Paulo), and we use Debian Linux
We are trying to install Labview and GPIB interface in this distro.
The instalation is perfect, but the GPIB software only works if the permissions of nipalk (/dev/nipalk) is write and read for root  and only read for the other users.
But when I reboot the PC the permission come back to default an I need to modify it.
So I am writting to ask if somebody had this problem and solucionate it.
Regards
Felipe Praxedes de Miras
LPS EPUSP
São Paulo
Brasil

0 Kudos
Message 1 of 8
(7,480 Views)
Take a look in /etc/init.d/nipal and change the line that reads:

chmod 0666 /dev/nipalk

Make this whatever you feel is appropriate.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 8
(7,457 Views)
Thanks
Felipe Praxedes de Miras
0 Kudos
Message 3 of 8
(7,415 Views)
You said that the installation of Labview went perfectly, but I am having serious issues.  Could you let me know what version of Debian and LabVIEW you got installed.  Thanks!
0 Kudos
Message 4 of 8
(7,263 Views)
Hello,
I'm having poblems too to install Labview on my Debian SID. Could you, Praxedes, please explain me how did you manage to complete the installation?

Thanks a lot
0 Kudos
Message 5 of 8
(7,147 Views)
I forget to explain, I installed LabVIEW package for package, because the script has problems.
So first I converted the packages by alien to .deb
After that I installed one by one with dpkg -i
Praxedes

0 Kudos
Message 6 of 8
(7,105 Views)
Hello

Running alien and transforming the rpm to deb's is not enough. That just places the files on some directories. One also needs to link files and run postinstallation procedures.

We (at the Observatorio Astronómico Nacional @ Spain) have tried to follow manually what INSTALL.sh does and have succeeded creating the drivers and loading the kernel modules but we have not managed to make gpibexplorer work correctly. gpibexplorer runs but complains.

We are running Debian Sarge with kernel 2.6.16-2 from backports and have one GPIB PCI NI board and one GPIB ENET device.

Steps we have followed:

1) Mount the ISO:
mkdir national
mkdir ni
mount -o loop ni488225L.iso national
2) Uncompress the main tar:
cd ni
tar xzvf ../national/NI4882-2.5.1f0.tar.gz
cd rpms
3) Transform rpms to debs:
alien ni4882i-2.5.1-f0.i386.rpm
alien nispyi-2.4.0-f0.i386.rpm
alien labview80-rte-8.0.1-1.i386.rpm
alien nikali-1.4.0-f0.i386.rpm
alien nipali-1.11.0-f0.i386.rpm

4) Install deb packages:

dpkg --install labview80-rte_8.0.1-2_i386.deb
dpkg --install ni4882i_2.5.1-1_i386.deb
dpkg --install nikali_1.4.0-1_i386.deb
dpkg --install nipali_1.11.0-1_i386.deb
dpkg --install nispyi_2.4.0-1_i386.deb

Note: all files get installed in /usr/local/natinst, although LabView goes to /usr/local/lib/ and /etc/natinst
gets created.

5) Create some links:

ln -s /usr/local/natinst/ni4882/etc /etc/natinst/ni4882
ln -s /usr/local/natinst/nikal/etc /etc/natinst/nikal
ln -s /usr/local/natinst/nipal/etc /etc/natinst/nipal
ln -s /usr/local/natinst/nispy/etc /etc/natinst/nispy

6) Fill in some files:

echo "/usr/local/natinst/nikal" >> /etc/natinst/nikal/nikal.dir
echo "/usr/local/natinst/ni4882" >> /etc/natinst/ni4882/ni4882.dir
echo "/usr/local/natinst/nipal" >> /etc/natinst/nipal/nipal.dir
echo "/usr/local/natinst/nispy" >> /etc/natinst/nispy/nispy.dir

6) More links:
ln -s /usr/local/natinst/nipal/bin/palModuleMgr.sh /usr/local/bin
ln -s /usr/local/natinst/nipal/bin/readInfFiles /usr/local/bin
ln -s /usr/local/natinst/nipal/bin/nipalps /usr/local/bin
ln -s /usr/local/natinst/nipal/sbin/nipalsm /usr/local/sbin

7) Now we try to imitate INSTALL.sh:

/usr/local/bin/updateNIDrivers

palModuleMgr.sh -i -o linux:dir=nipal -t kernelDriver -s demand -c -f /usr/local/natinst/nipal/src/objects/nipalk-unvers
ioned.o

palModuleMgr.sh -i -o linux:dir=ni4882 -t kernelDriver -s boot -c -f /usr/local/natinst/ni4882/src/objects/gpibprtk-unve
rsioned.o

palModuleMgr.sh -i -t userDaemon -s boot -c -f /usr/local/natinst/ni4882/lib/libgpibenumsvc.so.2.5.1
ln -sf /usr/local/natinst/ni4882/etc/ni488.inf /usr/local/natinst/nipal/etc/inf/ni488.inf
/etc/init.d/nipal status
cd /usr/local/lib
ln -sf LabVIEW-8.0/liblvrtdark.so.8.0.1 /usr/local/lib/liblvrtdark.so.8.0
ln -sf liblvrtdark.so.8.0 /usr/local/lib/liblvrtdark.so
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
/etc/init.d/nipal start
/etc/init.d/gpibenumsvc start

😎 Even more links
cd /usr/local/lib
ln -s /usr/local/lib/LabVIEW-8.0/liblvrt.so.8.0.1 liblvrt.so.8.0.1
ln -s liblvrt.so.8.0.1 liblvrt.so.8
ln -s /usr/local/natinst/ni4882/lib/libgpibapi.so.2.5.1 libgpibapi.so.2.5.1
ln -s /usr/local/natinst/ni4882/lib/libgpibconf.so.2.5.1 libgpibconf.so.2.5.1
ln -s /usr/local/natinst/ni4882/lib/libgpibenumsvc.so.2.5.1 libgpibenumsvc.so.2.5.1
ln -s /usr/local/natinst/ni4882/lib/liblvgpibconf.so.2.5.1 liblvgpibconf.so.2.5.1
ln -s libgpibconf.so.2.5.1 libgpibconf.so.2
ln -s libgpibapi.so.2.5.1 libgpibapi.so.2

-------------------
Results:
-------------------

Running gpibexplorer opens but complains stating we need to reinstall NI4882 software
Anyhow the GPIB ENET device is found in the LAN

gpibtws opens and fails in the first step. It also requests the NI4882 installatino should be repeated.

Modules loaded:
Module Size Used by
gpibprtk 254420 0
nipalk 1282480 3 gpibprtk
nikal 65012 3 nipalk
usbcore 119364 3 nikal,uhci_hcd

Output from dmesg:

nikal: module license 'Copyright (c) 2002-2006 National Instruments Corporation. All Rights Reserved. Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <>.' taints kernel.
nipalk: no version for "nNIKAL100_getTimeOfDayInterval" found: kernel tainted.
PCI: Enabling device 0000:01:02.0 (0010 -> 0012)
ACPI: PCI Interrupt 0000:01:02.0[A] -> Link [LNKB] -> GSI 9 (level, low) -> IRQ 9
usbcore: registered new driver ni488

Daemons running:
3708 pts/0 S 0:00 /bin/sh /usr/local/natinst/nipal/bin/nipalps /dev/nipalk /var/lib/natinst/nipal/nipalps.bin
3743 ? Ss 0:00 /usr/local/sbin/nipalsm /etc/natinst/nipal/services/libgpibenumsvc.so.2.5.1

Conclusion:

It seems we have almost achieved to make it work, since the driver is properly loaded but we are missing something, probably from postinstallation. It is strange we have to make all links manually. May be if we can compare dmesg, ps afx| grep and lsmod from a host which is running we may spot the problem.

Pablo.
Message 7 of 8
(7,023 Views)

Hi,

 

Wouldn't it be simpler NI compile Labview 2020 SP1 into a .deb package? As:

- the Debian/Ubuntu user community is huge,

- CentOS has been abandonned with end of support on 12/31/2021, replaced by a some kind of an "experimental" linux

- RedHat was acquired by $IBM$,

- Suse on the other hand is tedious.

 

Thank you NI!

Christian

Private NI customer since LV 1.1

0 Kudos
Message 8 of 8
(1,735 Views)