|
1 | | -# modbus_simulator |
2 | | -Modbus simulator based on modbus-tk and kivy for GUI |
| 1 | +# Modbus Simulator |
| 2 | + |
| 3 | +Modbus Simulator with GUI based on modbus-tk |
| 4 | + |
| 5 | +## Requirements |
| 6 | +* [modbus-tk](https://pypi.python.org/pypi/modbus_tk) |
| 7 | +* [kivy 1.9.0 >](http://kivy.org/#download) |
| 8 | + |
| 9 | +## Checking Out the Source |
| 10 | + $ git clone https://github.com/dhoomakethu/modbus_simulator.git |
| 11 | + $ cd modbus_simulator |
| 12 | + |
| 13 | +## Development Instructions |
| 14 | +1. install kivy |
| 15 | + - [OSx](http://kivy.org/docs/installation/installation-macosx.html) |
| 16 | + - [Linux](http://kivy.org/docs/installation/installation-linux.html#ubuntu-11-10-or-newer) |
| 17 | + - [Windows](http://kivy.org/docs/installation/installation-windows.html) |
| 18 | + |
| 19 | +2. install modbus-tk |
| 20 | + * On Mac kivy uses its own virtual env ,hence all required modules needs to be installed seperatly [installing modules](http://kivy.org/docs/installation/installation-macosx.html#installing-modules) |
| 21 | + - kivy -m pip install modbus-tk |
| 22 | +3. [Setup development environment](https://github.com/kivy/kivy/wiki/Setting-Up-Kivy-with-various-popular-IDE's) |
| 23 | + |
| 24 | +## Running/Testing application |
| 25 | + $ cd modbus_simulator |
| 26 | + $ kivy main.py |
| 27 | +A GUi should show up if all the requirements are met !! |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## Usage instructions |
| 32 | +1. Select the interface (only TCP supported as of now) |
| 33 | +2. Enter the desired PORT |
| 34 | +3. Start Simulation |
| 35 | +4. Add Slave |
| 36 | + * to add a single slave just click on 'add' |
| 37 | + * one can play around with values in 'from'/'to'/'count' text fields to add multiple slaves |
| 38 | + * to delete a selected slave use "delete' button |
| 39 | + * 'enable all' button is not implemented yet |
| 40 | +5. Add Data blocks |
| 41 | + * select a slave to enable Datablock tab pane |
| 42 | + * use button 'add' in Datablock pane to add data (0 based offset) |
| 43 | + * to delete a datablock ,select an item and use 'delete' button in Datablock pane |
| 44 | +6. To simulate data , press 'Simulate' button |
| 45 | +7. All the settings for various modbus related settings (block size/minimum/maximun values/logging) could be set and accessed from settings panel (use F1 or click on Settings icon at the bottom) |
| 46 | + |
| 47 | + |
| 48 | +## Packaging for different OS (Standalone applications) |
| 49 | +A standalone application specific to target OS can be created with Kivy package manager |
| 50 | +1. [OSX](http://kivy.org/docs/guide/packaging-macosx.html) |
| 51 | +2. [Linux](http://bitstream.io/packaging-and-distributing-a-kivy-application-on-linux.html) |
| 52 | +3. [Windows](http://kivy.org/docs/guide/packaging-windows.html) |
0 commit comments