19.05.2016, 13:17
You can try reading data from a resident script. Just make sure that you disable RTU in modbus mapper, otherwise it will not work. Also you need to change script parameters like port name, baud, slave id etc. Once script finishes you will see the result in Logs tab.
Code:
require('luamodbus')
mb = luamodbus.rtu()
-- open serial connection, set correct port name, baud and parity
mb:open('/dev/RS485', 38400, 'E', 8, 1, 'H')
mb:connect()
-- set slave ID
mb:setslave(10)
res, err = mb:readinputregisters(792)
-- close serial connection
mb:close()
log(res, err)