📕
IoT Gateway User Manual
  • Prologue
  • ⭐Features
  • 4GW series IoT Gateway
  • Getting Started
  • LED Indications
  • Gateway Onboarding
    • Network
    • Device Registration
  • Gateway Configuration
    • Overview
    • Activity
    • Settings
      • Network
      • Data Routes
      • Input Configuration
      • MODBUS
      • System
    • OTA Updates
    • Output Connection
    • Modbus Query
    • Modbus Address Mapping
    • Modbus Datatypes & Function Codes
Powered by GitBook
On this page
  1. Gateway Configuration
  2. Settings

MODBUS

Setup your Modbus device with Gateway

PreviousInput ConfigurationNextSystem

Last updated 1 year ago

  1. Connect your Modbus device to the Gateway as shown below.

  1. 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.

No.
Field
Default Value
Description

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.

  1. You can see the Modbus response topic for the device. Subscribe to this topic to receive data from Gateway.

  1. 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.

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

  1. Click on Update to update the queries on the Gateway.

  2. Click on Erase to erase all queries from the Gateway.

  3. 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.

  1. Click on Update to update the addresses as per the given mapping.

  2. Click on Erase to erase mapped addresses from the Gateway.

  3. 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).

No.
Field
Default Value
Description
1

Mode

0

0 = Disabled 1 = Enabled If 0 is selected data will be published as default.

2

Interval

1

It is the time period by which data should be published.

3

Data Points

3

No. of data points that should be published together in the given interval.

  1. 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.

4GW-E (L) & 4GW-D (R)