GPIB is a very old communication standard which is, even to this date, very popular for instrument communication in labs. Getting it to work in our favourite operating system (Linux of course!), is not very easy because in general there are not pre-compiled packages for the GPIB drivers on linux distros. Furthermore, the suggested GPIB drivers for linux to compile doesn't work in newer linux distros (at least it didn't work for me). This tutorial, will detail the steps I had to discover in order to make GPIB work in Ubuntu Linux.
NOTE: As for April 2020, the steps I had to take involve using two versions of gpib-linux drivers, hopefully when you read this, this problem is solved. Also, I used Ubuntu 18.04 for this installation. These instructions are based in the link at the bottom of the page.
The main difficulty I had with the installation of the drivers is that I had to use two version of the linux-gpib drivers, one is the "main" version released on the internet, and the second one is a "snapshot" of a new version.
sudo apt install libboost-python-dev
make
sudo make install
(you may get some errors, it's okay)./configure --sysconfdir=/etc
make
make install
make
, sudo make install
). You may get some errors, that is okay.The pyvisa library is used to control instruments from python.
sudo apt install python-pyvisa
sudo apt install python-pyvisa-py
That's it. To start instrument communication follow the example here. Remember to use a GPIB string.
Hopefully these instruction allowed you to use GPIB communication. If not, it is probably of an incompatibility between your distribution/kernel version and the gpib drivers. Please contact me if you find a better solution.