E2C Trinity Modbus Protocol (Southbound) User Guide

E2C Trinity Modbus Protocol (Southbound) User Guide

Click to download this document.

Version History

Updated

Document Version

Description

2026-06-18

V1.0

Initial version

Gateways & Firmware Requirement

Software

E2C Factory

E2C Field

E2C Facility

Gateways supporting

EG3120; EG5120; EG5200

LG3120

LG5120

Firmware Requirement (RobustOS Pro Version)

EG3120 (≥ROS Pro:2.4.103); EG5120 (≥ROS Pro:2.4.105); EG5200 (≥ROS Pro:2.3.108)

LG3120

(=ROS Pro:2.4.111)

TBD

1. Manual Description

1.1 Manual Purpose

This manual guides technicians to quickly configure the Robustel edge computing gateway to collect data from Southbound Modbus devices (Modbus TCP or Modbus RTU). It also covers how to forward the collected data to Northbound systems using MQTT or an OPC UA.

1.2 Scope of Application

This manual is written for field implementation engineers and technicians. You do not need deep theoretical knowledge of the Modbus protocol. By following these step-by-step instructions, you can easily connect devices, read tags, and forward data.

2. Basic Concepts & Network Topology

2.1 Gateway Role in the Network

In the Modbus network, the Robustel Gateway acts as the data forwarding hub. Its job is to actively initiate requests, read data from the underlying Modbus devices (such as PLCs, VFDs, smart meters, or temperature controllers), and then translate this data into IIoT protocols (like MQTT/OPC UA) for Northbound systems.

2.2 Connection Topology

  • Modbus TCP: Devices are connected via standard Ethernet cables. The gateway and the Modbus devices are typically in the same local network subnet. If they are not in the same subnet (e.g., cross-network segment via a router), ensure network routing is properly configured and the port number (default 502) is not blocked by firewalls.

Figure 2-1 Modbus TCP connection topology

  • Modbus RTU: Devices are daisy-chained via an RS485 serial cable. You must connect the "A+" and "B-" wires correctly, ensure all devices share the same baud rate, data bits, parity, and stop bits, and add a 120Ω termination resistor at both ends of the bus.

Figure 2-2 Modbus RTU connection topology

3. Preparations

3.1 Hardware Device Requirements

Device Type

Specific Requirements

Gateway

Robustel Gateway with E2C Field / E2C Factory / E2C Facility software installed. In this document, we use LG3120 with E2C Field for an example.

Modbus TCP Device

PLC, meter, sensor, etc. supporting Modbus TCP protocol (IP address, port number, and slave address must be known).

Modbus RTU Device

VFD, temperature controller, smart meter, etc. supporting Modbus RTU protocol (serial parameters and slave address must be known).

Wiring

Standard Ethernet cable (for TCP) or 2-wire RS485 cable (for RTU).

PC

A laptop connected to the gateway's LAN port for web configuration.

3.2 Environment and Network Requirements

  1. The PC and the Gateway must be in the same network segment. (Default Gateway IP: 192.168.0.1)
  2. It is highly recommended that you have the Register Map (Point List) provided by the Modbus device manufacturer. This list tells you the specific meanings, addresses, function codes, and data types of the tags. If you do not have it, you may need trial and error to determine the correct register configuration.

4. Southbound Configuration: Modbus TCP

Chapter Goal: Connect and collect data from a Modbus TCP device. You will complete 3 tasks in sequence:

  1. Configure the gateway's LAN IP to ensure network connectivity with the device
  2. Add a Modbus TCP device in the system
  3. Import or manually add tags

After completion, you should see real-time device data on the gateway interface.

If your device uses an RS485 serial connection, skip to Chapter 5.

4.1 Physical Layer: Configuring LAN IP

Purpose of this step: To establish basic network communication. The gateway's LAN IP must be configured so it can successfully "ping" and communicate with the target Modbus TCP device over Ethernet.

  1. Log in to the gateway's Web GUI (Default IP: 192.168.0.1, User: admin, Password: admin).
  2. Go to Network > LAN.
  3. Edit the LAN1 interface and fill in the parameters according to the table below:

Parameter Name

Configuration Description

Recommended / Example Value

IPv4 Address and Subnet Mask

Set the gateway's IP to be in the same subnet as the end Modbus device

e.g., 192.168.0.1/24 (if device is 192.168.0.100)

  1. Click Submit and Save & Apply to apply the network configuration.

Figure 4-1 Configure the gateway LAN IP

4.2 Adding a Modbus TCP Device

Purpose of this step: To define the target device in the Data Collection engine so the gateway knows exactly which IP address and port to send data requests to, and how to identify itself for slave communication.

