18.05.2018, 08:10
Disable RTU port in mapper and use this script to show what LM sees during communication in Logs tab. Change port parameters, slave id and register address as needed.
Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485', 38400, 'E', 8, 1, 'H')
mb:connect()
buffer = {}
mb:setdebug(function(msg)
buffer[ #buffer + 1 ] = msg
end)
mb:setslave(10)
mb:readregisters(1)
mb:close()
log(table.concat(buffer))