PyVISA Docs
PyVISA connects Python to VISA-compatible instruments over USB, Ethernet, GPIB, and RS-232. Setup guides, examples, and SCPI reference.
PyVISA connects Python to any VISA-compatible instrument over USB, Ethernet, GPIB, or RS-232. One API for oscilloscopes, multimeters, power supplies, signal generators, and thousands of other instruments from any manufacturer.
import pyvisa
rm = pyvisa.ResourceManager()
scope = rm.open_resource('USB0::0x0699::0x03A4::C012345::INSTR')
scope.write('CH1:SCALE 0.5')
frequency = scope.query('MEASURE:FREQUENCY?')
print(f"Signal frequency: {frequency}")
waveform = scope.query_binary_values('CURVE?', datatype='b')Get Started
Windows Setup
Install PyVISA and NI-VISA on Windows
Linux Setup
Install PyVISA on Ubuntu/Debian with USB and serial
SCPI Commands
Command syntax, error codes, and query patterns
API Reference
ResourceManager, Instrument methods, attributes, exceptions
Instruments & Brands
Oscilloscope
Capture waveforms and measure signals (Tektronix)
Multimeter
Read voltage, current, and resistance (Keysight)
Power Supply
Set voltage, current limits, read output (GW Instek)
Electronic Load
Run discharge tests (Siglent)
Keysight
DMMs, scopes, signal generators
Tektronix
Oscilloscopes, AFGs, spectrum analyzers
Rohde & Schwarz
Spectrum analyzers, signal generators, VNAs
Go Deeper
Instrument Control Patterns
Resource management, error handling, multi-instrument coordination
Performance
Binary transfers, chunk_size tuning, connection pooling
Troubleshooting
Fix connection errors, timeouts, and driver conflicts
Community & Support
Join the Discord community for help, discussions, and to connect with other developers using PyVISA.