First, click Edge Computing in the gateway's Web GUI to enter the E2C Field software. Then follow these steps to add a Modbus TCP device.

  1. Go to Data Collection > Wired Device.
  2. Click the + Add Device button to add a new device.
  3. Configure the following parameters in the popup window:

Parameter Name

Configuration Description

Recommended / Example Value

Name

Create a custom name for easy identification on the platform

Packaging-Machine-03

Driver (Protocol)

Select the protocol type for the Southbound device

Modbus TCP

IP Address

The IP address of the target PLC/Device

192.168.0.3

Port Number

TCP communication port

Keep default 502 unless specified otherwise

Slave Address

The Modbus Slave ID of the device

1

Polling Cycle

Frequency of data requests (1~999999Seconds)

10

Description

Additional info for user reference.

Machine 03 in Workshop A.

Enable High-speed Collection Mode

Supports millisecond-level data acquisition. Once published, the system automatically generates high-speed collection groups. Note: High-speed tags and their information cannot be modified after generation; only regular tags can be maintained. To change high-speed settings, create a new device.

Enabled

High-speed Polling Cycle

Must be selected when high-speed mode is enabled. Supported intervals: 50ms, 100ms, 200ms, 500ms.

100ms

Package Count

Must be selected when high-speed mode is enabled. Defines how many polling cycles occur before data is reported as a batch. Supported values: 10, 20, 30.

30

Connection Timeout

Limit for establishing a TCP connection (ms).

10000

Collection Timeout

Limit for the device to respond to requests (ms).

1000

Communication Interval

Minimum time between two requests (ms).

10

Enable Batch Collection

Enabled by default for efficiency.

Enabled

Max Batch Count

Max tags per batch request (Default 64).

64

Byte Order Settings

Sequence of data bytes (Default ABCD).

ABCD

  1. Click Save to create the device card.

Figure 4-2 Add a Modbus TCP device

4.3 Adding tags

Purpose of this step: To define which specific register values (tags) need to be read from the added Modbus device.

If you have the register map provided by the device manufacturer, you can quickly create tags via batch import.

  1. In the Data Collection list, click on the device name you just created to enter its tag list.
  2. Click the Import button and download the template file.
  3. Fill in the tag information according to the template format:

Figure 4-3 Open batch import for Modbus TCP tags

Figure 4-4 Select a Modbus TCP point table

Figure 4-5 Check the imported Modbus TCP tags

  1. Upload the completed template; the system will automatically create the tags.

Figure 4-6 Verify imported Modbus TCP tags

Method 2: Manually Add

If batch import is unavailable, click Add and configure:

Parameter Name

Configuration Description

Recommended / Example Value

Collection Type

Select High-Performance or Normal

e.g., Normal

Name

Tag name, a readable name for the tag

Inlet_Pressure

Tag Type

Select Device Tag or Virtual Tag. For reading data from device, select Device Tag

Device Tag

Function Code

Select the appropriate Modbus Function Code (01-04)

03 Holding Register

Address

Enter the Modbus address (Decimal). Ensure it falls within the range of the selected register type (e.g., 40001 corresponds to Address 1)

1

Data Type

Must match the device's data format

short (int16)

R/W Permission

Select Read Only or Read & Write

Read Only

Encoding Format

Appears only when the Data Type is set to string. Specifies the character encoding used to interpret the raw bytes of a string tag, ensuring the gateway decodes the data correctly as readable text. Common options: ASCII, UTF-8, UTF-16LE, UTF-16BE, etc.

UTF-8

Decimal Places

Number of decimal places (for Float/Double)

2

Length

Appears only when the Data Type is set to string or raw-data. Specifies the length (in bytes) of the string or raw data to be read.

1

Negation

Appears only when the Data Type is set to bool. When enabled, performs a logical NOT operation on the read boolean value. Default is "False" (no negation).

False

Unit

Engineering unit

Mpa

Associated Group

Assign the tag to a specific data group.

-

Description

Brief explanation of the tag's purpose.

Total production count.

Data Operation

Mathematical processing (Scaling, Offset, etc.).

None

High/Low Byte Arrangement

Appears when the Data Type is a multi-byte numeric type (e.g., short, ushort, int, uint, float, double). Defines the byte order of multi-byte data within Modbus registers. Options: ABCD, BADC, CDAB, DCBA. Default is ABCD if not specified.

ABCD

Figure 4-7 Manually add a Modbus TCP tag

  1. Repeat for all tags. Once finished, click Publish in the top right corner to apply the configuration.
  2. Check the Latest Value column. If live numbers appear and update periodically, the configuration is fully successful.
  3. If you see a red status or no data, refer to Chapter 8 Troubleshooting for diagnosis.

