🛠️ This repository is the open-source version of the project and no longer receives updates.
This project provides a comprehensive framework for remotely controlling and automating test and measurement instruments. It features a modular architecture that separates instrument-specific logic from communication protocols, making it extensible and easy to maintain.
- Python: Core programming language.
- Streamlit: For the interactive web control panel and scenario builder.
- PyVISA: As a backend for instrument communication.
- Robot Framework: For defining and executing test scenarios.
- Redis: As a message broker for real-time updates and communication between components.
- PyMeasure: For high-level instrument drivers.
- Modular & Distributed Architecture: Designed based on the C4 model, allowing components (GUI, Test Engine, Protocol Converter) to run on different systems.
- Powerful Test Engine: Utilizes Robot Framework to define and execute complex test scenarios, generate detailed reports, and manage test flows.
- Interactive User Interface: A web-based dashboard built with Streamlit for live control of instruments, test execution, and result visualization.
- Standard Equipment Support: Includes high-level drivers for common instruments like the HP-3458A Multimeter, HP-53131A Counter, and AFG-2225 Function Generator.
- Flexible Communication Layer: Supports both the commercial Prologix converter and a custom, low-cost GPIB converter based on a Raspberry Pi.
- Real-time Monitoring: Uses a message broker (Redis) to publish test execution events and instrument statuses live to the user interface.
The system architecture is designed to be multi-layered and based on independent containers to provide maximum flexibility and extensibility. Below shows an overview of the main containers and their interactions:
-
Streamlit GUI: The web-based user interface for user interaction.
-
Test Engine: The core of the system, based on Robot Framework, which executes the scenarios.
-
Test Event Broker: A Redis message broker for asynchronous communication between the test engine and the UI.
-
Pymeasure/PyVISA: Abstraction layers to simplify communication with instruments.
-
GPIB Converter: The hardware converter (Prologix or Raspberry Pi) that translates commands to the GPIB protocol.
- HP 3458A Digital Multimeter
- HP 53131A Frequency Counter
- AFG-2225 Function Generator
- HP E4419B Power Meter
- Prologix GPIB-Ethernet
- Custom Raspberry Pi-based converter (using the linux-gpib driver)
- Python 3.10+
- Git
- A running Redis Server
- A Raspberry Pi with Raspberry Pi OS to use the custom converter.
The raspberry pi based GPIB converter running the PyVISA-proxy server. Implemented using linux-gpib and with the help of this website instructions.
Prebuilt binaries for the Raspberry Pi 3 (armv7l architecture) are available, making it easier to set up the framework without needing to compile from source. These binaries are compatible with systems running Raspbian Bookworm 32bits or similar distributions. Prebuilt binaries can be found in the raspberry_pi_binaries directory of this repository.
Clone the repository:
git clone [https://github.com/your-username/test-automation-framework.git](https://github.com/your-username/test-automation-framework.git)
cd test-automation-frameworkInstall dependencies:
pip install -r requirements.txtRun the proxy server (for network communication):
On the system connected to the instruments (e.g., the Raspberry Pi), run the PyVISA-proxy server:
python -m pyvisa_proxy --port 5000Running the Graphical User Interface To launch the web dashboard, run the following command:
streamlit run app.pyYou can execute Robot Framework test scenarios directly from the user interface.
Here is a simple example of a test file (measure_frequency.robot) for measuring frequency:
*** Settings ***
Library HP53131ALibrary.py AS Counter
Library AFG2225Library.py AS Function
*** Test Cases ***
Measure 100kHz Frequency
[Documentation] Generate a 100kHz signal and measure it with the counter.
# Establish connection via network proxy
Counter.Open Connection GPIB0::3::INSTR visa_library=192.168.1.102:5000@proxy
Function.Open Connection ASRL5::INSTR
# Configure Function Generator
Function.Set Channel Frequency 1 100000
Function.Set Channel Amplitude 1 1.0
Function.Enable Channel Output 1
# Measure and Validate
Counter.Measure Frequency channel=1
${freq}= Counter.Initiate Wait And Fetch
Should Be True ${freq} > 99990 and ${freq} < 100010
# Clean up
Function.Close Connection
Counter.Close ConnectionContributions to this project are welcome! Please open a new issue to report bugs or suggest features, or submit a pull request with your changes.
Do not contribute yet, this project is still in early development.
A web-based dashboard built with Streamlit for live control of instruments, test execution, and result visualization.
Streamlit GUI screenshots:


