LogicMachine Forum
Belimo UK24MOD - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Belimo UK24MOD (/showthread.php?tid=2993)



Belimo UK24MOD - benthoma - 18.11.2020

Hi, have someone integrated uk24mod on LM5 ?

What does the script look like to extract the different values of knx?

I need to itegratedĀ 3 on each LM5.

https://www.belimo.eu/CH/EN/Product/FireSmoke/ProductDetail.cfm?MatNr=UK24MOD&CatNr=&TopCatNr=


RE: Belimo UK24MOD - admin - 18.11.2020

You don't need a script but a modbus profile. Which registers do you want to access apart from setpoint?


RE: Belimo UK24MOD - Andey - 18.11.2020

Here is a sampleĀ code after quick view on reference manual. Just to help you find a right way.
Code:
require('luamodbus') mb1 = luamodbus.rtu() -- RS-485 port name and number. here is RS485, but it can be RS485-1, RS485-2, ttyUSB0 -- connection parameters must to accord device settings mb1:open('/dev/RS485', 38400, 'E', 8, 1, 'H') mb1:connect() -- select modbus slave ID for read/write operations (55 here) mb1:setslave(55) --[[ read values we need to read hold register (command #3) modbus we can to assess: #1 - coil #2 - discrete input #3 - hold register #4 - input register ]]-- -- read all registers related to first MP i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19 = mb1:readregisters(0, 20) -- do something with this information -- set setpoint to 50 mb1:writeregisters(0, 50) mb1:close()

And my question to LM gurus: what will happens if there are device listed in 'ModBus' table located on the same RS485 bus. I assume that connection parameters are the same and there is no address conflict.


RE: Belimo UK24MOD - admin - 18.11.2020

You should use a profile. If you want to use scripts and mapper on the same port then you need to use modbus proxy. See this for more info: https://forum.logicmachine.net/showthread.php?tid=387&pid=1953#pid1953


RE: Belimo UK24MOD - benthoma - 18.11.2020

(18.11.2020, 12:24)admin Wrote: You don't need a script but a modbus profile. Which registers do you want to access apart from setpoint?


OK, I want access all. Is there a easy way to make modbus profile?


RE: Belimo UK24MOD - Daniel - 18.11.2020

Here is profile documentation: https://openrb.com/docs/modbus.htm
Here are different examples: https://forum.logicmachine.net/showthread.php?tid=839
It is good practice to use RTU read test to check all parameters before creating the profile.