What is PyVISA?
PyVISA presentation, a Python wrapper for the VISA driver that enables controlling measurement instruments using Python.
Control test & measurement instruments with Python. PyVISA provides a unified interface to communicate with oscilloscopes, multimeters, power supplies, and thousands of other instruments regardless of the interface (USB, Ethernet, GPIB, RS232).
Why Choose PyVISA?
Trusted by engineers and researchers worldwide for instrument control.
instrument manufacturers supported
stars on GitHub
compatible instruments worldwide
Universal Compatibility
Works with 100+ instrument manufacturers and growing.
Simple Yet Powerful
Control complex instruments with just a few lines of Python.
Production Ready
Battle-tested in labs and manufacturing worldwide.
High Performance
Optimized for speed with binary transfers and async operations.
Data Integration
Seamlessly integrate with NumPy, Pandas, and SciPy.
Scalable Architecture
Handle megabytes of data and thousands of measurements.
Quick Example
import pyvisa
# Connect to your instrument
rm = pyvisa.ResourceManager()
scope = rm.open_resource('USB0::0x0699::0x03A4::C012345::INSTR')
# Send commands and get data
scope.write('CH1:SCALE 0.5') # Set channel 1 to 500mV/div
frequency = scope.query('MEASURE:FREQUENCY?')
print(f"Signal frequency: {frequency}")
# Capture waveform data
waveform = scope.query_binary_values('CURVE?', datatype='b')
What You'll Learn
This documentation provides practical, production-ready examples that you can use immediately in your projects. Whether you're automating tests, collecting research data, or building measurement systems, you'll find working code and best practices from real-world applications.
New to instrument control? Start with Platform Setup to install PyVISA, then try the Multimeter Example for hands-on learning.
Typical PyVISA Project Structure
Project Organization
Organizing your PyVISA project with a clear structure makes it easier to maintain and scale your test automation system.
Start Your Journey
Platform Setup
Install PyVISA and drivers for Windows, Linux, or macOS
Quick Examples
Copy-paste code for oscilloscopes, DMMs, power supplies
Python Guide
Best practices for robust instrument control
SCPI Reference
Master the command language of instruments
Performance
Speed up data transfers and optimize memory
Troubleshooting
Solutions for connection and timeout issues
Supported Instruments
PyVISA works with virtually any VISA-compliant instrument:
- Oscilloscopes - Capture waveforms, measure timing, analyze signals
- Digital Multimeters - Precision voltage, current, resistance measurements
- Power Supplies - Automated power sequencing and monitoring
- Signal Generators - Create test signals and modulation patterns
- Spectrum Analyzers - RF measurements and spectral analysis
- Network Analyzers - S-parameters and impedance measurements
- Electronic Loads - Battery testing and power validation
- Data Acquisition - Multi-channel logging and sensor readouts
How is this guide?