Figure 4-8 Verify Modbus TCP data collection

5. Southbound Configuration: Modbus RTU

If your field device uses a 2-wire RS485 serial connection, follow this chapter.

First, click Edge Computing in the gateway's Web GUI to enter the E2C Field software. Then follow these steps to add a Modbus RTU device.

5.1 Physical Layer: Configuring the Serial Port

Purpose of this step: To align the gateway's serial port hardware settings with the field device. In RS485 communications, all devices on the bus must speak at the exact same speed and format, otherwise, no data can be exchanged.

Warning: Ensure the RS485 wiring is correct (A+ to A+, B- to B-). If communication fails later, try swapping the A and B wires.

  1. Log in to the gateway's Web GUI.
  2. Go to Interface > Serial Port, set the Serial Port Type to RS485.

Figure 5-1 Configure the RS485 serial port

  1. Go to Edge Computing > System Settings > Serial Port, find the serial port connected to your device (e.g., COM1) and click to configure.
  2. Configure according to the table below:

Parameter Name

Configuration Description

Recommended / Example Value

Baud Rate

The communication speed. Must exactly match the end device

Usually 38400 or 9600

Data Bit

The length of the data payload

8

Check Bit

No Parity / Even Parity / Odd Parity

No Parity

Stop Bits

The end-of-byte signal length

1

Parity

Error checking method

None

  1. Click Submit to apply the serial configuration.

Figure 5-2 Configure serial port settings

5.2 Adding a Modbus RTU Device

Purpose of this step: To tell the Data Collection engine which serial port to listen on and what the RTU slave address of the target device is.

  1. Go to Data Collection > Wired Device.
  2. Click the + Add Device button to add a new device.
  3. Configure the following parameters in the popup window:

Parameter Name

Configuration Description

Recommended / Example Value

Name

Create a custom name for easy identification on the platform

Senosr-IO-01

Driver (Protocol)

Select the protocol type for the serial device

Modbus RTU

Communication Channel

Select the serial port that connects to the device

/dev/ttyCOM1

Slave Address

The Modbus Slave Address of the device (Range: 1-247)

1

Polling Cycle

Frequency of data acquisition (Unit: Seconds)

10

Description

Additional info for user reference.

Machine 03 in Workshop A.

High-speed Data Collection Config

Enable millisecond-level high-speed acquisition. Disabled by default. When enabled, sub-options appear: High-speed Poll Interval, Package Count.Note: Groups are auto-generated and tags cannot be modified after publishing.

Enabled

High-speed Polling Cycle

Appears only when high-speed mode is enabled. Polling cycle in milliseconds. Options: 50ms, 100ms, 200ms, 500ms.

100ms

Package Count

Appears only when high-speed mode is enabled. Number of polls before data is reported as a batch. Options: 10, 20, 30.

10

Connection Timeout

The maximum time (in milliseconds) the gateway waits for a response after sending a request to the device. If no valid response is received within this period, the gateway considers the communication attempt failed. Default 10000, range 2-60000. This parameter also applies to Modbus RTU serial communication, defining the maximum wait time for a response from the serial device.

10000

Communication Interval

Minimum idle time between two communication requests (milliseconds). Default 10, range 0-1000.

10

Enable Batch Collection

Enable batch reading (reading multiple consecutive registers in one request). Enabled by default for efficiency.

Enabled

Max Batch Count

Appears only when batch collection is enabled. Maximum number of registers per batch request. Range 2-125, default 64.

64

High/Low Byte Arrangement

Device-level default byte order applicable to all tags under this device (can be overridden per tag if supported). Recommended to set consistently for multi-byte tags. Options: ABCD, BADC, CDAB, DCBA. Default ABCD.

ABCD

Serial Parameters

Displays Baud Rate, Data Bit, etc., based on the selected channel for verification.

-

Note: High/Low Byte Arrangement is the device‑level default; individual tags may override it (if supported by the firmware).

  1. Click Save to create the device card.

Figure 5-3 Add a Modbus RTU device

5.3 Adding tags

Purpose of this step: Let the software know which point data to collect.

Operating steps are the same as Modbus TCP, refer to Section 4.3 Method 1.

Method 2: Manually Add

If batch import is unavailable, click Manually Add and configure:

Parameter Name

Configuration Description

Recommended / Example Value

Name

Tag name, a readable name for the tag

e.g., Temperature

Collection Type

Select High-Performance or Normal

e.g., Normal

Tag Type

Select Device Tag or Virtual Tag. For reading data from device, select Device Tag

