Skip to content

Commit 22882c4

Browse files
committed
Merge remote-tracking branch 'riptide/master' into riptide
2 parents e2408fa + 585d1cd commit 22882c4

29 files changed

+1050
-317
lines changed

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
33
*.py[cod]
4+
*$py.class
45

56
# C extensions
67
*.so
@@ -42,6 +43,7 @@ htmlcov/
4243
nosetests.xml
4344
coverage.xml
4445
*,cover
46+
.hypothesis/
4547

4648
# Translations
4749
*.mo
@@ -54,6 +56,16 @@ coverage.xml
5456
docs/_build/
5557

5658
# PyBuilder
57-
5859
target/
5960

61+
#PyCharms
62+
.idea
63+
64+
#IniFiles
65+
*.ini
66+
67+
#JSONFiles
68+
*.json
69+
**/*.ini
70+
instructions
71+
read

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include requirements
2+
include README.md
3+
include modbus_simulator/assets/*.png
4+
include modbus_simulator/assets/*.ico
5+
include modbus_simulator/templates/*.kv

README.md

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,54 @@
1-
# NOTE:
2-
## 1
3-
This project is moved to [gitlab] (https://gitlab.com/dhoomakethu/kivy-modbus-simu) .
4-
A newer version with support to serial mode is available there.
5-
6-
## 2
7-
A cli version supporting both Modbus_RTU and Modbus_TCP is available here [modbus_simu_cli](https://github.com/dhoomakethu/modbus_sim_cli)
8-
91
# Modbus Simulator
102

113
Modbus Simulator with GUI based on modbus-tk
124

13-
## Requirements
14-
* [modbus-tk](https://pypi.python.org/pypi/modbus_tk)
15-
* [kivy 1.9.0 >](http://kivy.org/#download)
16-
175
## Checking Out the Source
18-
$ git clone https://bitbucket.org/sanjaykv/modbus-simulator
19-
$ cd modbus_simulator
6+
$ git clone https://github.com/riptideio/modbus-simulator.git
7+
$ cd modbus-simulator
8+
209

2110
## Development Instructions
22-
1. install kivy
23-
- [OSx](http://kivy.org/docs/installation/installation-macosx.html)
24-
- [Linux](http://kivy.org/docs/installation/installation-linux.html#ubuntu-11-10-or-newer)
25-
- [Windows](http://kivy.org/docs/installation/installation-windows.html)
26-
27-
2. install modbus-tk
28-
* 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)
29-
- kivy -m pip install modbus-tk
11+
1. create virtualenv and install requirements
12+
13+
```
14+
$ # Kivy depends on Cython, Install Cython before running the requirements
15+
$ pip install Cython==0.25.2
16+
$ pip install -r requirements
17+
$ # Choose Modbus Backend modbus_tk or pymodbus (default)
18+
$ # To install pymodbus
19+
$ pip install pymodbus==1.3.2
20+
$ # To install modbus tk
21+
$ Pip install modbus-tk
22+
23+
```
24+
25+
3026
3. [Setup development environment](https://github.com/kivy/kivy/wiki/Setting-Up-Kivy-with-various-popular-IDE's)
3127
3228
## Running/Testing application
33-
$ cd modbus_simulator
34-
$ kivy main.py
29+
30+
1. To run simulation with pymodbus backend, run `./tools/launcher`
31+
2. To run sumulation with modbus-tk as backend run `./tools/launcher mtk`
32+
33+
34+
3535
A GUi should show up if all the requirements are met !!
3636
3737
![main_screen.png](/img/main_screen.png)
3838
39-
## Usage instructions
40-
1. Select the interface (only TCP supported as of now)
41-
2. Enter the desired PORT
42-
3. Start Simulation
43-
4. Add Slave
44-
* to add a single slave just click on 'add'
45-
* one can play around with values in 'from'/'to'/'count' text fields to add multiple slaves
46-
* to delete a selected slave use "delete' button
47-
* 'enable all' button is not implemented yet
48-
5. Add Data blocks
49-
* select a slave to enable Datablock tab pane
50-
* use button 'add' in Datablock pane to add data (0 based offset)
51-
* to delete a datablock ,select an item and use 'delete' button in Datablock pane
52-
6. To simulate data , press 'Simulate' button
53-
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)
39+
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)
5440
![settings_screen.png](img/settings_screen.png)
5541
42+
## Usage instructions
43+
[![Demo Modbus Simulator](img/simu.dif)](https://youtu.be/nlu3S5jdEn4)
44+
5645
## Packaging for different OS (Standalone applications)
5746
A standalone application specific to target OS can be created with Kivy package manager
5847
59-
1. [OSX](http://kivy.org/docs/guide/packaging-macosx.html)
48+
1. [OSX](https://kivy.org/docs/guide/packaging-osx.html)
6049
2. [Linux](http://bitstream.io/packaging-and-distributing-a-kivy-application-on-linux.html)
6150
3. [Windows](http://kivy.org/docs/guide/packaging-windows.html)
6251
63-
## OSx Standalone application
64-
[Modbus-Simulator v0.0.3](/binaries/osx/modbus_simulator.app.zip)
52+
53+
# NOTE:
54+
A cli version supporting both Modbus_RTU and Modbus_TCP is available here [modbus_simu_cli](https://github.com/dhoomakethu/modbus_sim_cli)
-29.4 MB
Binary file not shown.

img/icon_settings.png

-5.11 KB
Binary file not shown.

img/main_screen.png

591 Bytes
Loading

img/modbus.png

-14.3 KB
Binary file not shown.

img/settings_screen.png

-19.8 KB
Loading

img/simu.gif

1.65 MB
Loading

modbus_simulator/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)