25.04.2023, 07:37
Hello everyone.
I've been using this code to convert an int16 modbus to an float16 knx.
it has been working flawless until the total kwh counter reached 3276.7 kwh.
Then it stopped working.
I prosume that the problem is that i run out of data in the 16 bit signed integer.
Then I tried to change the datatype to int32 an the bus_datatype to 14 (4-byte floating point).
But still no succes.
Any sugestions on what to do to get the propper readout in KNX?
The last code I tried is copied from another modbus profile for a powermeter:
The powermeter I use is a Carlo Gavazzi EM340.
Link to modbus manual: https://gavazzi.se/app/uploads/2020/11/e...340_cp.pdf
I've been using this code to convert an int16 modbus to an float16 knx.
Code:
{
"address": 52,
"datatype": "int16",
"bus_datatype": "float16",
"name": "Total import kWh",
"value_multiplier": 0.1,
"type": "register"
},
Then it stopped working.
I prosume that the problem is that i run out of data in the 16 bit signed integer.
Then I tried to change the datatype to int32 an the bus_datatype to 14 (4-byte floating point).
But still no succes.
Any sugestions on what to do to get the propper readout in KNX?
The last code I tried is copied from another modbus profile for a powermeter:
Code:
{
"address": 52,
"read_count":20,
"read_offset":2,
"datatype": "float32",
"bus_datatype": "14",
"name": "Total import kWh",
"value_multiplier": 0.1,
"type": "register"
},
Link to modbus manual: https://gavazzi.se/app/uploads/2020/11/e...340_cp.pdf