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 |
|---|---|---|
read | Reads a single element (or an array of elements) from a file. | |
subscribe | 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). | |
write | Not supported, in either the Java or the Go driver. | |
browse | Not supported. |
Connection String
ab-eth://<host>[:<port>]Example, over the default tcp transport:
ab-eth://192.168.24.40Connection String Options
Name
Type
Default Value
Required
Description
Name
Allen Bradley ETH
Code
ab-eth
Maven Dependency
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-ab-eth</artifactId>
<version>1.0.0</version>
</dependency>Default Transport
tcp
Supported Transports
tcp
Config options:
station
INT
0
Id of the station we want to connect to.
request-timeout-ms
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
tcp.connect-timeout-ms
INT
5000
Connection timeout in milliseconds.
tcp.read-timeout-ms
INT
0
Socket read timeout in milliseconds. 0 means no timeout.
tcp.write-timeout-ms
INT
0
Socket write timeout in milliseconds. 0 means no timeout.
tcp.no-delay
BOOLEAN
true
Enable TCP_NODELAY (disable Nagle’s algorithm).
tcp.keep-alive
BOOLEAN
false
Enable SO_KEEPALIVE.
tcp.send-buffer-size
INT
81920
Send buffer size in bytes. 0 uses system default.
tcp.receive-buffer-size
INT
81920
Receive buffer size in bytes. 0 uses system default.
tcp.local-address
STRING
Local address to bind to (optional). If not set, uses default.
tcp.local-port
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 |
|---|---|
STATUS | Processor status file. |
BIT | Bit file. |
TIMER | Timer file. |
COUNTER | Counter file. |
CONTROL | Control file. |
INTEGER | Integer file. |
FLOAT | Floating-point file. |
OUTPUT | Output file. |
INPUT | Input file. |
STRING | String file. |
ASCII | ASCII file. |
BCD | Binary-coded decimal file. |
WORD | Custom 2-byte integer, read from an integer file. Fixed 2-byte size. |
DWORD | Custom 4-byte integer, read from an integer file. Fixed 4-byte size. |
SINGLEBIT | Custom single bit, read from an integer file. Fixed 2-byte size. |
Examples
N7:0:WORDElement 0 of integer file 7, read as a 2-byte WORD.
N7:5:DWORDElement 5 of integer file 7, read as a 4-byte DWORD.
N7:3:INTEGER[8]Element 3 of integer file 7, read as an INTEGER with an explicit 8-byte size.
N7:0/3:WORDBit 3 of element 0 in integer file 7, read as a WORD.
评论
登录后参与评论
KnowForge