AB-ETH
AB-ETH speaks the Allen-Bradley DF1 protocol tunnelled over Ethernet (the "PCCC over Ethernet/IP" encapsulation used by older Allen-Bradley/Rockwell PLC-5 and SLC 500 controllers). It addresses data in the controller’s file-based memory (integer files, status files, timers, counters, and so on) rather than by symbolic tag name.
Supported Operations
| Name | Value | Description |
|---|---|---|
|
Reads a single element (or an array of elements) from a file. |
|
|
Polling-emulated. AB-ETH has no native subscription or change notification mechanism. Subscriptions are emulated by polling the tag on the regular read path (cyclic and change-of-state subscriptions are both supported this way). |
|
|
Not supported, in either the Java or the Go driver. |
|
|
Not supported. |
Connection String
ab-eth://<host>[:<port>]
Example, over the default tcp transport:
ab-eth://192.168.24.40
Connection String Options
Name |
Type |
Default Value |
Required |
Description |
Name |
Allen Bradley ETH |
|||
Code |
|
|||
Maven Dependency |
<dependency> <groupId>org.apache.plc4x</groupId> <artifactId>plc4j-driver-ab-eth</artifactId> <version>1.1.0</version> </dependency> |
|||
Default Transport |
|
|||
Supported Transports |
|
|||
Config options: |
||||
|
INT |
0 |
Id of the station we want to connect to. |
|
|
INT |
10000 |
Maximum time (in milliseconds) to wait for the gateway to acknowledge the connection request or for a read response. |
|
Transport config options: |
||||
tcp |
||||
|
INT |
5000 |
Connection timeout in milliseconds. |
|
|
INT |
0 |
Socket read timeout in milliseconds. 0 means no timeout. |
|
|
INT |
0 |
Socket write timeout in milliseconds. 0 means no timeout. |
|
|
BOOLEAN |
true |
Enable TCP_NODELAY (disable Nagle’s algorithm). |
|
|
BOOLEAN |
false |
Enable SO_KEEPALIVE. |
|
|
INT |
81920 |
Send buffer size in bytes. 0 uses system default. |
|
|
INT |
81920 |
Receive buffer size in bytes. 0 uses system default. |
|
|
STRING |
Local address to bind to (optional). If not set, uses default. |
||
|
INT |
0 |
Local port to bind to (optional). 0 uses ephemeral port. |
|
Tag Addresses
Addressing is implemented in Java. The Go driver reads but does not write. See the protocol support matrix for what each implementation does.
General Format
N<fileNumber>:<elementNumber>[/<bitNumber>]:<dataType>[[<size>]]
-
fileNumber- the integer file number (1 to 7 digits). -
elementNumber- the element number within that file (1 to 7 digits). -
bitNumber- optional; a bit within the addressed element (1 to 7 digits), separated from the element number by/. -
dataType- the data type to interpret the element as; see Data Types below. -
size- optional; the number of bytes to read, in square brackets.WORDandSINGLEBITalways use a fixed 2-byte size andDWORDalways uses a fixed 4-byte size, regardless of what is given here; every other data type requires this to be given explicitly.
Data Types
The dataType segment is matched case-insensitively against the driver’s
FileType enum:
| Type | Notes |
|---|---|
|
Processor status file. |
|
Bit file. |
|
Timer file. |
|
Counter file. |
|
Control file. |
|
Integer file. |
|
Floating-point file. |
|
Output file. |
|
Input file. |
|
String file. |
|
ASCII file. |
|
Binary-coded decimal file. |
|
Custom 2-byte integer, read from an integer file. Fixed 2-byte size. |
|
Custom 4-byte integer, read from an integer file. Fixed 4-byte size. |
|
Custom single bit, read from an integer file. Fixed 2-byte size. |