pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.29k stars 938 forks source link

contrib example: TCP drainage simulator with two devices #1936

Closed serpent213 closed 9 months ago

serpent213 commented 9 months ago

Simulates two Modbus TCP slave servers:

Digital IO (DIO) with 8 discrete inputs and 8 coils. The first two coils each control a simulated pump. Inputs are not used.

Water level meter (WLM) returning the current water level in the input register. It increases chronologically and decreases rapidly when one or two pumps are active.

Feels pretty straight forward, but I was not able to find a good example like this.