TCP server virtual serial port ( Modebus RTU )
Different virtual serial port methods result in different virtual slave device connection methods . The following is an example of virtual serial port 1 ( COM1 ) using the TCP server mode :
No changes are needed to the MCGS configuration. Only the emulated slave needs to be configured. Since Modbus Slave does not support communication between TCP clients and Modbus RTU protocol , the virtual serial port tool needs to be automatically connected to the virtual serial port 10 ( COM10 ) in client mode .
By utilizing the self-connection between the TCP server and the client, I can use the serial port and the RTU protocol for data transmission and reception throughout the entire process ;
Change the slave connection method to " Serial Port " and select serial port 10. The baud rate parameters of the two virtual serial ports can be different. The serial ports forward data to each other via TCP protocol.
The simulation screen controls the fourth output of the simulation device;
This virtual serial port tool supports data monitoring. When monitoring is enabled, the following data transmission and reception status is recorded:
The above functions can also be achieved using a virtual serial port tool in UDP mode. The method is basically the same and will not be described in detail here.