Modbus Protocol is a messaging structure developed by Modicon. It is used to establish master-slave/client-server communication between devices. Modbus has a lot of protocol options. But the two used most are Modbus RTU (Remote Terminal Unit), serial (RS-232 or RS-485) protocol or Modbus (TCP/IP) Transmission Control Protocol and Internet Protocol.
MODBUS TCP/IP runs on an Ethernet physical layer, and Modbus RTU is a serial level protocol. Milesight UR router has Modbus RTU to Modbus TCP function that can read Modbus data from Modbus RTU device and publish it as Modbus TCP data to the server and vice versa. This article briefly describes how to request Modbus RTU device data from Modbus TCP client on Milesight routers.
-Milesight UR router/CPE
-Modbus Poll tool
-Modbus Slave tool
-Serial port to USB converter
Step1: Install Modbus Slave simulate as industrial device, Modbus Poll as SCADA or HMI. Connect router to PC via RS232/RS485 port.
Step2: Navigate to the Serial Port->Serial, enable Serial Port function, set the Serial Mode as DTU Mode and the DTU Protocol as Modbus.
- The local port is 502, you can change it according to your demand.
- Usually the router needs a public IP to allow Modbus TCP to connect to
Configure Modbus RTU Slave (server)
Step3: Run the Modbus Slave on your PC, navigate to Setup->Slave Definition to configure the slave definition;
Step4: Double click the blank on the table and set the value in Modbus Slave;
Step5: Navigate to Connection->connect, then set the connection as Serial Port and select the corresponding COM port, finally choose the RTU mode;
Configure Modbus TCP Master (client)
Step6: Run the Modbus Poll on your PC, navigate to Setup->Read/Write Definition, set the parameter according to Modbus Slave setting such as Slave ID, Function, Address, Quantity and etc.
Step7: Navigate to Connection->connect, then set the connection as Modbus TCP/IP and fill in the Router IP address and Server Port, finally click OK.
Step8: The value will be read automatically to the Modbus Poll.