12.02.2020, 15:00
(12.02.2020, 14:28)Daniel. Wrote: Just create new object. If you make 4byte bus data_type then LM object must have the same.
I did a lot of modbus integration and scaling factor was never dynamic, this wouldn't make sense at all.
Initially I misunderstood, but I think I got it right this time. Unfortunately I still only get the value of the first register.
This is the profile as it is at the moment:
Code:
{
"manufacturer": "SolarEdge",
"description": "SE6000 inverter",
"mapping": [
{ "name": "I_AC_VoltageAN", "bus_datatype": "uint16", "type": "register", "address": 40079, "value_multiplier": 0.1},
{ "name": "I_AC_VoltageSF", "bus_datatype": "int16", "type": "register", "address": 40082},
{ "name": "I_AC_Power", "bus_datatype": "int16", "type": "register", "address": 40083},
{ "name": "I_AC_Power_SF", "bus_datatype": "int16", "type": "register", "address": 40084},
{ "name": "I_AC_Energy_WH", "bus_datatype": "float32", "data_type": "uint32", "type": "register", "address": 40093},
{ "name": "I_AC_Energy_WH_SF", "bus_datatype": "int16", "type": "register", "address": 40095}
]
}
The object's datatype is 4 byte floating point and I still only get the value of the first register.
As to the scaling factor: there always has to be a first time: I can see the scaling factor changing whenever the value of the data register reaches a certain value. The SF object switches between 32767 and 0...