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.

Belimo UK24MOD
#1
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/Fire...=&TopCatNr=

Attached Files
.pdf   UK24MOD_datasheet_en-gb.pdf (Size: 2.19 MB / Downloads: 14)
Reply
#2
You don't need a script but a modbus profile. Which registers do you want to access apart from setpoint?
Reply
#3
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.
Reply
#4
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/showthrea...53#pid1953
Reply
#5
(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?
Reply
#6
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.
------------------------------
Ctrl+F5
Reply


Forum Jump: