LogicMachine Forum
Modbus data types breaking change in latest FW? - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Modbus data types breaking change in latest FW? (/showthread.php?tid=6585)



Modbus data types breaking change in latest FW? - myg - 31.10.2026

After I installed latest firmware (had previous one before), I have a strong suspicion that something happened with modbus profile calculations since reading resolution dropped significantly. Here's screenshot of the readings where you can see a sharp drop in precision:
   

Below is my profile.
From the sniffer data (one example), i receive 0x2D5 which should decode to 725*0.0625 = 45.31C, but data written to bus is 46C. 
I had suspicion that this happens due to wrong datatype applied during conversion. Since field called "modbus register datatype", i used int16 with 0.0625 multiplier. This worked previously. I've tried to change datatype to float16, but result was unexpected - all calculated values became /100, so i had to update multiplier to 6.25 to compensate for that. 

I'm not seeing this behavior mentioned in documentation , nor in the changelog of the firmware.

Is this a bug, or should i update all profiles? is this a correct way to "fix" calculations?

Code:
{   "manufacturer": "WirenBoard",   "description": "WB-M1W2 Temperature",   "mapping": [     {       "bus_address": "32/4/1",       "value_delta": 0.1,       "datatype": "int16",       "bus_datatype": "temperature",       "type": "inputregister",       "address": 3584,       "value_multiplier": 0.0625,       "bus_write": false,       "name": "Temperature 1:1"     },     {       "bus_address": "32/4/2",       "value_delta": 0.1,       "datatype": "int16",       "bus_datatype": "temperature",       "type": "inputregister",       "address": 3585,       "value_multiplier": 0.0625,       "bus_write": false,       "name": "Temperature 1:2"     },     {       "bus_address": "32/4/3",       "value_delta": 0.1,       "datatype": "int16",       "bus_datatype": "temperature",       "type": "inputregister",       "address": 3624,       "value_multiplier": 0.0625,       "bus_write": false,       "name": "Temperature 2:1"     },     {       "bus_address": "32/4/4",       "value_delta": 0.1,       "datatype": "int16",       "bus_datatype": "temperature",       "type": "inputregister",       "address": 3625,       "value_multiplier": 0.0625,       "bus_write": false,       "name": "Temperature 2:2"     }   ] }

after further testing i think i found more interesting details:
all problems are happening with bus_datatype=temperature, which is a subset of float16 (so i assumed it will have identical behavior). Also it causes rounding errors which returns slightly incorrect values.

if i use bus_datatype=float16 with datatype=int16 and 0.0625 multiplier then everything seems correct.