A Python3 MODBUS TCP server for testing purposes
Project description
modbus-tcp-server
A thread-based MODBUS TCP server for testing purposes.
Installation
Just type
pip install modbus-tcp-server
And to run it
modbus-tcp-server 127.0.0.1
Just run it without any arguments to see the command line.
Limitations
So far commands 15 (Force Multiple Coils) and 16 (Preset Multiple Registers) are unsupported.
Custom usage
To implement a custom provider ModbusTCPServer, just extend BaseDataSource to provide data of your choosing and launch it that way:
from modbus_tcp_server.network import AcceptThread
from modbus_tcp_server.data_source import BaseDataSource
class CustomDB(BaseDataSource):
...
c_db = CustomDB()
at = AcceptThread('0.0.0.0', 502, c_db).start()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
modbus-tcp-server-0.1.tar.gz
(7.5 kB
view hashes)
Built Distributions
Close
Hashes for modbus_tcp_server-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9ed8ffecf4c3c957b6c1f2b7cf75485848c8436551a1268f75beaecebcab9fa |
|
MD5 | 7332c5e8936c84c6b40e21a61a007495 |
|
BLAKE2b-256 | 5b2a5ac328b4c52d50d5d87baad055a541973694b8117c244329ae58c310533f |