My previous post was based on using Modbus TCP and I just noticed that this request was for an RTU slave driver.
To do this with the ModRSsim2 program you would have to use its Modbus RS-232 functionality.
The you could use com0com and hub4com from
https://sourceforge.net/projects/com0com/.
Hub4com would be set up to have three virtual ports and the Windows hardware port is assumed to be COM1 here.
Now you would have to route from the COM1 port into the shared ModRSsim2 port(allows COM1 requests to get to ModRSsim2).
Next route from the AdvancedHMI to the ModRSsim2 port(allows AHMI requests to get to ModRSsim2).
Finally route from the ModRSsim2 port to both the AdvancedHMI and COM1 port(allows responses from ModRSsim2 to go to COM1 and AHMI).
I am not sure how "hub4com" will handle requests if they come rapidly because the message may get intermixed.
Probably a better option would be to use an Modbus RTU to/from Modbus TCP gateway.
There is one here
https://sourceforge.net/projects/mbus/ but it is for Linux but might be portable to Windows.
I have not tested any of these suggestions but maybe they will give someone the idea of how this might be done.
Doug Lyons