18.02.2021, 08:44
Try reading values in a loop and see if anything appears in Logs:
Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485', 9600, 'N', 8, 1, 'H')
mb:connect()
buffer = {}
mb:setdebug(function(msg)
buffer[ #buffer + 1 ] = msg
end)
mb:setslave(8)
for i = 1, 1000 do
buffer = {}
res = mb:readregisters(6500, 2)
if not res then
log(table.concat(buffer))
end
end
mb:close()