28.02.2020, 13:23
(This post was last modified: 28.02.2020, 13:32 by fleeceable.)
Hi!
I'm working on with special modbus script.
I have Corrigo ventilation controller and communicating over ModbusRTU. When I read register with profile then it is converted automatically thanks to this line:
{ "name": "Outside temp", "bus_datatype": "float16", "datatype": "int16", "type": "inputregister", "address": 0, "value_multiplier": 0.1, "units": "C" },
So this works.
Now I'm going to use scripting. How can I convert integer to float via script?
For example, received value is 65523, it should be -1.x degree.
I'm working on with special modbus script.
I have Corrigo ventilation controller and communicating over ModbusRTU. When I read register with profile then it is converted automatically thanks to this line:
{ "name": "Outside temp", "bus_datatype": "float16", "datatype": "int16", "type": "inputregister", "address": 0, "value_multiplier": 0.1, "units": "C" },
So this works.
Now I'm going to use scripting. How can I convert integer to float via script?
For example, received value is 65523, it should be -1.x degree.