Modbus profile problem - Printable Version +- Logic Machine 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 profile problem (/showthread.php?tid=1849) |
Modbus profile problem - permar - 20.01.2019 Hello! I have created a modbus profile for my slave and it works great to reed the registers, however the slave only supports the function code "writemultipleregisters". I have added the "writatble": true in the profile but I get Illegal function in the log. It works fine if I do it in a script with mb:writemultipleregisters(47041, 2). Are there any way to get the modbusprofile to use the function writemultipleregisters?? Best Regards! P RE: Modbus profile problem - Erwin van der Zwart - 20.01.2019 Hi, Have you try adding this field in the profile? Code: "write_multiple": true, Erwin RE: Modbus profile problem - permar - 21.01.2019 Works great, thanks! Best Regards! P RE: Modbus profile problem - permar - 25.01.2019 Now I have a new problem. I have the following in my profile: { "name": "Förskjutning värmekurva", "bus_datatype": "int8", "type": "register", "address": 47011 , "datatype": "int16", "value_multiplier": 1, "writable": true, "write_multiple": true, "units": " K" }, This works great as long as the value are positive, when the value is negative I allways get the value 127 on KNX side. Have tryed the word_swap funktion with all the alternatives without success. I think maby the wordswap is done after the conversion frpm int16 to int8 and therefore has no effect in this case...? I need to have a int8 on the KNX side beacause of the comunications object on the other KNX devices. Any suggestions? Best Regards! P RE: Modbus profile problem - admin - 25.01.2019 Only byte swap can affect single register value, word swap won't change anything. Can you try setting bus_datatype to int16 and assign a temporary object to see if negative values work correctly? |