Python VISA bindings for GPIB, RS232, TCPIP and USB instruments
Project description
A Python package for support of the “Virtual Instrument Software Architecture” (VISA), in order to control measurement devices and test equipment via GPIB, RS232, Ethernet or USB.
Description
The programming of measurement instruments can be real pain. There are many different protocols, sent over many different interfaces and bus systems (GPIB, RS232, USB). For every programming language you want to use, you have to find libraries that support both your device and its bus system.
In order to ease this unfortunate situation, the Virtual Instrument Software Architecture (VISA) specification was defined in the middle of the 90’s. Today VISA is implemented on all significant operating systems. A couple of vendors offer VISA libraries, partly with free download. These libraries work together with arbitrary peripheral devices, although they may be limited to certain interface devices, such as the vendor’s GPIB card.
The VISA specification has explicit bindings to Visual Basic, C, and G (LabVIEW’s graphical language). Python can be used to call functions from a VISA shared library (.dll, .so, .dylib) allowing to directly leverage the standard implementations. In addition, Python can be used to directly access most bus systems used by instruments which is why one can envision to implement the VISA standard directly in Python (see the PyVISA-Py project for more details). PyVISA is both a Python wrapper for VISA shared libraries but can also serve as a front-end for other VISA implementation such as PyVISA-Py.
VISA and Python
Python has a couple of features that make it very interesting for controlling instruments:
Python is an easy-to-learn scripting language with short development cycles.
It represents a high abstraction level [2], which perfectly blends with the abstraction level of measurement programs.
It has a 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.
Requirements
Python (tested with 3.6+)
VISA (tested with NI-VISA 17.5, Win7, from www.ni.com/visa and Keysight-VISA )
Installation
Using pip:
$ pip install pyvisa
or easy_install:
$ easy_install pyvisa
or download and unzip the source distribution file and:
$ python setup.py install
Documentation
The documentation can be read online at https://pyvisa.readthedocs.org
Citing
If you are using this package, you can cite the PyVISA publication
Grecco et al., (2023). PyVISA: the Python instrumentation package. Journal of Open Source Software, 8(84), 5304, https://doi.org/10.21105/joss.05304
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyVISA-1.14.1.tar.gz
.
File metadata
- Download URL: PyVISA-1.14.1.tar.gz
- Upload date:
- Size: 234.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71030041ed4c5dad77687454cf44b8be4d1642e9d1aaa22019248d41d8ed7a79 |
|
MD5 | 30b2a8202a2c5d704c788f26e2c2cf86 |
|
BLAKE2b-256 | 1a77577366efd9cff08ddfedcf14f678ff57bb1a6287ccdf157972e6d9e7b494 |
File details
Details for the file PyVISA-1.14.1-py3-none-any.whl
.
File metadata
- Download URL: PyVISA-1.14.1-py3-none-any.whl
- Upload date:
- Size: 176.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e4dfc9b6029b4f00d0d4960348c4889c2747aa7f83276950d48a349eab36a45 |
|
MD5 | 43f5f58c92aa61a021cc3db7e21a9ecb |
|
BLAKE2b-256 | 99a00e739df84e0fc61abecc6b4b70ad7aea7f5d7ee37ec504baa365c0fec9da |