Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pymodbus-dev/modbus-simulator

 
 

Repository files navigation

Modbus Simulator

Modbus Simulator with GUI based on modbus-tk

Requirements

Checking Out the Source

$ git clone https://bitbucket.org/sanjaykv/modbus-simulator
$ cd modbus_simulator

Development Instructions

  1. install kivy

  2. install modbus-tk

    • On Mac kivy uses its own virtual env ,hence all required modules needs to be installed seperatly installing modules
      • kivy -m pip install modbus-tk
  3. Setup development environment

Running/Testing application

$ cd modbus_simulator
$ kivy main.py

A GUi should show up if all the requirements are met !!

main_screen.png

Usage instructions

  1. Select the interface (only TCP supported as of now)
  2. Enter the desired PORT
  3. Start Simulation
  4. Add Slave
    • to add a single slave just click on 'add'
    • one can play around with values in 'from'/'to'/'count' text fields to add multiple slaves
    • to delete a selected slave use "delete' button
    • 'enable all' button is not implemented yet
  5. Add Data blocks
    • select a slave to enable Datablock tab pane
    • use button 'add' in Datablock pane to add data (0 based offset)
    • to delete a datablock ,select an item and use 'delete' button in Datablock pane
  6. To simulate data , press 'Simulate' button
  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) settings_screen.png

Packaging for different OS (Standalone applications)

A standalone application specific to target OS can be created with Kivy package manager

  1. OSX
  2. Linux
  3. Windows

OSx Standalone application

Modbus-Simulator v0.0.2