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.

Wiser for KNX and modbus problem
#16
Code:
require('luamodbus')
mb = luamodbus.rtu()

mb:open('/dev/RS485-1', 9600, 'N', 8, 1, 'H')
mb:connect()

buffer = {}

mb:setdebug(function(msg)
  buffer[ #buffer + 1 ] = msg
end)

mb:setslave(8)

res = { mb:readregisters(3109, 2) }
log(res)

mb:close()

log(table.concat(buffer))

I disabled RTU in mapper and then tried it, it suppose to log something about frequency (tried with reading test) unfortunately it keeps logging that

* string: [08][03][0C][25][00][02][D6][09]
ERROR Bad file descriptor


i tried reading for value, specify swap, specify datatype, try different registers, change to 8N2...

What I'm doing wrong?
Reply


Messages In This Thread
RE: Wiser for KNX and modbus problem - by Kilogica - 15.02.2021, 16:41

Forum Jump: