PyVISA backend for AR488/Prologix GPIB-USB adapters
Project description
pyvisa-ar488
PyVISA backend for AR488 and Prologix GPIB-USB/TCP adapters.
Lets you use standard pyvisa and pymeasure code to talk to IEEE-488 (GPIB) instruments through inexpensive AR488 or Prologix-compatible adapters.
Quick Start
pip install pyvisa-ar488
import pyvisa
# Serial adapter (e.g. Arduino Nano / ESP32 with AR488 firmware)
rm = pyvisa.ResourceManager("@ar488")
print(rm.list_resources()) # scans bus: ('GPIB0::5::INSTR', 'GPIB0::22::INSTR', ...)
instr = rm.open_resource("GPIB0::22::INSTR")
print(instr.query("*IDN?")) # 'KEITHLEY INSTRUMENTS INC.,MODEL 2400,...'
print(instr.query("MEAS:VOLT:DC?")) # '-1.234567E-03'
Transports
Serial (default)
The adapter is auto-detected on /dev/ttyUSB0 at 115200 baud. Override via
environment or constructor:
from pyvisa_ar488 import AR488VisaLibrary
lib = AR488VisaLibrary.from_serial(port="/dev/ttyACM0", baudrate=115200)
rm = pyvisa.ResourceManager(lib)
TCP (WiFi-connected ESP32)
lib = AR488VisaLibrary.from_tcp(host="192.168.1.100", port=23)
rm = pyvisa.ResourceManager(lib)
Bridge mode (mcgpib integration)
When used inside mcgpib, the backend shares the existing async connection instead of opening a new one:
lib = AR488VisaLibrary.from_bridge(bridge_connection, event_loop)
rm = pyvisa.ResourceManager(lib)
CLI
Scan a bus from the command line:
# Serial
pyvisa-ar488 --port /dev/ttyUSB0
# TCP
pyvisa-ar488 --host 192.168.1.100 --tcp-port 23
How it works
pyvisa discovers backends by looking for pyvisa_<name> packages.
pyvisa-ar488 registers as the @ar488 backend. When you open a resource,
the backend translates pyvisa's read/write/poll calls into AR488 ++ command
sequences:
| pyvisa call | AR488 commands |
|---|---|
rm.list_resources() |
++findlstn |
instr.write("*RST") |
++addr 22 then *RST |
instr.read() |
++read eoi |
instr.query("*IDN?") |
++addr 22, *IDN?, ++read eoi |
instr.read_stb() |
++spoll 22 |
instr.assert_trigger() |
++trg |
rm.send_ifc() |
++ifc |
The init sequence configures the adapter for machine-parseable output:
++verbose 0, ++prompt 0, ++auto 0, ++mode 1, ++eoi 1, ++eos 0.
Compatible adapters
- AR488 (Arduino / ESP32)
- Prologix GPIB-USB
- Any adapter using the Prologix
++command protocol
Requirements
- Python 3.11+
- pyvisa >= 1.13
- pyserial >= 3.5
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyvisa_ar488-2026.2.25.tar.gz.
File metadata
- Download URL: pyvisa_ar488-2026.2.25.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b4173b2a2450377ecac0aa61c361825f943ee2123d516f44cae751eeed2404c
|
|
| MD5 |
106af59726c31c1f0ec45032f43afe1f
|
|
| BLAKE2b-256 |
abb2e9a8a6d34ed4cd8b0af7c56bfb7a1c664d7a5d56cc0377f3e9bb2904f1d8
|
File details
Details for the file pyvisa_ar488-2026.2.25-py3-none-any.whl.
File metadata
- Download URL: pyvisa_ar488-2026.2.25-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73bed4985192e0b3c3abdea0f6ea3e9c20446bf1d4ef5759951d0f3533308bd
|
|
| MD5 |
568cf8d289a37a5a3714d63502b8a7d7
|
|
| BLAKE2b-256 |
8e7648011e80831254e0575e0fafce64c5c29c4b49144dd21f7ec3f22a5740ce
|