e.g., Device Tag

Function Code

Select based on register type (e.g., 03 Holding Register)

e.g., 03

Address

Decimal Modbus address (e.g., 40001 corresponds to Address 1)

e.g., 1

Data Type

Must match the device (e.g., short, float)

e.g., short (int16)

R/W Permission

Read Only, Read/Write, or Restricted by FC

e.g., Read Only

Unit

Physical unit (e.g., Mpa, ℃, Hz)

e.g., Mpa

image.png

Figure 5-4 Import Modbus RTU tags

  1. Repeat for all tags. Once finished, click Publish in the top right corner to apply the configuration.
  2. Check the Latest Value column. If live numbers appear and update periodically, the configuration is fully successful.

image.png

Figure 5-5 Manually add a Modbus RTU tag

6. Device Status and Data Verification

Once the configuration is complete, it is crucial to verify that the gateway is successfully communicating with the field devices and collecting accurate data.

6.1 Checking Device Connection Status

Purpose of this step: To confirm if the gateway has successfully established a connection with the Southbound Modbus device.

  1. Go to Edge Computing > Data Collection > Wired Device.
  2. Locate the configured device card in the list.
  3. Check the indicator on the top left corner of the device card:
  • Green: The device connection is normal.
  • Red: The device connection failed.

image.png

Figure 6-1 Check device connection status

6.2 Viewing Data Collection Status and Latest Values

Purpose of this step: To verify that the configured tags are successfully returning valid readings from the field device.

  1. Observe the Status, Latest Value, and Update Time columns:

Column Name

Description

Status

Shows the collection status of each tag. A green icon indicates the tag is collected normally, while a red icon indicates collection failure

Latest Value

Displays the real-time data collected from the field device (e.g., a temperature reading of 23.5)

Update Time

Shows the timestamp of the last successful update for this tag

image.png

Figure 6-2 View data collection status and latest values

6.3 Modifying Data Values (Write Operation Verification)

Purpose of this step: To send control commands back to the field device (e.g., turning on a relay or setting a new temperature setpoint).

  1. Ensure the tag has Read/Write permissions (e.g., Holding Register with Function Code 03, and R/W Permission set to Read & Write). Points with Read Only permission (like Input Registers with Function Code 04) cannot be modified.
  2. In the tag list, click the Edit icon (usually a pencil symbol) next to the point you want to modify.
  3. A Modify Tag Value dialog box will appear. Enter the new desired value and click Save or Confirm.
  4. Observe the Latest Value column. It should update to reflect the new value if the write operation was successful.

Figure 6-3 Modify a data value

7. Northbound Configuration: Two Core Scenarios

Once the gateway successfully reads data from Southbound Modbus devices, you can forward this data to Northbound systems.

7.1 Creating Data Groups (Preparation for Data to Cloud)

Purpose of this step: To organize the collected Modbus tags into logical groups before sending them to the cloud or application systems. Grouping allows you to control exactly which tags are packed and uploaded together in a single message.

  1. Go to the Data to Cloud > Groups page.
  2. Click the + button to add a new group, and set the report type (Period, Change or Change & Period).
  3. In the tag selection area, select the Modbus devices and the specific tags (tags) you want to include in this group.
  4. Click Save to create the group.

Note: You will use this created Group in the following MQTT transmission settings to define the upload content.

Figure 7-1 Create a data group

7.2 Scenario A: Forwarding to MQTT Broker (Data to Cloud)

This scenario is used to push data to cloud platforms (like AWS, Azure, or private IoT platforms).

  1. Go to Data to Cloud, click Create Cloud Service, and choose MQTT.
  2. Configure the MQTT connection:

Parameter

Description

Example

Server Address / Port

Enter your cloud server IP and Port (usually 1883/8883)

192.168.1.100:1883

Client ID

Set a unique ID for this connection

Gateway_001

Username / Password

Fill in if required by your Broker

-

  1. Go to the Message Management section and click Add to add a publish rule:

Parameter

Description

Example

Topic

Define the topic where data will be published

/factory/line1/temperature

Data Group

Select the group you created

Group_01

  1. Click Save and ensure the connection status turns to Connected.
  2. Use an MQTT client tool to subscribe to the corresponding Topic and verify data reception.

Figure 7-2 Configure the MQTT cloud service

Figure 7-3 Configure MQTT message management

Figure 7-4 Verify MQTT data forwarding

7.3 Scenario B: Forwarding to OPC UA Server (Data to SCADA)

