Modbus using multiple serial ports on the same Arduino?

Hi Gurus,
I completely appreciate that modbus using a single port can talk to multiple devices and am fine with that.
However I need to split my network onto 2 ports - so I have been trying to find a Modbus library that will allows a single arduino e.g. mega with more than one serial port, to be setup to service more than one modbus network.
Usually with basic serial comms I would roll multiples i.e. serial.begin, serial1.begin, serial2.begin etc however I haven't found any details or whether it is even possible to setup two masters/servers on one arduino and have been looking through all the standard libraries available via the arduino site with no luck so far? and have searched this forum. with no luck so far either...
I am completely happy with the modbus side of it but would be extremely appreciative if anyone knows or can point me in the direction of how to achieve and get more than one airborne on the same arduino please using any available library?
Thanks very much.

have a look at the examples of this library. it appears to do just that:

hope that helps...

Thanks very much - really appreciated - I'll have a look at that :slight_smile: