Skip to main content
Skip table of contents

Modbus Gateway

iSMA-B-MG-IP as a Modbus gateway

The device simultaneously supports up to 4 Modbus TCP clients. If the fifth device is to be  connected to the device, a TCP connection will be rejected. In order to secure the device before filling up the call list, a mechanism for monitoring each Modbus TCP connection was introduced. There is a parameter called Modbus TCP Connection Timeout (by default, 60 s); if there is no request from the Modbus TCP client during this time, the device will close the connection.

To read internal registers of the device, it needs to generate the correct Modbus TCP frame with address according to the setting of a DIP switch. If the address is different, the frame will be sent to the COM1 port.

If the device receives an incorrect Modbus TCP frame, it sends back a frame with an error code:

0x01 - if the function code in the query is not supported;

0x02 - if the address of the register is invalid;

0x03 - if the amount of data disagrees in the query.

If the query is correct, the device instantly generates answer with data or acknowledgment of receipt of data, depending on the query.

The iSMA-B-MG-IP has a built-in Modbus TCP/IP to Modbus RTU/ASCII gateway, which allows to connect Modbus meters or other Modbus devices using the RS485. In order to ensure proper operation of the Modbus gateway, please make sure that all parameters of RS485 (baud rate, stop bits, etc.) for all the devices connected to RS485 (gateway and Modbus meters/Modbus devices) are the same.

Operation of the gateway is based on checking the Modbus address in the Modbus TCP query. If the address is different from the set on the DIP switch, data frame from the query is converted to Modbus RTU/ASCII, and sent to the COM1 port. Then, the meter gateway waits for an answer from the device connected to the COM1. If the slave device does not respond within the estimated time defined by the RS485 Timeout (by default, 500 ms), an exception response will be given: error code 0x0B. If the slave device answers the correct frame, it is converted to Modbus TCP, and sent to the master device.

The meter gateway sends an error code 0x0B in case the valid frame is not received. Upon receipt of this error code, some systems do not repeat the query according to the settings. No retry may cause the point to immediately go to down mode. That is why the meter gateway has the ability to block the sending information about errors (Send Modbus Errors setting in the web page or iSMA Configurator). Then, in absence of any response, the system retries the request according to the settings.

JavaScript errors detected

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

If this problem persists, please contact our support.