An ExoEdge source for interfacing with Modbus devices.
Project description
Description
This project is a Modbus source for Exosite’s ExoSense which uses ExoEdge.
Install
From Source
pip install -r requirements.txt
python setup.py install
From PyPi
The wheel for this hasn’t been published yet.
pip install exoedge_modbus
ExoEdge Configuration
In order to start using this Modbus source, start the edged daemon with your desired parameters. For more information on edged, visit ExoEdge on PyPi.
Example
$ cat modbus-test1.ini
[device]
murano_host = mqtt://f5330e5s8cho0000.m2.exosite.io/
murano_id = modbus-test1
$ edged -i modbus-test1.ini go
ExoSense Configuration
Below is an example config_io settings that illustrates how Modbus TCP data can be sent to ExoSense via ExoEdge.
{
"channels": {
"001": {
"display_name": "Input Register 1",
"description": "Input Register 1.",
"channel_name": "001",
"properties": {
"data_unit": "NUMBER",
},
"protocol_config": {
"report_on_change": false,
"report_rate": 2000,
"application": "Modbus_TCP",
"app_specific_config": {
"byte_endianness": "big",
"register_range": "INPUT_REGISTER",
"register_offset": 0,
"register_count": 1,
"register_endianness": "big",
"bitmask": "0xFFFFFFFF",
"slave_id": 1,
"evaluation_mode": "unsigned"
},
"sample_rate": 2000,
"input_raw": {},
"offset": 0,
"interface": "/dev/ttyM0",
"down_sample": "ACT"
}
}
}
}
Below is the config_applications configuration needed for the config_io above:
{
"applications": {
"Modbus_RTU": {
"application_display_name": "Modbus RTU",
"interfaces": [
{
"interface": "/dev/ttyM0",
"baud_rate": 19200,
"stop_bits": 1,
"parity": "none"
}
]
}
}
}
Below is a config_io example for Modbus_TCP:
{
"channels": {
"1": {
"display_name": "Input Register 1",
"description": "One-second intervals of input register 1.",
"properties": {
"max": null,
"precision": null,
"data_type": "BINARY",
"min": null
},
"protocol_config": {
"application": "Modbus_TCP",
"report_on_change": false,
"report_rate": 1000,
"sample_rate": 1000,
"down_sample": "ACT",
"app_specific_config": {
"ip_address": "192.168.11.139",
"port": 5020,
"register_range": "INPUT_REGISTER",
"register_offset": 0,
"register_count": 1,
"byte_endianness": "big",
"register_endianness": "big",
"evaluation_mode": "string-ascii",
"bitmask": "0x0000"
}
}
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for exoedge_modbus-19.3.7-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cdf2a27c0efcd24601670b104a7c44d8d50878fe739c1eef6f62d76db54ed2a |
|
MD5 | cff29455c3adff470ebc9fd9a8044795 |
|
BLAKE2b-256 | 0741d180a37582748eb2df8cb0661de159281b5e0ebe090ade2d931a22663def |