Profinet¶
Warning
The Profinet protocol may require root permissions in some constellations. If you experience problems with running this protocol, please make sure to install your service on an agent with root permissions as described in agent orchestration.
Overview¶
Profinet (usually styled as PROFINET, as a portmanteau for Process Field Net) is an industry technical standard for data communication over Industrial Ethernet, designed for collecting data from, and controlling equipment in industrial systems, with a particular strength in delivering data under tight time constraints.
This protocol is optional and subject to license. It should be installed on demand.
Connection Properties¶
localInterface
(string, required)¶
Name of the interface providing cyclic profinet data
Example: "eth0"
gsdPath
(string)¶
Path to a directory containing GSD files
Default: "/app/src/protocols/profinet/gsd"
Example: "/app/src/protocols/profinet/gsd"
configPath
(string)¶
Path to a directory containing config files
Default: "/app/src/protocols/profinet/config"
Example: "/app/src/protocols/profinet/config"
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¶
deviceName
(string, required)¶
Name of the Profinet Device
Example: "egl-90"
api
(integer, required)¶
Integer number describing identifying the application process
Default: 0
Example: 0
slot
(integer, required)¶
Slot number
Example: 1
subSlot
(integer, required)¶
Sub-Slot number
Example: 0
propertyName
(string)¶
Name of the property to read as defined in the GSD file
Example: "actual value"
propertyIndex
(integer)¶
Index of the property as defined in the GSD file
Example: 0
Sample commissioning file¶
Download: profinet-example.yml
1---
2description: >
3 Sample Profinet commissioning file
4
5metadata:
6 name: Profinet example
7 icon: https://www.cybus.io/wp-content/uploads/2017/10/for-whom1.svg
8 provider: cybus
9 homepage: https://www.cybus.io
10 version: 1.0.0
11
12resources:
13 profinetConnection:
14 type: Cybus::Connection
15 properties:
16 protocol: Profinet
17 connection:
18 localInterface: 'eth0'
19 gsdPath: '/app/gsd-files' # These paths are referenced between the container
20 configPath: '/app/profinet-config'
21 connectionStrategy:
22 initialDelay: 1000
23 maxDelay: 30000
24 incrementFactor: 2
25
26 endpoint1:
27 type: Cybus::Endpoint
28 properties:
29 protocol: Profinet
30 connection: !ref profinetConnection
31 subscribe:
32 deviceName: 'netx52repns'
33 api: 0
34 slot: 0
35 subSlot: 0
36 propertyIndex: 0
37
38 mapping:
39 type: Cybus::Mapping
40 properties:
41 mappings:
42 - subscribe:
43 endpoint: !ref endpoint1
44 publish:
45 topic: 'netx52rens_output'
Output Format¶
The data will be written as a JSON object with a timestamp and a data member called value.
For example for the endpoint endpoint1, the output will be:
{
"timestamp": 1581932492902,
"value": [0, 1, 0, 0]
}