EtherNet/IP¶
EtherNet/IP is an industrial network protocol that adapts the Common Industrial Protocol to standard Ethernet. EtherNet/IP is one of the leading industrial protocols in the United States and is widely used in a range of industries including factory, hybrid and process.
Connection Properties¶
host
(string, required)¶
The hostname or IP address of the controller
scanRate
(integer)¶
During normal operation, this setting specifies the time interval for scanning for tag changes at the controller (in milliseconds)
Default: 200
scanRetryDelay
(integer)¶
On errors during scanning, this setting specifies the time interval until the next scan attempt (in milliseconds)
Default: 2000
connectionStrategy
(object)¶
If a connection attempt fails, retries will be performed with increasing delay (waiting time) in between. The following parameters control how these delays behave.
Properties of the connectionStrategy
object:
initialDelay
(integer)¶
Delay (waiting time) of the first connection retry (in milliseconds). For subsequent retries, the delay will be increased according to the parameter incrementFactor which has a default value of 2.
Default: 1000
Additional restrictions:
Minimum:
1000
maxDelay
(integer)¶
Maximum delay (waiting time) to wait until the next retry (in milliseconds). The delay (waiting time) for any subsequent connection retry will not be larger than this value. Must be strictly greater than initialDelay.
Default: 30000
incrementFactor
(integer)¶
The factor used to increment initialDelay up to maxDelay. For example if initialDelay is set to 1000 and maxDelay to 5000 the values for the delay would be 1000, 2000, 4000, 5000.
Default: 2
Additional restrictions:
Minimum:
2
Endpoint Properties¶
tagName
(string, required)¶
The name of the tag
Examples: "contTag"
, "Program:prog.progTag"
, "arrayTag[0]"
,
"arrayTag[0,1,2]"
, "integerTag.0"
programName
(string,null)¶
The name of the program. If this property is not set (and is null), the global program will be used.
Default: null
tagType
(string, enum)¶
The type of the tag
This element must be one of the following enum values:
SINT
INT
DINT
REAL
BOOL
Input Format on Write¶
When writing data, a JSON object with the following structure should be sent to a write Endpoint (/set
):
{
"id": "<correlation id>",
"value": "<value>"
}
Output Format on Write¶
When writing data, the result of the operation will be published to a /res
topic with the following structure:
{
"id": "<correlation id>",
"timestamp": "<msSinceEpoch>",
"result": "<result>"
}
Output Format on Read¶
When data is read from a read Endpoint (/req
) the following JSON is returned as a response in a /res
topic:
{
"id": "<correlation id>",
"timestamp": "<msSinceEpoch>",
"value": "<value>",
}
Output Format on Subscribe¶
When data is read by means of a subscription Endpoint, the following JSON is returned as response:
{
"id": "<correlation id>",
"timestamp": "<msSinceEpoch>",
"oldValue": "<old value>",
"value": "<value>"
}
Sample Commissioning file:¶
Download: ethernetIp-example.yml
1 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | description: > Sample EtherNet/IP service commissioning file metadata: name: Sample EtherNet/IP service icon: https://www.cybus.io/wp-content/uploads/2017/10/for-whom1.svg provider: cybus homepage: https://www.cybus.io version: 1.0.0 parameters: host: type: string default: 127.0.0.1 initialReconnectDelay: type: integer default: 1000 maxReconnectDelay: type: integer default: 30000 factorReconnectDelay: type: integer default: 2 resources: ethernetIpConnection: type: Cybus::Connection properties: protocol: EthernetIp connection: host: !ref host connectionStrategy: initialDelay: !ref initialReconnectDelay maxDelay: !ref maxReconnectDelay incrementFactor: !ref factorReconnectDelay sampleSubscription: type: Cybus::Endpoint properties: protocol: EthernetIp connection: !ref ethernetIpConnection subscribe: tagName: dn_count programName: SimulationMain sampleRead: type: Cybus::Endpoint properties: protocol: EthernetIp connection: !ref ethernetIpConnection subscribe: tagName: dn_count programName: SimulationMain sampleWrite: type: Cybus::Endpoint properties: protocol: EthernetIp connection: !ref ethernetIpConnection subscribe: tagName: dn_count programName: SimulationMain tagType: DINT |