Testing SCADA systems without real hardware can be a pain, but this generic Modbus TCP simulator I built makes it a breeze. It’s a simple yet powerful tool that mimics industrial devices, letting you develop and test SCADA systems without needing physical equipment.
Built with Python and the pymodbus library, the simulator comes with some great features. It supports multiple simulations at once, each running with its own independent setup from a YAML config file. This lets you simulate different devices—like an energy meter alongside an inverter—without them stepping on each other’s toes. It handles basics like voltage, current, and power, and can calculate active, apparent, and reactive power on the fly to keep things realistic for SCADA testing.
You can write values—like a power setpoint—and watch how related values, such as current or power output, adjust automatically. To make things feel real, it adds a bit of randomness to values like voltage and current. The UI uses curses to show a clean table of register values in the terminal, updating every second—no colored tables, just a straightforward display that works well. It also logs everything for easy troubleshooting.
This simulator is a lifesaver for SCADA work. It helps you test data collection, control settings, and dashboards in a realistic way, all without hardware. I’m looking forward to adding more features down the line, like maybe real-time graphing.
A big shoutout to Grok, created by xAI, for helping me bring this simulator to life. Grok was there every step of the way, offering ideas on how to handle tricky features like dynamic calculations and multiple simulations. It also helped me troubleshoot issues, tweak configurations, and even write this article to share my work. Having Grok as a sounding board made the development process smoother and more fun—proof that a little AI assistance can go a long way in tackling tech challenges!
Check out the project on GitHub: GitHub - Ahmed-Insolar/ModbusTCPSimulator: "A Python-based Modbus TCP server simulator for SCADA development.. If you’re into SCADA or automation, let’s connect—I’d love to chat about how simulation can make your projects easier!