Python VISA bindings for GPIB, RS232, and USB instruments
A PyVISA backend that implements a large part of the “Virtual Instrument Software Architecture” (VISA) in pure Python (with the help of some nice cross platform libraries python packages!).
PyVISA started as wrapper for the NI-VISA library and therefore you need to install National Instruments VISA library in your system. This works most of the time, for most people. But NI-VISA is a proprietary library that only works on certain systems. That is when PyVISA-py jumps in.
Starting from version 1.6, PyVISA allows to use different backends. These backends can be dynamically loaded. PyVISA-py is one of such backends. It implements most of the methods for Message Based communication (Serial/USB/GPIB/Ethernet) using Python and some well developed, easy to deploy and cross platform libraries
VISA and Python
Python has a couple of features that make it very interesting for measurement controlling:
- Python is an easy-to-learn scripting language with short development cycles.
- It represents a high abstraction level, which perfectly blends with the abstraction level of measurement programs.
- It has a very rich set of native libraries, including numerical and plotting modules for data analysis and visualisation.
- A large set of books (in many languages) and on-line publications is available.
- Python (tested with 2.6 and 2.7, 3.2+)
- PyVISA 1.6+
Optionally - PySerial (to interface with Serial instruments) - PyUSB (to interface with USB instruments) - linux-gpib (to interface with gpib instruments, only on linux)
$ pip install pyvisa-py
The documentation can be read online at https://pyvisa-py.readthedocs.org
pyvisa-py is written and maintained by Hernan E. Grecco <email@example.com>.
Other contributors, listed alphabetically, are:
- Alex Forencich <firstname.lastname@example.org>
- Alexander Bessman <email@example.com>
- Colin Marquardt <firstname.lastname@example.org>
- Lance McCulley <email@example.com>
- Martin Ritter <firstname.lastname@example.org>
- Sebastian Held <email@example.com>
- Thomas Kopp <firstname.lastname@example.org>
- Thorsten Liebig <email@example.com>
- Tobias Müller <Tobias_Mueller@twam.info>
(If you think that your name belongs here, please let the maintainer know)
- Nothing changed yet.
- Added support for TCPIP Socket. (Issue #38, thanks Thorsten Liebig)
- Added support for GPIB INSTR using linux-gpib. (Issue #24, thanks bessman)
- Added support for USB RAW. (Issue #18, kopp)
- Better error reporting when pyusb or pyserial is missing.
- Fixed logging of unicode strings. (Issue #54)
- Fixed timeout in SerialSession. (Issue #44)
- Moved resource name parsing to PyVISA.
- VXI11 protocol performance enhancement. (thanks alexforencich)
- Improved pyusb importing.
- Fixed large binary reads in TCPIP.
- Added backend information to logger.
- Use pyvisa compat/struct.py for python < 2.7.8 (thanks Martin Ritter)
- Initial release. Preliminary support for: - USB INSTR - TCPIP INSTR - ASRL INSTR