Robustel E2C Trinity Modbus Protocol (Southbound) User Guide

Robustel E2C Trinity Modbus Protocol (Southbound) User Guide

Robustel E2C Trinity Modbus Protocol (Southbound) User Guide V1.1

Document Version: V1.1

Gateways & Firmware Requirement:

SoftwareE2C FactoryE2C FieldE2C Facility
Gateways supportingEG3120
EG5120
EG5200
LG3120LG5120
Firmware Requirement(RobustOS Pro
Version)
≥2.3.103=2.4.110(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.

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

3. Preparations

3.1 Hardware Device Requirements

Device TypeSpecific Requirements
GatewayRobustel Gateway with E2C Field / E2C Factory / E2C Facility software installed. In this document, we use LG3120 with E2C Field for an example.
Modbus TCP DevicePLC, meter, sensor, etc. supporting Modbus TCP protocol (IP address, port number, and slave address must be known).
Modbus RTU DeviceVFD, temperature controller, smart meter, etc. supporting Modbus RTU protocol (serial parameters and slave address must be known).
WiringStandard Ethernet cable (for TCP) or 2-wire RS485 cable (for RTU).
PCA 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 NameConfiguration DescriptionRecommended / Example Value
IPv4 Address and Subnet MaskSet the gateway's IP to be in the same subnet as the end Modbus devicee.g., 192.168.0.1/24 (if device is 192.168.0.100)
  1. Click Submit and Save & Apply to apply the network configuration.

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 NameConfiguration DescriptionRecommended / Example Value
NameCreate a custom name for easy identification on the platformPackaging-Machine-03
Driver (Protocol)Select the protocol type for the Southbound deviceModbus TCP
IP AddressThe IP address of the target PLC/Device192.168.0.3
Port NumberTCP communication portKeep default 502 unless specified otherwise
Slave AddressThe Modbus Slave ID of the device1
Polling CycleFrequency of data requests (1~999999Seconds)10
DescriptionAdditional info for user reference.Machine 03 in Workshop A.
Enable High-speed Collection ModeSupports 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 CycleMust be selected when high-speed mode is enabled. Supported intervals: 50ms, 100ms, 200ms, 500ms.100ms
Package CountMust 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 TimeoutLimit for establishing a TCP connection (ms).10000
Collection TimeoutLimit for the device to respond to requests (ms).1000
Communication IntervalMinimum time between two requests (ms).10
Enable Batch CollectionEnabled by default for efficiency.Enabled
Max Batch CountMax tags per batch request (Default 64).64
Byte Order SettingsSequence of data bytes (Default ABCD).ABCD
  1. Click Save to create the device card.

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:

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

Method 2: Manually Add

If batch import is unavailable, click Add and configure:

Parameter NameConfiguration DescriptionRecommended / Example Value
Collection ModeSelect Polling or Subscription ModePolling
NameTag name, a readable name for the tagInlet_Pressure
Tag TypeSelect Device Tag or Virtual Tag. For reading data from device, select Device TagDevice Tag
Function CodeSelect the appropriate Modbus Function Code (01-04)03 Holding Register
AddressEnter the Modbus address (Decimal). Ensure it falls within the range of the selected register type (e.g., 40001 corresponds to Address 1)1
Data TypeMust match the device's data formatshort (int16)
R/W PermissionSelect Read Only or Read & WriteRead Only
Encoding FormatAppears 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 PlacesNumber of decimal places (for Float/Double)2
LengthAppears 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
NegationAppears 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
UnitEngineering unitMpa
Associated GroupAssign the tag to a specific data group.-
DescriptionBrief explanation of the tag's purpose.Total production count.
Data OperationMathematical processing (Scaling, Offset, etc.).None
High/Low Byte ArrangementAppears 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

  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.

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.

  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 NameConfiguration DescriptionRecommended / Example Value
Baud RateThe communication speed. Must exactly match the end deviceUsually 38400 or 9600
Data BitThe length of the data payload8
Check BitNo Parity / Even Parity / Odd ParityNo Parity
Stop BitsThe end-of-byte signal length1
ParityError checking methodNone
  1. Click Submit to apply the serial configuration.

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 NameConfiguration DescriptionRecommended / Example Value
NameCreate a custom name for easy identification on the platformAdvantech-IO-01
Driver (Protocol)Select the protocol type for the serial deviceModbus RTU
Communication ChannelSelect the serial port that connects to the device/dev/ttyCOM1
Slave AddressThe Modbus Slave Address of the device (Range: 1-247)1
Polling CycleFrequency of data acquisition (Unit: Seconds)10
DescriptionAdditional info for user reference.Machine 03 in Workshop A.
High-speed Data Collection ConfigEnable 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 CycleAppears only when high-speed mode is enabled. Polling cycle in milliseconds. Options: 50ms, 100ms, 200ms, 500ms.100ms
Package CountAppears only when high-speed mode is enabled. Number of polls before data is reported as a batch. Options: 10, 20, 30.10
Connection TimeoutThe 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 IntervalMinimum idle time between two communication requests (milliseconds). Default 10, range 0-1000.10
Enable Batch CollectionEnable batch reading (reading multiple consecutive registers in one request). Enabled by default for efficiency.Enabled
Max Batch CountAppears only when batch collection is enabled. Maximum number of registers per batch request. Range 2-125, default 64.64
High/Low Byte ArrangementDevice-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 ParametersDisplays 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.

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 NameConfiguration DescriptionRecommended / Example Value
NameTag name, a readable name for the tage.g., DO1
Collection ModeSelect Polling or Subscription Modee.g., Polling
Tag TypeSelect Device Tag or Virtual Tag. For reading data from device, select Device Tage.g., Device Tag
Function CodeSelect based on register type (e.g., 03 Holding Register)e.g., 03
AddressDecimal Modbus address (e.g., 40001 corresponds to Address 1)e.g., 1
Data TypeMust match the device (e.g., short, float)e.g., short (int16)
R/W PermissionRead Only, Read/Write, or Restricted by FCe.g., Read Only
UnitPhysical unit (e.g., Mpa, ℃, Hz)e.g., Mpa

  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.

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:

    1. Green: The device connection is normal.

    2. Red: The device connection failed.

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 NameDescription
StatusShows the collection status of each tag. A green icon indicates the tag is collected normally, while a red icon indicates collection failure
Latest ValueDisplays the real-time data collected from the field device (e.g., a temperature reading of 23.5)
Update TimeShows the timestamp of the last successful update for this tag

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.

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.

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:

ParameterDescriptionExample
Server Address / PortEnter your cloud server IP and Port (usually 1883/8883)192.168.1.100:1883
Client IDSet a unique ID for this connectionGateway_001
Username / PasswordFill in if required by your Broker-
  1. Go to the Message Management section and click Add to add a publish rule:
ParameterDescriptionExample
TopicDefine the topic where data will be published/factory/line1/temperature
Data GroupSelect the group you createdGroup_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.

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.

8. Troubleshooting & FAQ

8.1 Modbus TCP Common Issues

SymptomPossible CauseSolution
Device status persistently offlineGateway and device in different subnetsEnsure gateway IP is in the same subnet as the target, or properly configure cross-segment access via router
Wrong target IP or portVerify the Target IP and Port (Default 502)
Firewall blocking the Modbus TCP port you configuredCheck firewall rules on gateway and device side, open the Modbus TCP port you configured
Slave address mismatchConfirm the actual slave address of the device; some devices default to non-1
Connected but values are null or incorrectWrong function codeCheck register map to confirm correct function code (01/02/03/04)
Data type mismatchConfirm the actual PLC data type (INT/UINT/FLOAT, etc.)
Wrong byte orderSwitch Byte Order (ABCD/CDAB/BADC/DCBA)
Write operation failedFunction code does not support writeEnsure function code is 01/03, not read-only like 04
Value out of rangeConfirm the write value is within the device allowed range
Data updates slowly or stuttersPolling cycle too longReduce the Polling Cycle value
Batch read too large causing timeoutReduce Max Batch Count, or disable Batch Read
High network latencyCheck network quality, use wired connection

8.2 Modbus RTU Common Issues

SymptomPossible CauseSolution
Device status persistently offlineSerial parameters mismatchCheck device manual, ensure baud rate, data bits, parity, and stop bits exactly match
Wrong slave addressConfirm the actual slave address of the device; some devices default to non-1
Connected but values are null or incorrectWrong function codeCheck register map to confirm correct function code (01/02/03/04)
Data type mismatchConfirm the actual device data type (INT/UINT/FLOAT, etc.)
Wrong byte orderSwitch Byte Order (ABCD/CDAB/BADC/DCBA)
Write operation failedFunction code does not support writeEnsure 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 rangeConfirm the write value is within the device allowed range
Data updates slowly or stuttersPolling cycle too longReduce the Polling Cycle value
Batch read too small causing inefficiencyIncrease Max Batch Count
Collection timeout too shortIncrease Collection Timeout value
Some devices offline during multi-device pollingSlave address conflictDisconnect and verify one by one, ensure unique addresses on bus
Response timeout too shortIncrease Collection Timeout value
Device does not support batch readDisable Batch Collection, switch to single-point polling
Values jump or abnormally largeWrong byte orderSwitch 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 NameProtocolDefault/Recommended ValueDescription
Port NumberModbus TCP502 (TCP)Standard Modbus TCP port
Slave AddressModbus TCP/RTU1Range 1-247; 0 is broadcast address
Baud RateModbus RTU38400 or 9600Must exactly match the end device
Data BitModbus RTU8Usually fixed at 8
Check BitModbus RTUNo ParityOptions: None/Even/Odd
Stop BitsModbus RTU1Usually fixed at 1
High/Low Byte ArrangementModbus TCP/RTUABCDByte 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 CycleModbus TCP/RTU10 secondsAdjust according to data real-time requirements
Enable Batch CollectionModbus TCP/RTUEnabledEnabled by default for efficiency
Max Batch CountModbus TCP64Max tags per request
Max Batch CountModbus RTU64Range 2-125