pymodbus-dev/pymodbus

Multiple instance of Modbus server with different sockets

Closed this issue · 2 comments

Is there any way to run multiple instance of Modbus Server[TCP] and a single Modbus client[TCP] for simulation?
Do we need create Thread pool of Modbus Server[TCP]?

Simply make a number of ModbusTcpServer objects each with a different port.

How you want to manage the object is up to the you, but a thread pool is probably a bad idea, please remember ModbusTcpServer uses asyncio, so asyncio,create_task is a lot more efficient.

Not really a problem.