- A tool to graphically send basic GPIB commands such as
ibwrt
,ibrd
,ibrsp
,ibclr
etc. - A semi automatic GPIB command sequencer. Loading/saving sequences is provided as a feature.
- A fully automatic tester; not flow control mechanisms are provided so the user must split complicated flows into smaller sequences that it executes in an arbitrary order.
- Windows 7/10 - using
NI488.2
GPIB driver - Linux Ubuntu 16.10 - using
linux-gpib
driver
Source code dialect is Python 3 and the dependencies are as listed below. For python packages, make sure to install using pip3
if pip
does not point to pip3
by default.
Qt5
pyvisa
PyQt5
configparser
pyvisa-py
(custom)linux-gpib
(see below installation instructions)
pyinstaller
(Optional; only used to build the Windows standalone executable)- WiX toolset (Optional; only used to build the Windows installer)
Performed on Ubuntu 16.10 with linux kernel 4.8.0-30-generic.
wget https://netix.dl.sourceforge.net/project/linux-gpib/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/4.0.3/linux-gpib-4.0.3.tar.gz
tar -xvf linux-gpib-4.0.3.tar.gz
- Ubuntu still likes python2 and we want python3 bindings and installation destination from linux-gpib. Temporarily point
python
topython3
bysudo ln -sf /usr/bin/python3 /usr/bin/python
cd linux-gpib-4.0.3/
./configure
make
sudo make install
- Undo the
python->python3
link usingsudo ln -sf /usr/bin/python2 /usr/bin/python
- The
linux-gpib
installer puts thelinux-gpib.so
library in a location that cannot be found bypyvisa
. Make a symlink assudo ln -s /usr/local/lib/libgpib.so.0 /usr/lib/libgpib.so.0
- Install
pyvisa
andpyvisa-py
usingpip3 install pyvisa pyvisa-py
- Test if
pyvisa
sees the GPIB backend by executingpython3 -m visa info
. It should contain the following line:
GPIB INSTR: Available via Linux GPIB (b'4.0.3')
- Add current user to group
gpib
:sudo usermod -a -G gpib $(whoami)
- Example
/etc/gpib.conf
provided below, callsudo gpib_config
when you connect the USB-GPIB-HS.interface { minor = 0 /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */ board_type = "ni_usb_b" /* type of interface board being used */ name = "gpibprobe" /* optional name, allows you to get a board descriptor using ibfind() */ pad = 1 /* primary address of interface */ sad = 0 /* secondary address of interface */ timeout = T3s /* timeout for commands */ eos = 0x0a /* EOS Byte, 0xa is newline and 0xd is carriage return */ set-reos = yes /* Terminate read if EOS */ set-bin = no /* Compare EOS 8-bit */ set-xeos = no /* Assert EOI whenever EOS byte is sent */ set-eot = yes /* Assert EOI with last byte on writes */ /* settings for boards that lack plug-n-play capability */ base = 0 /* Base io ADDRESS */ irq = 0 /* Interrupt request level */ dma = 0 /* DMA channel (zero disables) */ master = yes /* interface board is system controller */ } device { minor = 0 name = "prober" timeout=T3s pad = 5 sad = 0 }
$ lsmod | grep ni
should now contain these 2 modules.ni_usb_gpib 36864 0 gpib_common 40960 1 ni_usb_gpib