OPC UA Data Collection Guide

OPC UA Data Collection Guide


1. Protocol Overview

  • Protocol Description: Modbus TCP is a common industrial automation protocol based on TCP/IP network transmission.
  • Application Scenarios: This protocol is widely used for data acquisition and control of devices such as PLCs, sensors, and meters.
  • E2C Trinity Support: E2C Trinity acts as a Client to connect and read data from devices via the Modbus TCP protocol.

2. Prerequisites

Before starting the configuration, please ensure the following:

  • Hardware Connection:
    • Ensure the E2C Trinity gateway and the target device (Modbus TCP-supported PLC, meter, sensor, etc.) are connected to the same Local Area Network (LAN) and can communicate.
    • The debugging PC must be connected to the gateway via Ethernet to log into the E2C Trinity web interface.
  • Network Parameters:
    • Obtain the IP Address of the target device.
    • Confirm the TCP Port Number (Default Modbus TCP port is 502).
    • Ensure the gateway, target device, and PC are on the same subnet with no IP conflicts. For Robustel EG series gateways, refer to the RobustOS Pro Software Manual for IP configuration.
  • Device Parameters:
    • Prepare the PLC project file or the Modbus Register Map.
    • Identify key parameters:
      • Slave Address (Slave ID): Usually 1 by default.
      • Function Code: Determines the register type and R/W mode (01/02/03/04, etc.).
      • Register Address: (Decimal, e.g., 40001 for the first Holding Register).
      • Data Type: e.g., Bool, Int, Float, etc.

3. Configuration Steps

Follow these steps within the E2C Trinity Web interface.

Step 1: Create Device

  1. Log into the gateway management page. Navigate to [Data Acquisition] to enter the E2C Trinity configuration page.


  1. Click the "Create Device"button and fill in the connection information in the pop-up window.

Parameter Description Example
Name Name of the source device, used to distinguish different equipment. Packaging-Machine-03
Driver Select the protocol for communication: "OPC UA". OPC UA
Server URL The access address of the target OPC UA server. opc.tcp://192.168.0.10:4840
Collection Mode Polling or Subscription (Multiple selections supported). Polling + Subscription
Polling Cycle Required if mode = Polling. Frequency of data requests (Seconds). 10
Publishing Interval Required if mode = Subscription. Range: 200–60,000 (ms). 200
Batch Size Required if mode = Subscription. Range: 10–100. 20
Authentication Method Choose between Anonymous Login or User/Password. Anonymous Login
Security Policy None / Basic128Rsa15 / Basic256 / etc. (Must match server settings). None
Description Additional info to help identify the device. Workshop A - Machine 03.
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 connection (ms). Default: 10,000. 10000
Collection Timeout Limit for the server to respond to requests (ms). Default: 1,000. 1000
Enable Batch Collection Enabled by default for performance. Enabled
Max Batch Count Maximum data points per batch request. Default: 50. 50
  1. Click "Save" to complete the device creation.

Step 2: Configure Tag (Point Table)

  1. Select the created PLC device from the list on the left.
  2. Click "Add" to create a data acquisition tag. The available options may change based on the Polling/Subscription mode selected during device creation.

Parameter Description Example
Collection Mode Select the mode for this specific tag (defaults based on device settings). Subscription
Name The variable name used in data reporting payloads. Temperature
Collection Type If high-speed mode is supported, choose High-performance or Normal. Normal
Tag Type Device Tag: Data from the PLC.
Virtual Tag: Gateway-side intermediate variable.
Device Tag
NS (Namespace Index) The Namespace Index of the target node. 2
Address Type Select NodeId type: String, Numeric, GUID, or Opaque. String
Identification Code

The unique ID of the node (e.g., Temperature

or 1005

).

