ModSim - A Simple Modbus TCP Device Simulator
modsim is a simple Modbus TCP device simulator deployed at modsim.topmaker.net:502.
It works as a remote Modbus-TCP (virtual) device, which has already been populated with all 4 types of registers, i.e.
- Coil Type
- Discrete input Type
- Input register Type
- Holding register Type
It is recommended to use modpoll tool to communicate with it, the example configuration is as following,
device,modsim001,1,,
poll,coil,0,12,BE_BE
ref,coil01-08,0,bool8,rw
ref,coil09-12,1,bool8,rw
poll,discrete_input,10000,16,BE_BE
ref,di01-08,10000,bool8,rw
ref,di09-16,10001,bool8,rw
poll,input_register,30000,20,BE_BE
ref,input_reg01,30000,uint16,rw
ref,input_reg02,30001,uint16,rw
ref,input_reg03,30002,uint16,rw
ref,input_reg04,30003,uint16,rw
ref,input_reg05,30004,int16,rw
ref,input_reg06,30005,int16,rw
ref,input_reg07,30006,int16,rw
ref,input_reg08,30007,int16,rw
ref,input_reg09,30008,uint32,rw
ref,input_reg10,30010,uint32,rw
ref,input_reg11,30012,int32,rw
ref,input_reg12,30014,int32,rw
ref,input_reg13,30016,float32,rw
ref,input_reg14,30018,float32,rw
poll,holding_register,40000,20,BE_BE
ref,holding_reg01,40000,uint16,rw
ref,holding_reg02,40001,uint16,rw
ref,holding_reg03,40002,uint16,rw
ref,holding_reg04,40003,uint16,rw
ref,holding_reg05,40004,int16,rw
ref,holding_reg06,40005,int16,rw
ref,holding_reg07,40006,int16,rw
ref,holding_reg08,40007,int16,rw
ref,holding_reg09,40008,uint32,rw
ref,holding_reg10,40010,uint32,rw
ref,holding_reg11,40012,int32,rw
ref,holding_reg12,40014,int32,rw
ref,holding_reg13,40016,float32,rw
ref,holding_reg14,40018,float32,rw
Quick Start
A docker image has been provided for user to directly run the program,
docker run -p 5020:5020 helloysd/modsim:latest
The above one-line command will create a virtual Modbus TCP device running at localhost:5020.
To verify it, you can test by modpoll tool with the following command,
modpoll \
--tcp localhost \
--tcp-port 5020 \
--config https://raw.githubusercontent.com/gavinying/modpoll/master/examples/modsim.csv
Note: add
sudobeforedocker runcommand if you want to use the Modbus TCP standard port502.
Metadata
Release files for modbus-tcp-simulator 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modbus_tcp_simulator-0.5.0.tar.gz | 6.4 kB | Without provenance | Details for modbus_tcp_simulator-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modbus_tcp_simulator-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for modbus_tcp_simulator-0.5.0-py3-none-any.whl |
Total release size: 13.9 kB
Release files / modbus_tcp_simulator-0.5.0.tar.gz
| Download URL | modbus_tcp_simulator-0.5.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6e7e3bc6b65e119c40f60a0ea11eacc242781190438cf649cc62a46cdde9a4f
|
|
BLAKE2b-256 checksum How to use checksums |
8267c5a378ebfd1cedb9e1ab96c45a98ff800c5ccdaef85f1e87c8c0a55fc2ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1023-azure
|
Release files / modbus_tcp_simulator-0.5.0-py3-none-any.whl
| Download URL | modbus_tcp_simulator-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf4e7cdd7ae680f25b4ccb977a729aadf2a7c7df96db1e041457e39d5af57293
|
|
BLAKE2b-256 checksum How to use checksums |
0fbb29a22be68bd313a2da0c775ce7b9a6a8f8bf213d38e90e41ec32690a4b5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1023-azure
|
Security for modbus-tcp-simulator 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.