EtherNet/IP Read
x/eipRead component: v0.37.0+ Reads controller tags in batch from Rockwell Automation Allen-Bradley ControlLogix/CompactLogix/Micro820 PLCs over the EtherNet/IP (CIP) protocol. Only CIP devices are supported; PCCC protocol devices such as PLC5, SLC, and MicroLogix are not supported.
Additional extension library required: rulego-components-iot (opens new window)
# Configuration
| Field | Type | Description | Default |
|---|---|---|---|
| server | string | PLC host address (host only); port 44818 is built in by gologix, e.g. 127.0.0.1; supports ref://nodeId to reuse an existing connection in the chain | 127.0.0.1 |
| slot | int | CPU slot on the backplane; auto-generates the CIP path (e.g. 1,0) | 0 |
| path | string | Optional CIP path override, e.g. 1,0; empty = auto-generated from slot | None |
| timeout | int | Request timeout in seconds | 5 |
| points | array | Default points table; points in msg.Data take precedence | None |
Points fields:
| Field | Type | Description |
|---|---|---|
| name | string | Point name |
| addr | string | Controller tag name (CIP tag), e.g. MyTag, MyDB.Temperature |
| type | string | Tag data type, required (gologix Read requires a concrete type pointer); see options below |
| scale | float | Optional scale multiplier (default 1); conversion formula eng = raw*scale + offset |
| offset | float | Optional offset (default 0) |
# Point Fields
addr: Controller tag name. Supports controller-scoped tags (e.g. Temperature), struct members (e.g. MyDB.Temperature), array elements (e.g. MyArray[0]), and program-scoped tags (e.g. Program:MainProgram.Tag).
type: Tag data type, required. Because gologix's Read requires a concrete Go type pointer (Go is statically typed), the type cannot be inferred from the tag and must be specified explicitly by the caller.
Supported values (case-insensitive):
| Category | Accepted aliases |
|---|---|
| Boolean | BOOL |
| 8-bit integer | BYTE, SINT, USINT |
| 16-bit integer | INT, INT16, UINT, WORD, UINT16 |
| 32-bit integer | DINT, INT32, UDINT, DWORD, UINT32 |
| 64-bit integer | LINT, INT64, ULINT, UINT64 |
| 32-bit float | REAL, FLOAT |
| 64-bit float | LREAL, DOUBLE |
| String | STRING |
# Output
Read results are written back to msg.Data (JSON array) with a unified contract and routed through the Success chain. One object per point, with the following fields:
| Field | Type | Description |
|---|---|---|
| name | string | Point name |
| address | string | Tag name (equals the configured/input addr) |
| value | any | Read value |
| type | string | Data type (uppercase) |
| quality | string | Quality: good or bad |
| timestamp | string | Acquisition time (RFC3339 format) |
Example data:
[
{
"name": "temperature",
"address": "MyDB.Temperature",
"value": 23.5,
"type": "REAL",
"quality": "good",
"timestamp": "2026-07-23T10:00:00.123456789Z"
}
]
2
3
4
5
6
7
8
9
10
A failure on a single point does not affect other points (that point is marked quality=bad); only when all points fail is it treated as a connection-level error and routed to the Failure chain.
# Input (Optional)
msg.Data may carry a points list in JSON, using the same format as the points configuration; when non-empty it takes precedence over the configured points, which is useful for dynamic collection scenarios:
[
{"name": "temp", "addr": "MyDB.Temperature", "type": "REAL"}
]
2
3
# Features
- Periodic collection: Pair with an
endpoint/scheduleendpoint upstream as a trigger; maintain points in thepointsconfiguration. - Template variables: Point fields (
name/addr/type/value) support${msg.xx}/${metadata.xx}placeholders. - Dynamic points: Points in
msg.Datatake precedence over configuredpoints. - Same-chain connection pool: Other nodes in the same chain can borrow the EtherNet/IP connection already established by this node via
ref://nodeId, avoiding duplicate connections. - Auto-reconnect & retry: On connection-level failure (all tags fail) the node reconnects and retries automatically, up to
3times.
# Relation Type
- Success: On successful execution, the message is sent to the
Successchain. - Failure: On failed execution, the message is sent to the
Failurechain.
# Example
{
"ruleChain": {
"name": "eip-read-demo",
"root": true,
"debugMode": false
},
"metadata": {
"endpoints": [],
"nodes": [
{
"type": "x/eipRead",
"name": "read tags",
"debugMode": false,
"configuration": {
"server": "192.168.1.10",
"slot": 0,
"timeout": 5,
"points": [
{"name": "temperature", "addr": "MyDB.Temperature", "type": "REAL"},
{"name": "running", "addr": "MyDB.Running", "type": "BOOL"}
]
}
}
],
"connections": []
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27