Modbus Simulator v2
This project is the sequel of the already published Modbus Simulator.
Enhancements
While the previous project was already working, some enhancements were made:
- Replacement of the REST interface for sending commands and getting server status with an asynchronous interface (i.e. MQTT);
- Addition of basic hosting of Doxygen documentation of the Modbus Simulator;
- Development of a Modbus TCP client that shows the working operation of the system.
The system is composed by the same blocks, the only change in the HLA was the addition of the containerised Mosquitto broker.

Here below some detail regarding the design choices that were taken for designing and implementing said systems.

Modbus Simulator
The Modbus Simulator remained almost untouched, except for the replacement of the Flask app with a Paho MQTT Client, which enables the communication between the client and the Simulator.

Modbus Client
The client is an addition in respect to the previous version:
Frontend
The frontend was slightly changed, replacing the HTTP Ajax client with a Paho MQTT client. In the image here below can be seen the new structure of the frontend code.

In this section there are the graphical representation and the steps description of the main architectural flows.





Here below there is the video that shows the new working operation of the Modbus Simulator. In particular, it’s possible to appreciate:
- Static hosting of the Doxygen documentation;
- Modbus Simulation of three registers with different curves (ramp, sin, step) which are polled and plotted by the Modbus Client.