Temperature
Data Type Data format (e.g., bool, int16, float32); must match the OPC UA node. short (int16)
Read/Write Permission Read Only: Gateway cannot modify the value.
Read/Write: Gateway can both read and modify.
Read Only
Decimals Number of decimal places (for float/double types). 2
Unit Engineering units (e.g., °C, KWh, pcs). °C
Associated Group Assign the variable to a specific data group. -
Data Operation Mathematical processing like Scaling or Offset. -
  1. Repeat for all tags. Once finished, click "Publish" in the top right corner to apply the configuration.

4. Verification & Troubleshooting

Verification

  1. Check the device list to ensure the status is Online and tags are successfully collected.A green icon indicates success, and a red icon indicates failure.

  1. View the Latest Value column to verify data accuracy.

  1. Test Writing: Click the edit icon in the "Latest Value" column, modify the value, and verify if the PLC accepts the change.

Common Troubleshooting

  • Issue: Cannot connect to server?
    • Check if the URL is correct (protocol opc.tcp:// and port 4840).
    • Ensure Authentication and Security Policy settings match the server.
    • If using certificate authentication, ensure the certificate is trusted by the server.
  • Issue: Specific tags fail to collect?
    • Check if the Namespace Index (NS) and Identification Code are correct.
    • Confirm the server has granted Read/Write permissions for that node.
    • In Subscription mode, check if the Publishing Interval or Batch Size is appropriate.
  • Issue: Abnormal values?
    • Verify the Data Type (e.g., don't use int32 if the server provides float32).
    • For strings, confirm the encoding format (UTF-8/UTF-16).
  • Where to find logs?
    • Debug Logs: View real-time communication details.
    • System Logs: View gateway-level execution logs.

5. Appendix

Data Type Mapping

When configuring tags in E2C Trinity, use the following mapping:

**Edge2C Pro Data Type ** Length/Sign OPC UA Equivalent Type Example NodeId Notes
bool 1 bit Boolean ns=2;s=MotorStart Read Only / Read & Write, depending on permissions
short (int16) 16 bit / Signed Int16 ns=3;i=1001 -32768…32767
ushort (uint16) 16 bit / Unsigned UInt16 ns=3;i=1002 0…65535
int (int32) 32 bit / Signed Int32 ns=3;i=1003 -2147483648…2147483647
uint (uint32) 32 bit / Unsigned UInt32 ns=3;i=1004 0…4294967295
float (float32) 32 bit Float ns=2;s=Temperature IEEE 754 Single Precision
double (float64) 64 bit Double ns=2;s=Pressure IEEE 754 Double Precision
string n × 16 bit String ns=2;s=DeviceName UTF-8 Encoding
byte 8 bit Byte ns=3;i=2001 Native single-byte support in OPC UA


Revision History


Version Date Author Changes
1.0 2025-09-30 WX Initial document creation.
    • Related Articles

    • Modbus TCP Data Collection Guide

      1. Protocol Overview Protocol Description: Modbus TCP is a common industrial automation protocol based on TCP/IP network transmission. Application Scenarios: This protocol is widely used for data acquisition and control of devices such as PLCs, ...
    • Siemens S7 Data Collection Guide

      1. Protocol Overview Protocol Description: The S7 protocol is a proprietary communication protocol developed by Siemens for its S7 series PLCs. It is primarily used for data communication between STEP 7 programming software and S7 PLCs, as well as ...
    • Inovance TCP Data Collection Guide

      1. Protocol Overview Protocol Description: The Inovance TCP protocol is a communication method that allows direct TCP/IP network connection to Inovance PLCs (such as H3U, AM/AC series). It supports efficient data exchange by reading tags or register ...
    • Omron CipNet Data Collection Guide

      1. Protocol Overview Protocol Description: CipNet is the term used by Omron for its EtherNet/IP network solution. EtherNet/IP is a widely adopted industrial Ethernet communication protocol that encapsulates the Common Industrial Protocol (CIP) within ...
    • BACnet MS_TP Data Collection Guide

      Protocol Overview Protocol Description: BACnet MS/TP (Master-Slave/Token-Passing) is a physical layer and data link layer implementation of the BACnet protocol, designed for low-speed, low-cost application scenarios. It adopts a ...