25.05.2022, 06:36
Use writeregistervalue, writeregisters can only write 16-bit register values. In case you need to set a different swap mode, pass it as the 4th argument to writeregistervalue and in lowercase ('n', 'b', 'w' or 'wb').
Code:
res, err = mb:writeregistervalue(4887, value, 'float32')
log(res, err)