aem-modbus-simulator logo

aem-modbus-simulator

Free

Open-source Python Modbus RTU/TCP slave simulator emulating an industrial DC voltage monitor (147 holding registers, 6 baudrates). Lets SCADA/PLC firmware engineers test Modbus integration in CI pipelines without physical hardware on the bench.

FreeFree tier
Type
Open Source

About aem-modbus-simulator

Open-source Python Modbus RTU/TCP slave simulator that emulates the full 147-holding-register map of the LRI AEM-60DC8 industrial DC voltage monitor. It simulates 8 independent DC voltage channels (0-60V, ±1% accuracy), an NTC temperature sensor with realistic drift, and supports function codes 03 (Read Holding) and 16 (Write Multiple). Configurable presets for telecom 48V, solar strings, and automotive 24V scenarios are included. Designed for SCADA/HMI/PLC integration testing, CI/CD pipelines, engineering training, and pre-deployment validation without requiring physical hardware.

Key Features

Emulates 8 independent DC voltage channels (0-60V, ±1% accuracy)
Simulates NTC temperature sensor with realistic drift
147 holding registers in 17 functional blocks
Supports six baudrates: 4800, 9600, 19200, 38400, 57600, 115200
Supports Modbus function codes 03 (Read Holding) and 16 (Write Multiple)
Returns Modbus Exception 02 on invalid address
Configurable presets for telecom 48V, solar strings, and automotive 24V
Runs as Modbus TCP server or RTU over USB-RS485
Customizable voltage channels via Python list editing

Pros & Cons

Pros
  • Open-source and free to use
  • Realistic emulation of a specific industrial device
  • Supports both TCP and RTU Modbus modes
  • Configurable presets for common deployment scenarios
  • Useful for CI pipelines and automated testing without hardware
Cons
  • Only models the LRI AEM-60DC8 register map, not generic Modbus devices
  • Requires Python and pymodbus/pyserial dependencies
  • Command-line only, no graphical interface

Best For

SCADA integration testing (Ignition, Elipse E3, AVEVA InTouch, WinCC, etc.)PLC program development without physical hardwareCI/CD pipelines for industrial automation projectsEngineering training and educational labsPre-deployment validation before site commissioning

FAQ

What Modbus function codes are supported?
Function code 03 (Read Holding Registers) and 16 (Write Multiple Registers). Returns Exception 02 for invalid addresses.
How do I run the simulator as a Modbus TCP server?
Use the command: python aem_60dc8_slave.py --tcp 0.0.0.0:5020 --slave-id 1
Can I customize the voltage channels for my scenario?
Yes, edit the CHANNELS list in aem_60dc8_slave.py or use presets provided in the examples/ directory for telecom, solar, or automotive setups.