This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus profile problem
#1
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
Reply
#2
Hi,

Have you try adding this field in the profile?
Code:
"write_multiple": true,
BR,

Erwin
Reply
#3
Works great, thanks!

Best Regards!

P
Reply
#4
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
Reply
#5
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?
Reply


Forum Jump: