MODBUS
Setup your Modbus device with Gateway
Connect your Modbus device to the Gateway as shown below.

Enter the correct configuration details to make sure the Gateway is able to communicate to a Modbus device successfully and click on Update.

If mode 3 (TCPIP) is selected, connect Gateway to the Ethernet switch/router and then connect the Modbus Slave also to the Ethernet switch/router in the same network.
1
Mode
0
0 = Disabled 1 = RTU 2 = ASCII 3 = TCPIP Enter the required mode if you wish to enable Modbus.
2
Scan Interval
5000
It is the time period to poll data from Modbus slaves.
3
Scan Timeout
1000
It is the timeout interval for one query.
4
Offset
0
5
Baud Rate
9600
4800 / 9600 / 115200 Enter the baud rate same as your Modbus device.
6
Data Bits
8
Do not change data bit value.
7
Parity
0
0 = DISABLE 1 = EVEN 2 = ODD Enter value of parity same as your Modbus device.
8
Stop Bits
1
1 / 1_5 / 2 Enter stop bits same as your Modbus device.
9
IP Address
[192.168.23.111]
IP address assigned to slave for Modbus TCPIP mode.
10
Port
502
Do not change default port.
11
Slave ID
[0, 1]
Enter multiple slave ids in array format required only in TCPIP mode if you wish to read data from multiple slaves.
You can see the Modbus response topic for the device. Subscribe to this topic to receive data from Gateway.

Enter one or more Modbus queries in the specified format.
E.g [[1,3,0,8,12,0],[1,3,12,10,12,1],[2,3,0,5,0,2]]
Make sure you are entering queries in the correct format.
To know more about how to create a Modbus query please refer to Modbus Query and Modbus Datatypes & Function Codes.

Click on Preview to see a JSON preview of the Modbus data.

Click on Update to update the queries on the Gateway.
Click on Erase to erase all queries from the Gateway.
Enter Modbus address mapping.
E.g {"voltage": ["1D4", "2D7"], "current": ["1D17", "3D124"]}
Make sure you are entering address mapping in the correct format.
To know more about how to create a Modbus Address Mapping works please refer to Modbus Address Mapping.

Click on Update to update the addresses as per the given mapping.
Click on Erase to erase mapped addresses from the Gateway.
Enter Custom Publish details if you want to send data in sets(max 3 JSON objects in a set for a single Modbus slave is configurable).

Mode
0
0 = Disabled 1 = Enabled If 0 is selected data will be published as default.
Interval
1
It is the time period by which data should be published.
Data Points
3
No. of data points that should be published together in the given interval.
Click on Update to publish data as per the given pattern.
Please refer to the Activity section to verify that the Modbus configuration has been updated successfully.
Last updated