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 limits
#2
Hi,

First of all a Wiser for KNX can host a maximum of 10 devices by profile, this is a software restriction that is build in the Wiser for KNX firmware, if you need more profiles then you need to have a spaceLYnk that has no software limit. You should be able to read the 30 devices by profile with a spaceLYnk.

As i understand it correctly you now have several devices by profile and another set by script, do you read them over the same gateway (ICF module)?

If yes then i think you have a port (502) conflict when the profile and the script are reading the same device at the same moment. If that is the case i would advice you to read them all in sequence from script and to remove the other devices from the Modbus template engine.

To simplify your script (and have some extra routine checks) you can do this:
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.90.105', 502)
res, err = mb:connect()
if res then
  mb:setslave(1)
  value = mb:readregistervalue(32095,"uint64")
  if value then
     value = value * 0.001
     grp.update("50/3/0", value)
  end
  for i = 2, 6, 1 do
    os.sleep(0.2)
    mb:setslave(i)
    value = mb:readregistervalue(1999,"int32")            
    if value then   
       grp.update("50/3/" .. (i-1), value)
    end
  end
else
  log('connect failed', err)
end
mb:close()
BR,

Erwin
Reply


Messages In This Thread
Modbus limits - by alb-smith - 07.02.2020, 21:09
RE: Modbus limits - by Erwin van der Zwart - 07.02.2020, 22:08
RE: Modbus limits - by alb-smith - 09.02.2020, 18:17
RE: Modbus limits - by FatMax - 10.02.2020, 07:43

Forum Jump: