18.12.2020, 12:59
Try this:
Code:
-- init modbus connection
...
-- system control key
key = 35700
key_inv = bit.bxor(key, 0xFFFF)
mb:writeregisters(8, key, key_inv)