Skip to main content
Skip table of contents

Modbus TCP Working Modes

The SfAR-S-ETH module has two different working modes. The first is the Modbus TCP gate, in which the device converts the frames of Modbus TCP into Modbus RTU/ASCII and sends them to the RS485 network's devices.
The second mode is the Device Table function, in which the module reads the RS485 network's devices only using the earlier-defined requests and ignores the requests addressed to other devices in the Modbus TCP network. The communication with external modules is only possible through the internal registers of the module in the range of addresses from 1000 to 1099.

Modbus TCP Gateway Mode

The SfAR-S-ETH module in the TCP gate mode serves maximum up to four clients simultaneously. After connecting to the module in the proper port, the module waits for the frames, which are compatible with the Modbus TCP specification. In the first instance, after receiving any package on this port, the device checks its correctness. If the length of the package will be incorrect, the device will send an error with the Modbus code 0x03 – Illegal Data Value. If the request is correct and addressed to the SfAR-S-ETH module, the function from the request is executed. If it is not a Modbus function, the device will send the error with the code 0x04 – Server Device Failure.

After processing the request and preparing the response, the module sends it accordingly to the Modbus TCP protocol's specification.

If the request is not addressed to the SfAR-S-ETH module, and the TCP gate mode is set, the device converts the request into the Modbus RTU/ASCII and sends it to RS485 bus. The SfAR-S-ETH waits for the defined time for the response and blocks the access to the RS485 bus for other clients, to avoid the packages' conflict. If the module receives the response or the time is out, the bus is released, and, in the case of receiving the package on the RS485, it is checked in terms of compatibility with the RTU or ASCII mode. In case of a correct package, it is converted into the Modbus TCP and sent to the client. In case of an error, the code 0x04 (if the response was not received before the defined time) or the code 0x03 (if the package is incorrect) is sent.  If the module does not get the access to the RS485 network, the package is sent back with the error code 0x06 – Server Device Busy.

Device Table Mode

While working in the Device Table mode, the client connects with the device in the same way as in case of the gateway mode. One considerable difference is that the SfAR-S-ETH module ignores all requests, which are not addressed to it. The communication with external devices is only possible through the configuration of remote requests by the website and reading/saving from/to the internal registers of the SfAR-S-ETH module. Each request is automatically stored in the module's memory.

If the configuration of the request is correct, the device in this mode asks the modules online by saving the request and it saves the responses in the internal registers indicated by the user, in case of reading the data, or downloads the data from there registers, in case of their saving. In case of incorrectly configured request, or when there is no response from the device, an appropriate communicate is shown on the website in the Device Table tab, in the Status column.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.