Kivy GUI for Galil DMC controller - designed for Raspberry Pi deployment
Project description
Welcome to PythonDMCGUI
Custom Python + Kivy GUI to control a Galil machine using DMC.
Requirements
- GCLib: https://www.galil.com/sw/pub/all/rn/gclib.html
- Conda (optional): https://www.anaconda.com/download/success
- Kivy: https://kivy.org/doc/stable/gettingstarted/installation.html
- Python 3.10+
Setup
- conda env create -f environment.yml (run in repo root)
- conda activate dmc
- Install GCLib (x64) and ensure PATH is set
Run
python -m dmccodegui.main
Installation to RasPi
# Install system dependencies
sudo apt update && sudo apt install -y python3-pip python3-dev libgl1-mesa-dev
# 1. Install the GUI package
pip3 install dmccodegui
# 2. Install Galil driver separately
pip3 install https://www.galil.com/sw/pub/python/gclib-1.0.0-py3-none-any.whl
Run
# After pip installation
dmccodegui
# Or alternatively
python -m dmccodegui.main
## Architecture (Developer Guide)
Layered structure keeps UI responsive and testable:
- `src/dmccodegui/main.py`
- Loads KV files, builds root, injects `GalilController` and `MachineState` into all screens
- Hooks controller logging to popup alerts and the message ticker
- `src/dmccodegui/controller.py`
- `GalilController` API with functions to interface w controller
- `src/dmccodegui/app_state.py`
- `MachineState` dataclass with pub/sub and a rotating `messages` list for alerts
- `src/dmccodegui/utils/jobs.py`
- Single worker thread + interval scheduler
- `src/dmccodegui/screens/`
- This directory holds python logic for each screen
- `src/dmccodegui/ui/`
- `base.kv`: root layout; custom toolbar; global message ticker row
- `setup.kv`, `rest.kv`, `start.kv`, `arrays.kv`: per-screen layouts
- `edges.kv`: KV-only subclasses `EdgePointBScreen`/`EdgePointCScreen` using different arrays
- `theme.kv`: shared styles
## Tests
```bash
pytest -q
See tests/test_controller.py and tests/test_arrays.py for controller behavior and array round-trips using dummy drivers.
Build for PyPI
pip install build twine
python -m build
twine upload dist/*
Links
- DMC Code and Info: https://www.galil.com/learn/sample-dmc-code
- GCLib documentation: https://www.galil.com/sw/pub/all/doc/gclib/html/examples.html
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
dmccodegui-0.1.0.tar.gz
(6.1 MB
view details)
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 dmccodegui-0.1.0.tar.gz.
File metadata
- Download URL: dmccodegui-0.1.0.tar.gz
- Upload date:
- Size: 6.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
288a45c2fcaf74a9e2c290c49ed1774317643f0287f68da68d7144413d114ab1
|
|
| MD5 |
498dc481be08e1e445325427f7586ec2
|
|
| BLAKE2b-256 |
229ae2e3e0dcfc1f3040cd03c79b662eaa611fc232af281ecc79cc768718c978
|
File details
Details for the file dmccodegui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmccodegui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15b21a425b0f5e366feb554be26186e0d43e40a95ae9cdb454b3a3314a4cb29e
|
|
| MD5 |
0f5ecf80522114081d94616a7499ba6c
|
|
| BLAKE2b-256 |
4257fd9eb17935f15c5f708232aa38784ddf3db5f3e4702d7005e65b547bc371
|