16-channel relay controller GUI with SCPI interface for NEnG RelayBank16 instruments.
Project description
Relay Controller
16-channel relay controller GUI for NEnG RelayBank16 instruments.
Tools included
| Command | Description |
|---|---|
relay-controller-gui |
Tkinter GUI with 4x4 relay grid, bulk operations, SCPI console, dark/light theme |
Supports USB serial and WiFi/TCP connections with auto-detection.
This directory is a standalone, pip-installable Python package.
Install
Recommended: Install from PyPI
pip install neng-relay-controller
Development install from source (editable mode)
cd RelayBank16/Python/relay-controller
python3 -m venv .venv
source .venv/bin/activate # macOS / Linux
python -m pip install -U pip
python -m pip install -e .
Tkinter on macOS
The GUI requires Tkinter. On macOS it may be missing depending on how Python was installed:
brew install tcl-tk
brew install python-tk@3.xx # replace xx with your Python minor version
Run
relay-controller-gui
Features
- Visual Relay Grid — 4x4 grid of 16 relay buttons, click to toggle, right-click to pulse
- Real-time State Sync — Automatic polling keeps display synchronized with hardware
- Bulk Operations — All ON, All OFF, Invert, Hex Mask, Reset (*RST), Relay Test
- Pulse Configuration — Adjustable default pulse duration
- Connection Options — Auto/Force USB/WiFi with port scanning and WiFi discovery
- SCPI Console — Direct command entry with Up/Down history navigation
- Bitmask Display — Current relay state shown as hex and spaced binary
- Device Info — Model, serial number, firmware version, connection type
- Dark/Light Theme — Professional appearance with one-click theme toggle
- Safe Shutdown — Optional "Turn all relays OFF?" prompt on close
SCPI Commands (Quick Reference)
# Individual relay control
:RELA1:STAT ON # Turn relay 1 ON
:RELA1:STAT? # Query relay 1 state
:RELA5:PULS # Pulse relay 5
# Bulk control
:ROUT:MASK 0xFFFF # All relays ON
:ROUT:MASK 0x0000 # All relays OFF
:ROUT:MASK 0x00FF # Relays 1-8 ON
:ROUT:CLOS 1,3,5,7 # Close specific relays
:ROUT:OPEN 2,4 # Open specific relays
# System
*IDN? # Device identification
*RST # Reset (all OFF)
:ROUT:TEST # Sequential relay test
See SCPI_COMMAND_REFERENCE.md for the full command reference.
Notes
- Baud rate: 115 200 (USB CDC)
- TCP port: 5025 (standard SCPI-over-TCP)
- Only one client can use the serial port at a time
Release
See RELEASE_QUICK_START.md for release instructions.
(c) 2024-26 Prof. Flavio ABREU ARAUJO. All rights reserved.
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 neng_relay_controller-0.1.3.tar.gz.
File metadata
- Download URL: neng_relay_controller-0.1.3.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccc86a232eb4629f2054a34d91f02a122b6829a81cd4927ddf2abe384db33359
|
|
| MD5 |
fa2a66f4f32b653ecd4a733b4f3a6538
|
|
| BLAKE2b-256 |
6ba6635286783fdd8599dc17319148ab5ce8c290b658ef6588700187c9b07643
|
File details
Details for the file neng_relay_controller-0.1.3-py3-none-any.whl.
File metadata
- Download URL: neng_relay_controller-0.1.3-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfcb940d173cf750c409d62739aaac909b372a270f7edd494961a65b73cee4c6
|
|
| MD5 |
66ba9ba6f768e5808d37c225fa0ebeb1
|
|
| BLAKE2b-256 |
d674e07f327cea211555d595d17a843025798c86f3a38302be8a44806d931dfc
|