This project provides a simple Modbus TCP server and client implementation in C# for Windows, featuring a real-time WPF dashboard for visualizing data.
- Modbus TCP Server simulating a conveyor belt system
- Modbus TCP Client for interacting with the server
- Real-time WPF dashboard displaying conveyor belt status and statistics
- Supports Read Holding Registers (0x03) and Write Single Register (0x06) functions
- Simulates temperature sensors, item counting, and emergency stop functionality
- Windows operating system
- .NET Framework 4.8
- Visual Studio 2019 or later (for development)
ModbusTCPServer.cs
: Server implementationModbusTCPClient.cs
: Client implementationServerDashboard/
: WPF project for the real-time dashboardbuild.bat
: Batch script to build and run all components
- Clone this repository
- Ensure .NET Framework 4.8 is installed on your system
- Open a command prompt in the project directory
- Run
build.bat
to compile and start all components
The demo GIF shows four windows:
- Top Left: Terminal running
build.bat
and client interaction - Top Right: WPF Dashboard showing real-time conveyor belt data
- Bottom Left: Server terminal output
- Run
build.bat
to start the server, client, and dashboard - Use the client terminal to interact with the simulated conveyor belt system:
- Start/stop the conveyor
- Adjust conveyor speed
- Activate/deactivate emergency stop
- Observe real-time updates on the WPF dashboard
You can modify the server, client, or dashboard code to add more features or change the simulation behavior. After making changes, run build.bat
again to recompile and run the updated system.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the WTFPL (Do What The F*ck You Want To Public License). See the LICENSE for details.
This implementation is intended for educational and demonstration purposes. It may not be suitable for production environments without further development and security considerations.