09.05.2018, 08:12
(07.05.2018, 11:30)admin Wrote: Make sure that the client connections are closed properly. There's a limit on active connections to modbus TCP slave.
Mapping will always start from 0. You can specify mapping like this (+1 is need because Lua table start from 1, modbus addressing starts from 0):
Code:registers = {}
registers[ 100 + 1 ] = '1/1/1' -- mb register 100
registers[ 101 + 1 ] = '1/1/2' -- mb register 101
Since mapping table will not be a continuous array, you will have to set mapping like this:
Code:mb:setmapping(table.maxn(coils), 0, table.maxn(registers), 0)
With this script it is possible manageĀ lux value (DPT 9.004) and counter value (DPT 12.001)? How I can do it?