https://github.com/bossenti/modbus-usecase
Simple and small simulator of a modbus device
https://github.com/bossenti/modbus-usecase
iot modbus sensor
Last synced: about 1 year ago
JSON representation
Simple and small simulator of a modbus device
- Host: GitHub
- URL: https://github.com/bossenti/modbus-usecase
- Owner: bossenti
- Created: 2020-07-15T18:04:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T15:41:41.000Z (about 3 years ago)
- Last Synced: 2025-04-03T02:22:06.886Z (about 1 year ago)
- Topics: iot, modbus, sensor
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Modbus UseCase
This repository's code is used to simulate a pump.
Modbus is used to access the sensor data, query and transport it over the network.
We use this for a tutorial for Apache StreamPipes, see the corresponding [blog post]().
To provide this functionality we need two simple scripts:
- `modbus_device.py`: This script provides a Modbus device as a little server. It's based on the library `pymodbus` and uses one of their [code examples](https://pymodbus.readthedocs.io/en/latest/source/example/synchronous_server.html).
- `modbus_data_insert.py`: It's only function is to write values from the provided csv row-wise to the `HoldingRegister` of the Modbus device.
The data set we use here, is just a short record of pump of which we use the following sensor data:
- density
- fluid temperature
- mass flow
- sensor fault flags
- volume flow