f3ts-hardware-utils provides a consistent Python interface for controlling test instrumentation. Whether you're working with power supplies, DMMs, oscilloscopes, or other equipment, the library abstracts vendor-specific protocols behind a unified API.
Supported Instruments#
The library includes drivers for common test equipment:
Power Supplies
- Keysight E36xx series
- Rigol DP800 series
- Siglent SPD3303X
Digital Multimeters
- Keysight 34460A/34461A/34465A
- Fluke 8845A/8846A
- Rigol DM3000 series
Other Equipment
- USB-GPIO adapters (FT232H, MCP2221)
- Serial relay controllers
- Custom SCPI instruments
Quick Start#
pip install f3ts-hardware-utilsBasic usage:
from f3ts_hardware_utils import PowerSupply, DMM
# Connect to instruments
ps = PowerSupply.connect("TCPIP0::192.168.1.100::INSTR")
dmm = DMM.connect("USB0::0x2A8D::0x0101::MY12345678::INSTR")
# Unified API regardless of vendor
ps.set_voltage(3.3)
ps.set_current_limit(0.5)
ps.enable_output()
voltage = dmm.measure_voltage()
print(f"Output voltage: {voltage:.3f}V")Why f3ts-hardware-utils?#
Direct VISA/SCPI programming requires dealing with vendor-specific command sets, connection handling, and error recovery. f3ts-hardware-utils handles these details:
- Consistent method names across vendors (
set_voltage(), notVOLT:LEV 3.3) - Automatic connection management including reconnection after power cycles
- Type safety with proper Python types instead of string parsing
- Error handling that translates instrument errors to Python exceptions
Integration#
f3ts-hardware-utils integrates seamlessly with pytest-f3ts for test automation, but works equally well standalone for scripting and interactive use.
Documentation#
See the PyPI package page for installation instructions and the latest version. Full API documentation is available in the package's docstrings.