This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

kWh modbus to KNX convertion?
#1
Hello everyone.

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"
    },
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:
Code:
    {
      "address": 52,
      "read_count":20,
      "read_offset":2,
      "datatype": "float32",
      "bus_datatype": "14",
      "name": "Total import kWh",
      "value_multiplier": 0.1,
      "type": "register"
    },
The powermeter I use is a Carlo Gavazzi EM340.
Link to modbus manual: https://gavazzi.se/app/uploads/2020/11/e...340_cp.pdf
Reply


Messages In This Thread
kWh modbus to KNX convertion? - by ClausP - 25.04.2023, 07:37
RE: kWh modbus to KNX convertion? - by admin - 25.04.2023, 08:05
RE: kWh modbus to KNX convertion? - by ClausP - 25.04.2023, 08:13
RE: kWh modbus to KNX convertion? - by admin - 25.04.2023, 08:13
RE: kWh modbus to KNX convertion? - by ClausP - 25.04.2023, 08:20
RE: kWh modbus to KNX convertion? - by admin - 25.04.2023, 08:22

Forum Jump: