Modbus TCP slave simulators compared: test your master without hardware
What is a slave simulator for?
A Modbus slave simulator plays the device your master polls. You test a controller, a visualisation or a gateway without the PLC or instrument on your desk.
- Test the master: read and write holding registers, input registers, coils and discrete inputs.
- Reproduce faults: exception responses, timeouts, implausible values.
- Develop early: the master runs before the hardware arrives.
- Automate: scripts let values change over time, for example for regression tests.
Five tools compared
Every cell comes from the project's own page (sources below, retrieved on 1 December 2026). "n/a" means the page says nothing about it. That does not mean the feature is missing.
| Tool | Licence / price | Platform | TCP / RTU | Register types | Scripting / automation | Record / replay | Version |
|---|---|---|---|---|---|---|---|
| ModRSsim2 | GPLv3, free | Windows (32/64-bit) | TCP slave, RTU slave | n/a | "scriptable test environment" | n/a | last update 2024-12-10 |
| OpenModSim | MIT, free | Windows, macOS, several Linux distributions | TCP, RTU, TCP over TLS (slave) | coils, discrete inputs, holding, input (functions 0x01 to 0x06, 0x0F, 0x10, 0x16) | JavaScript scripts (from 1.2.0) | traffic log; replay: n/a | version 2.2.0 |
| diagslave | free to use and redistribute (licence text in the package) | Windows, Linux, ARM Linux | RTU, ASCII, TCP, UDP, RTU over TCP | n/a | n/a | n/a | version 3.6 |
| pymodbus (simulator) | BSD, free | Python 3.10 or newer; Windows, Linux, macOS | TCP, TLS, UDP, serial; several frame formats | coils and registers; the overview page lists no full set of types | Python scripting; web interface of the simulator | watch traffic; replay: n/a | version 3.16.2 |
| ModbusPal | LGPLv2, free | Windows, Mac, Linux, BSD | TCP; serial via RXTX; RTU not named explicitly | n/a | Python scripts | n/a | last update 2020-11-15, project status "Abandoned" |
Notes on the table
- ModRSsim2: the SourceForge page lists Windows and the Visual C++ 2010 runtime as requirements.
- OpenModSim: scripts run once or periodically; only the "Storage" values persist between runs.
- diagslave: a command-line program from the modbusdriver.com project page; the page names version 3.6 without a date.
- pymodbus: the simulator is part of the library, can configure devices, watch traffic online and simulate broken responses.
- ModbusPal: older software; whether it fits your setup depends on your requirements.
How to choose
- A quick register window on Windows: ModRSsim2 or OpenModSim.
- Command line, also on Linux or ARM: diagslave.
- Built into your own tests: pymodbus, since everything is Python.
- Scripts inside the tool: OpenModSim (JavaScript), ModRSsim2, ModbusPal (Python).
What is missing
The pages we checked say nothing about recording the master's accesses and replaying them as a slave. OpenModSim shows a traffic log and pymodbus lets you watch traffic; none of the five pages states that a recording can later be replayed as a slave. If you want to reproduce a fault in the master, you currently write your own scripts.
Planned: a tool for this
Under the name cosMatx® we plan a Windows tool that simulates a Modbus TCP slave with a register list, records your master's accesses and replays the recording as a slave. It is not built yet; planned from 79 € one-time, an assumption and not an offer. You can pre-register without obligation: Modbus TCP simulator, planned.
Sources (retrieved on 1 December 2026)
- ModRSsim2 (project page on SourceForge)
- OpenModSim (repository on GitHub)
- diagslave (page on modbusdriver.com)
- pymodbus (repository on GitHub)
- ModbusPal (project page on SourceForge)
Provided by David Venditti, cosMatx®, Munich (imprint).