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.7, 3.4+)
- 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 <firstname.lastname@example.org>.
Other contributors, listed alphabetically, are:
- Alex Forencich <email@example.com>
- Alexander Bessman <firstname.lastname@example.org>
- Colin Marquardt <email@example.com>
- Lance McCulley <firstname.lastname@example.org>
- Martin Ritter <email@example.com>
- Matthieu Dartiailh <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)
- Fix initialization of timeout (issue identified in TCPIP resources) PR #160
- Fix handling of seesion registration under Python 3.7 PR #155
- Add read_stb, assert_trigger, lock, unlock to highlevel PR #139
- Fix timeout handling in usb PR #144
- Add gpib_command and assert_trigger to GPIB PR # 136
- Handle ValueError in usb list fix #131 PR #132
- Fix reading on GPIB and implement clear and gpib_send_ifc PR #132
- Do not error when listing USB devices PR #126
- Fix an error in the handling of the termchar for TCPIP INSTR PR #126
- Make list_resources return an empty tuple instead of erroring PR #121
- Proper support for timeout in TCPIP INSTR sessions PR #120 #127 #130 #144
- Proper encoding of data before transfer for all backends PR #119
- Unify use of StatusCode PR #118
- Improve handling of sessions attrs PR #116
- TCPIP SOCKET timeout handling improvement PR #115
- Fix compatibility with pyserial 3.0 PR #112
- TCPIP SOCKET handler read should not block PR #107
- TCPIP error handling fixes PR #100
- Use repr() instead of str() to log RPC record PR #97
- Speed up large transfer over GPIB 2beb52a5bcea2dae32d4a9908dc19f7874bfc0b7
- Catch GPIB errors while enumerating devices 9fea9d5c40cc6c33ce1244c209e5e576a33abfc2
- Add a serial poll function to GPIB backend PR #67
- Handle timeout in USB TMC backend PR #64
- Make USB TMC backend faster by transferring multiple bytes PR #63
- Fix issue with encoding before data transfer PR #59 #
- Get Linux GPIB version PR #55
- Fix broken import in TCPIP sessions PR #51
- 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
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size PyVISA_py-0.3.1-py3-none-any.whl (45.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size PyVISA-py-0.3.1.tar.gz (57.6 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for PyVISA_py-0.3.1-py3-none-any.whl