How to read Modbus data PLC act as a master
It is possible to read Modbus data from Modbus RTU slaves by utilising Modbus Serial Master functionality on RUT956. The information about this functionality can be found here.
The idea is to configure the Modbus Serial Master instance in Services → Modbus to query Modbus information from the PLC (Assuming the PLC is a Modbus RTU Slave in this scenario). For this, you need to select RS485 as the device on RUT956 and configure serial settings, such as Baud rate, Data bits, stop bits, etc. These settings need to match on both devices to ensure proper two-way communication.
If you do not see Modbus settings in Services → Modbus , make sure you have enabled advanced mode in the upper-right corner of the WebUI.
In Modbus Master, you will also need to configure the registers that you want to read. The list of available registers depends on your PLC.
Whenever you create and configure a request on the Modbus Master page, I would suggest using the 'test ’ button to check whether you are able to read data successfully. This way, you can ensure that the Modbus communication between RUT956 and PLC works.
It is important to note that RUT956, as well as other Teltonika Networks devices, use Modbus Register Numbers, while some other third-party devices may use Modbus Register Addresses. The difference between an address and a number in this context is that numbers start from 1, while addresses start from 0. Thus, if a specific value is stored in Modbus Register Address 101 on the Modbus Slave, then, to read this value from RUT956, you need to set Modbus Register Number to 102. You can try different values/settings to verify that everything works as you need it to.
The rest of the RUT956 configuration will depend on your specific needs. If you are looking to collect Modbus data for monitoring purposes, I would suggest using Data to Server feature. With data to server, you can configure RUT956 to collect modbus data (from the requests that you have configured in Modbus Master), and send it to a server/cloud over HTTP/MQTT/Kinesis. The data is send in JSON format. This would allow you to collect and monitor data from the PLC. Data to server information is available on our wiki page here.
Dear Sir above configuration for Slave device
I am talking for Modbus rs485 when plc is master then how to read its data.
In case the RUT956 needs to be a Modbus RTU slave from which you want to read data, you can configure RUT956 to be a Modbus Serial Slave. The configuration is straightforward, where you need to specify the RS485 as serial type and enter other serial settings, such as baud rate. You should then be able to read Modbus data from RUT956. You can find the available registers and other relevant information on our wiki page here and here.