/python-modbus-tcp-demo

This is a demo for Developing Modbus TCP in Python Training

Primary LanguagePythonMIT LicenseMIT

python-modbus-tcp-demo

This is a demo for Developing Modbus TCP in Python Training

Prerequisites

pyserial

modbus-tk

mysql.connector

Installation

Download and install MySQL Connector:

    $ cd ~/tools
    $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz
    $ tar xzf mysql-connector-python-8.0.20.tar.gz
    $ cd ~/tools/mysql-connector-python-8.0.20
    $ sudo python3 setup.py install

Download and install modbus-tk

    $ cd ~/tools
    $ git clone https://github.com/pyserial/pyserial.git
    $ cd ~/tools/pyserial
    $ sudo python3 setup.py install
    $ git clone https://github.com/ljean/modbus-tk.git
    $ cd ~/tools/modbus-tk
    $ sudo python3 setup.py install

References

[1]. http://myems.io

[2]. http://www.modbus.org/tech.php

[3]. https://github.com/ljean/modbus-tk

[4]. https://docs.python.org/3/library/struct.html#format-strings

[5]. https://www.modbustools.com/download.html