Logic Machine Forum
Modbus scaling to float - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2)
+--- Thread: Modbus scaling to float (/showthread.php?tid=3753)



Modbus scaling to float - Kilogica - 15.12.2021

Hello,

I'm trying to scale a 0.1 m3/h register to m3
Code:
{
"manufacturer": "DabPumps",
"description": "Evoplus Small_test",
    "mapping":
    
    
        [        
        
        {    "name": "Flusso Stimato",
            "address": 220,
            "type": "register",
            "bus_datatype": "float16",
            "value_multiplier": 0.1,
            "writable": false,
            "units": " m³/h"
        }
        
        
    ]
}

It keeps giving me 0.00, if I remove value_multiplier it reads pretty much 7...how could it be?

I know that probably it's a simple thing but I can't see where I'm wrong

Thank you!


RE: Modbus scaling to float - Daniel - 15.12.2021

Add "datatype": "int16"


RE: Modbus scaling to float - Kilogica - 15.12.2021

False alarm, now it's reading good with the previous code.

I really don't know what the problem was, since yesterday it kept reading 0.00 until now.

Thank you for your help.