Check Out This Handy Modbus TCP Simulator for SCADA Development 🌟

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!

When developing for Ignition, I prefer to use a Modbus TCP Server that runs directly inside Ignition. There are two variants available:

No external process required--even any necessary simulation code can be written in native Ignition jython.

1 Like

how does this compare to modbus slave?

What do you mean? Servers are slaves--they act on requests. Clients are masters--they issue requests.

the modbus slave is a specific modbus tcp simulator, by witte software -- i'm asking how it compares featurewise to this one

No clue. "modbus slave" all lower case is extreme generic, and applies to all modbus devices that respond to requests. So, a pretty ridiculous name for a piece of software, if that is its complete name.

{ And I've never heard of that software. Proper English matters for written communications. If a software title, capitalization as a proper noun would have been appropriate. }

apologies for not capitalizing, but that is actually its complete name -- Modbus Slave Simulator
it's also the first google result for googling the words 'modbus slave' even with no cookies, interestingly enough

Differences to mine:

  • Supports ASCII and UDP variants.
  • Support diagnostic functions 0x08, 0x0e, & 0x2b.
  • Does not support file register functions 0x20 and 0x21.
  • Supports one-based addressing (in addition to zero-based).
  • External (Windows OLE) software required for dynamics.
1 Like

Thanks!
(I've been using it for a while and have gotten....considerably more annoyed with having to use OLE for dynamic scripting over time. Knowing there are good alternatives is helpful!)

Many people use my server drivers in trial mode.....

1 Like

Modbus Slave and Modbus Poll are both fantastic - if you're on Windows they are basically the de-facto Modbus testing tools.

It would like a lot to dethrone them from the top of my pinned applications list.

it's like having modbus slave's but you can create relations between registers. check the encloused energy meter and the PV inverter config files. I've developed it specifically to mimic a PV plant.

1 Like

I agree. i use both. and i'm used to the interface. but got tired of using excel with OLE to make some realistic simulations. that's why i made this app. the intention was to make a very specific simulator for energy meters and PV inverter. but Ai helped a lot in making it much more generic by utilizing an external config file in Yaml format. so technically you can make it mimic any kind of equipment. Give it a try. you will like it. and maybe you will customize it to your needs.

1 Like

I doubt it will dethrone them because it's not really the goal, but I've been half heartedly working on a Modbus CLI tool with client and server modes.

kevin@Kevins-MacBook-Pro ~/D/k/modbus-cli> ./modbus server
Modbus server started on 0.0.0.0:502

kevin@Kevins-MacBook-Pro ~/D/k/modbus-cli> ./modbus client localhost rhr 0 10
Hostname: localhost:502, Unit ID: 1
-> ReadHoldingRegistersRequest[address=0, quantity=10]
<- ReadHoldingRegistersResponse[registers=0000000000000000000000000000000000000000]
Offset (hex)    Bytes (hex)
-------------------------
00000000        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00000010        00 00 00 00 
kevin@Kevins-MacBook-Pro ~/D/k/modbus-cli> ./modbus client localhost wsr 1 32
Hostname: localhost:502, Unit ID: 1
-> WriteSingleRegisterRequest[address=1, value=32]
<- WriteSingleRegisterResponse[address=1, value=32]
kevin@Kevins-MacBook-Pro ~/D/k/modbus-cli> ./modbus client localhost rhr 0 5
Hostname: localhost:502, Unit ID: 1
-> ReadHoldingRegistersRequest[address=0, quantity=5]
<- ReadHoldingRegistersResponse[registers=00000020000000000000]
Offset (hex)    Bytes (hex)
-------------------------
00000000        00 00 00 20 00 00 00 00 00 00 

2 Likes