ModSyncX
A lightweight Python script for Modbus RTU & TCP communication using PyModbus. Supports reading/writing registers, error handling, and diagnostics.
Install / Use
/learn @vivek-rx/ModSyncXREADME
PyModbus GUI – Modbus Communication with a User Interface
Overview
PyModbus GUI is a Python-based graphical user interface (GUI) for communicating with Modbus devices (RTU/TCP). It allows users to read/write Modbus registers, visualize real-time data, and interact with Modbus-compatible industrial devices effortlessly.
Features
✅ Connect to Modbus RTU & TCP Devices
✅ Read/Write Holding & Input Registers
✅ Real-Time Data Monitoring
✅ User-Friendly GUI (Tkinter)
✅ Error Handling & Connection Diagnostics
1️⃣ Installation
🔹 Prerequisites
Before running the application, make sure you have Python 3.7+ installed. You can check your Python version using:
python --version
🔹 Clone the Repository
git clone https://github.com/your-username/pymodbus-gui.git
cd pymodbus-gui
🔹 Install Dependencies
Run the following command to install the required packages:
pip install -r requirements.txt
2️⃣ How to Run the Application
🔹 Run the GUI
To start the PyModbus GUI, execute:
python main.py
🔹 Modbus Connection Settings
-
Modbus RTU (Serial Port)
- COM Port (e.g.,
COM3or/dev/ttyUSB0) - Baud Rate (9600, 19200, etc.)
- Parity, Stop Bits, and Timeout
- COM Port (e.g.,
-
Modbus TCP (Ethernet/Internet)
- IP Address (e.g.,
192.168.1.100) - Port (Default:
502)
- IP Address (e.g.,
3️⃣ Usage Guide
🔹 Connect to a Modbus Device
- Select Modbus Type: RTU (Serial) or TCP (Ethernet)
- Enter Connection Parameters (COM Port/IP Address, Baud Rate, etc.)
- Click "Connect"
🔹 Read Registers
- Select Function Code (e.g.,
Read Coil Registers (FC3)) - Enter Slave ID, Register Address, and Number of Registers
- Click "Read" to fetch data
🔹 Write Registers
- Select Function Code (e.g.,
Write Single Register (FC6)) - Enter Slave ID, Register Address, and Value
- Click "Write" to send data
4️⃣ Folder Structure
pymodbus-gui/
│── gui/ # GUI-related files
│── modbus/ # Modbus communication scripts
│── main.py # Main script to run the app
│── config.py # Configuration settings
│── utils.py # Utility functions (e.g., logging, error handling)
│── README.md # Project documentation
│── requirements.txt # Python dependencies
│── .gitignore # Files to ignore in Git
5️⃣ Requirements File (requirements.txt)
Ensure you have all necessary dependencies installed:
pymodbus
tkinter
pyserial
Install them with:
pip install -r requirements.txt
6️⃣ Troubleshooting & Common Issues
🔹 No Response from Modbus Device
- Check if the Modbus device is powered on
- Verify the COM port / IP Address & Port
- Ensure Baud Rate, Parity, and Stop Bits match
🔹 Connection Timeout or Failure
- For Modbus RTU: Ensure the correct USB-to-RS485 converter is used
- For Modbus TCP: Make sure the firewall is not blocking port 502
🔹 "ModuleNotFoundError" for pymodbus or pyserial
- Run:
pip install pymodbus pyserial
7️⃣ Future Enhancements 🚀
📌 Graphical Data Plotting (Live Charts for Modbus Data)
📌 CSV Export of Modbus Readings
📌 Modbus Coil Status Control
📌 Multi-Slave Support
8️⃣ License
This project is licensed under the MIT License – feel free to modify and improve it!
9️⃣ Contribution Guidelines
Contributions are welcome! Follow these steps to contribute:
- Fork the Repository
- Create a Feature Branch
git checkout -b feature-branch - Make Changes & Commit
git add . git commit -m "Added new feature" - Push & Create a Pull Request
git push origin feature-branch - Open a Pull Request (PR) on GitHub
Related Skills
imsg
342.5kiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
oracle
342.5kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
lobster
342.5kLobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (s
Hook Development
85.3kThis skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
