- number of incoming messages;
- number of outcoming messages;
- number of wrong messages.
The code is published here. It still needs to be converted to the Arduino library format. The Slave seems to be almost complete, but not the Master, which still lacks functions 1, 2 and 15. I have also seen that this needs some extra work, particularly when having more than a Modbus port on the same board.
I have tested this code using several tools: