|
1 | | -# PythonGUI-With-Raspberry-Pi-5 |
2 | | -Cross-platform Python framework for multi-axis servo control over RS-232/RS-485. Supports concurrent control of multiple drives across independent serial ports using a threaded architecture. Provides basic motion control, parameter tuning, and live feedback on Windows and Linux systems. |
| 1 | +# Multi-Axis Servo Control over Serial (RS-232 / RS-485) |
| 2 | + |
| 3 | +This repository contains a **cross-platform, multi-axis servo control framework** written in Python. |
| 4 | +It enables simultaneous control and monitoring of multiple servo drives connected via **independent serial (COM) ports**, using a **threaded, non-blocking architecture**. |
| 5 | + |
| 6 | +The project is designed as a **practical control and diagnostics layer** for serial-based servo systems rather than a hard real-time motion controller. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +### Multi-Axis, Multi-Port Control |
| 13 | +- Each servo axis is mapped to its own serial port |
| 14 | +- Multiple drives can be controlled concurrently without I/O blocking |
| 15 | + |
| 16 | +### Threaded Communication Model |
| 17 | +- Dedicated worker threads per axis for continuous polling |
| 18 | +- Thread-safe serial access using a global I/O lock |
| 19 | +- Responsive command execution even under high polling rates |
| 20 | + |
| 21 | +### Motion Control Capabilities |
| 22 | +- Absolute and relative position moves |
| 23 | +- Constant speed commands |
| 24 | +- Motion start and stop control |
| 25 | +- Encoder-based feedback monitoring |
| 26 | + |
| 27 | +### Parameter Read / Write |
| 28 | +- Drive ID configuration |
| 29 | +- Gain tuning (P / I / D) |
| 30 | +- Gear ratio and limit parameters |
| 31 | +- Live readback of position, speed, and torque/current |
| 32 | + |
| 33 | +### Cross-Platform Support |
| 34 | +- Runs on **Windows and Linux** |
| 35 | +- Uses standard Python serial interfaces |
| 36 | +- No OS-specific dependencies |
| 37 | + |
| 38 | +### Optional Graphical Interface |
| 39 | +- PySide6-based GUI for interactive control |
| 40 | +- Drive discovery and axis selection |
| 41 | +- Live status visualization |
| 42 | +- Manual motion and parameter tuning tools |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Typical Use Cases |
| 47 | + |
| 48 | +- Servo drive commissioning and bench testing |
| 49 | +- Multi-axis tuning and diagnostics |
| 50 | +- Automation prototyping and lab setups |
| 51 | +- Service, maintenance, and field utilities |
| 52 | +- Educational or internal engineering tools |
| 53 | + |
| 54 | +This project is **not intended for time-critical interpolation or deterministic motion control**, but rather as a flexible interface for serial-driven servo systems. |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Requirements |
| 59 | + |
| 60 | +- Python 3.x |
| 61 | +- `pyserial` |
| 62 | +- `PySide6` (optional, for GUI) |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## High-Level Architecture |
| 67 | + |
| 68 | +- **Low-level driver module** |
| 69 | + Handles packet framing, CRC checks, and command execution. |
| 70 | + |
| 71 | +- **Axis worker threads** |
| 72 | + Each axis runs independently for polling and motion commands. |
| 73 | + |
| 74 | +- **Application layer / GUI** |
| 75 | + Presents live data and exposes control functionality. |
| 76 | + |
| 77 | +The architecture is modular and designed for extension to additional commands or compatible drive families. |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## Safety Notice |
| 82 | + |
| 83 | +This software can command real motion hardware. |
| 84 | +Always test in a controlled environment and ensure proper safety interlocks are in place before use. |
| 85 | + |
| 86 | + |
0 commit comments