... or as a workaround define two objects and split the registers...
Modbus slave(1, 0, TXEN);
Modbus slave2(1, 0, TXEN);you know what I try to say?
That doesn't help. The size of the array supplied is not the problem but the buffer size of the result message.