This scenario is used to provide data to local factory SCADA or BMS systems. The gateway acts as an OPC UA Server, waiting for the SCADA to connect to it.

  1. Go to Data to Cloud > OPC UA.
  2. Click Add to add an OPC UA service.
  3. Enable the OPCUA Server Configuration and set the Port (default 4840).
  4. Set Maximum Connections, and choose Authentication Mode (Anonymous or User). If User Mode is selected, you need to set a username and a password.
  5. Click Submit and Save.
  6. In your SCADA software, use the URL opc.tcp://[Gateway_LAN_IP]:4840 to discover the gateway and browse the Modbus tags.

Figure 7-5 Configure the OPC UA server

Figure 7-6 Verify OPC UA data forwarding

8. Troubleshooting & FAQ

8.1 Modbus TCP Common Issues

Symptom

Possible Cause

Solution

Device status persistently offline

Gateway and device in different subnets

Ensure gateway IP is in the same subnet as the target, or properly configure cross-segment access via router

Wrong target IP or port

Verify the Target IP and Port (Default 502)

Firewall blocking the Modbus TCP port you configured

Check firewall rules on gateway and device side, open the Modbus TCP port you configured

Slave address mismatch

Confirm the actual slave address of the device; some devices default to non-1

Connected but values are null or incorrect

Wrong function code

Check register map to confirm correct function code (01/02/03/04)

Data type mismatch

Confirm the actual PLC data type (INT/UINT/FLOAT, etc.)

Wrong byte order

Switch Byte Order (ABCD/CDAB/BADC/DCBA)

Write operation failed

Function code does not support write

Ensure function code is 01/03, not read-only like 04

Value out of range

Confirm the write value is within the device allowed range

Data updates slowly or stutters

Polling cycle too long

Reduce the Polling Cycle value

Batch read too large causing timeout

Reduce Max Batch Count, or disable Batch Read

High network latency

Check network quality, use wired connection

8.2 Modbus RTU Common Issues

Symptom

Possible Cause

Solution

Device status persistently offline

Serial parameters mismatch

Check device manual, ensure baud rate, data bits, parity, and stop bits exactly match

Wrong slave address

Confirm the actual slave address of the device; some devices default to non-1

Connected but values are null or incorrect

Wrong function code

Check register map to confirm correct function code (01/02/03/04)

Data type mismatch

Confirm the actual device data type (INT/UINT/FLOAT, etc.)

Wrong byte order

Switch Byte Order (ABCD/CDAB/BADC/DCBA)

Write operation failed

Function code does not support write

Ensure function code is 01 (Coil) or 03 (Holding Register). Function codes 02 (Discrete Input) and 04 (Input Register) are read-only and cannot be written

Value out of range

Confirm the write value is within the device allowed range

Data updates slowly or stutters

Polling cycle too long

Reduce the Polling Cycle value

Batch read too small causing inefficiency

Increase Max Batch Count

Collection timeout too short

Increase Collection Timeout value

Some devices offline during multi-device polling

Slave address conflict

Disconnect and verify one by one, ensure unique addresses on bus

Response timeout too short

Increase Collection Timeout value

Device does not support batch read

Disable Batch Collection, switch to single-point polling

Values jump or abnormally large

Wrong byte order

Switch Byte Order (ABCD/CDAB/BADC/DCBA)

Data type error (signed/unsigned confusion)

Confirm the actual device data type

Address misalignment (double-word/float crossing register boundary)

Ensure addresses are contiguous and do not overlap with other points

9. Core Parameter Quick Reference

For quick on-site configuration, refer to these industry-standard default values. Unless explicitly required by the site, do not change them:

Parameter Name

Protocol

Default/Recommended Value

Description

Port Number

Modbus TCP

502 (TCP)

Standard Modbus TCP port

Slave Address

Modbus TCP/RTU

1

Range 1-247; 0 is broadcast address

Baud Rate

Modbus RTU

38400 or 9600

Must exactly match the end device

Data Bit

Modbus RTU

8

Usually fixed at 8

Check Bit

Modbus RTU

No Parity

Options: None/Even/Odd

Stop Bits

Modbus RTU

1

Usually fixed at 1

High/Low Byte Arrangement

Modbus TCP/RTU

ABCD

Byte arrangement sequence for multi-byte numeric types (short/ushort/int/uint/float/double); if data is abnormal, try other arrangements (e.g., CDAB, BADC, DCBA)

Polling Cycle

Modbus TCP/RTU

10 seconds

Adjust according to data real-time requirements

Enable Batch Collection

Modbus TCP/RTU

Enabled

Enabled by default for efficiency

Max Batch Count

Modbus TCP

64

Max tags per request

Max Batch Count

Modbus RTU

64

Range 2-125