Giter VIP home page Giter VIP logo

modbus_visualizer's Introduction

modbus_visualizer

Current Features

  • Modbus TCP support
  • Single and Continuous Polling of registers
  • Writing Registers
  • Data display settings including:
    • Data type
    • Radix
    • Byte and Word Endianness
  • Modbus Error Response Handling
  • Modbus Serial Support for the following framers:
    • RTU
    • ASCII
    • Binary
  • Unit ID Selection (For Modbus TCP devices)

Future Features

  • Logging to File
  • Zero mode (1 or 0 index for registers)
  • Full register address display (show what the full register number is)
  • Read Device information metadata
  • Settings save to and load from file.

Developing

Install dependencies

  1. Clone the repository and checkout the develop branch (default)
  2. Install dependencies with pip install -r requirements.txt (can be in virtualenv) or use pipenv install (with pipenv installed)
  3. Install pyqt5-tools Global or user python installation (not virtualenv)

Editing the .ui files

To edit the .ui files navigate to where pyqt5-tools installed and launch designer.exe. Open the .ui file in QtDesigner and edit it. Save it in the ui_files directory. Generate the related python file using the pyuic5 command (part of pyqt5-tools). Example:

pyuic5 ./ui_files/modbus_visualizer.ui > ./visualizer/gui_main_window.py

Running

Run the program: python main.py or pipenv run main

Testing

The provided test server hosts a live modbus server on the interface of choice specified by command line arguments. This allows for a manual test server to be used to verify new features or bugfixes to the program. Eventually we should write some automated test, but this will do for now.

Specify the network type and protocol framer (only for serial) when launching the test server by passing command line arguments.

  • -s, --server-type: Can be either serial or tcp sets the network type for the test server (defualt = tcp)
  • -i, --ip: Sets the IP address for the tcp server (defualt = 127.0.0.1)
  • -p, --tcp-port: Sets the port for the tcp server (default = 5020)
  • -f, --framer: Sets the protocol framer for serial server. Can be rtu, ascii, or binary. (default = rtu)
  • -c, --com-port: Com port name for the serial server. MUST BE PROVIDED. (default = None)
  • --stop-bits: The number of stop bits for the serial server. Can be 1 or 2 (default = 1)
  • --byte-size: The byte length for the serial server. Can be 5,6,7, or 8. (default = 8)
  • -b, --baud-rate: The baud rate for the serial server. (default = 19200)
  • -u, --unit-id: The unit ID to use for the TCP server. (default = None (Broadcast Mode))

To test a serial server without an actual modbus device, a virtual com port program can be used on windows such as:

On Linux a pty can be used to link two serial sessions to test the server.

modbus_visualizer's People

Contributors

alexeshoo avatar louisdispa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.