TM950-ENG POWERLINK Configuration and Diagnostics V2000 AS4B
TM950-ENG POWERLINK Configuration and Diagnostics V2000 AS4B
POWERLINK
configuration and
diagnostics
2 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Requirements
TM210 - Working with Automation Studio
Training modules TM213 - Automation Runtime
Table of contents
1 Introduction......................................................................................................................................................... 4
1.1 Learning objectives.............................................................................................................................. 5
1.2 Safety notices and symbols...............................................................................................................5
2 POWERLINK - Introduction...............................................................................................................................6
2.1 Industrial Ethernet............................................................................................................................... 6
2.2 POWERLINK........................................................................................................................................... 6
3 POWERLINK – Technology................................................................................................................................9
3.1 POWERLINK in the OSI model........................................................................................................... 9
3.2 Data link layer..................................................................................................................................... 10
3.3 CANopen application interface....................................................................................................... 15
3.4 Network management (NMT)......................................................................................................... 25
4 POWERLINK – Diagnostics.............................................................................................................................29
4.1 Diagnostics tools............................................................................................................................... 29
4.2 Startup behavior of a POWERLINK node...................................................................................... 39
4.3 Diagnostics strategy........................................................................................................................ 44
5 POWERLINK - Design and optimization......................................................................................................46
5.1 Network design and timing performance.................................................................................... 46
5.2 Automation Studio settings for network timing........................................................................ 53
5.3 Mapping in Automation Studio...................................................................................................... 56
5.4 Optimization options in Automation Studio............................................................................... 57
6 POWERLINK - Third-party device support..................................................................................................66
6.1 XDD - Device description file.......................................................................................................... 66
6.2 Device description file for modular devices................................................................................ 67
6.3 XDD application example: openPOWERLINK MN........................................................................68
6.4 Examples of non-B&R MNs:.............................................................................................................68
7 Summary............................................................................................................................................................ 69
8 Appendix – Solutions to the exercises........................................................................................................70
4 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
1 Introduction
When it comes to fieldbus technology, B&R relies heavily on the real-time, Ethernet-based POWERLINK network to
handle the highest demands on timing and data throughput. Automation Studio makes it easy to use this technology
in the field. In order to take advantage of all of the possibilities offered by the POWERLINK communication protocol
and ensure it is used correctly, it is important to learn as much as possible about the design, configuration and trou-
bleshooting options presented by this technology. This training module is designed to provide this information in the
form of extensive theory and practical examples that will offer a much deeper look into what comprises POWERLINK
technology.
This training module will explain the many different POWERLINK configuration and optimization options available in
Automation Studio and their effects on the overall system. It will also introduce a range of powerful tools for trou-
bleshooting errors on a POWERLINK network.
INTRODUCTION 5
This training module uses selected examples illustrating typical application tasks to help participants learn how POW-
ERLINK technology works and how it is applied in Automation Studio. It also presents the various options for diagnos-
ing errors and explains how to integrate 3rd-party devices.
Learning objectives and contents of this training module:
■ Participants will learn the basics of POWERLINK technology.
■ Participants will become familiar with the "CANopen" application interface for POWERLINK.
■ Participants will learn how to use service and diagnostics options.
■ Participants will learn how POWERLINK functions and is displayed in Automation Studio.
■ Participants will learn how to use the POWERLINK library in Automation Studio.
■ Participants will learn the meaning of the parameters for setting up networks.
■ Participants will learn about the possibilities for optimizing the POWERLINK network in Automation Studio.
■ Participants will learn how to integrate 3rd-party devices using a device description file (XDD).
The meaning and usage of safety notices and symbols is described in the main module "TM210 – Working with Au-
tomation Studio".
Special notes on this manual
Help: Unless otherwise mentioned, this note type always refers to Automation Help.
6 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
2 POWERLINK - Introduction
POWERLINK is an Ethernet-based, real-time capable network protocol. It builds upon the physical and media access
control layers defined in the IEEE 802.3 standard and allows for deterministic transmission of payload data in the
microsecond range. Since POWERLINK builds upon the Ethernet standard without violating it in any way, it can be
implemented on any new or existing hardware/software platform.
POWERLINK is primarily used to transfer process data in automation systems.
Communication between the machines and components that make up an automation system takes place over fieldbus
networks. These are generally serial (RS485) or CAN-based systems with additional media access control and applica-
tion layers.
These types of conventional fieldbuses are, for example:
■ CANopen
■ PROFIBUS
■ DeviceNet
With more and more applications exceeding the performance capabilities of these serial and CAN-based systems,
the need for an alternative became increasingly urgent. With its widespread use in IT systems and 30-year history
of ongoing development, as well as interference-resistant cables ideal for harsh industrial environments, Ethernet
technology presented the ideal solution.
In the ISO OSI model1 (see 3.1 "POWERLINK in the OSI model"), the Ethernet standard describes layers 1 and 2, i.e.
the physical and media access control layers. The CSMA/CD2 method used here is ideal for a decentralized network
structure, but does not provide deterministic transmission. Deterministic transmission is an essential requirement
for industrial applications (particularly in control and positioning applications).
One way to prevent collisions on the network is using switches, which provide a separate bus segment for each sta-
tion. The disadvantage of this approach is that it increases the transmission delay of payload data. Especially short
throughput times in industrial applications, however, are more important than the actual data throughput.
It is also possible to use a request/response method. This approach defines a single network station that will manage
media access. In this scenario, all other stations are only permitted to send data after receiving permission.
2.2 POWERLINK
To solve the problem of deterministic transmission, POWERLINK uses a request/response, or "polling" approach. One
node3 – known as the master, or managing node (MN) – controls access to the network. The slaves, or controlled nodes
1 Open Systems Interconnection Model
(CNs), follow the commands of the managing node and only transmit data upon request from the managing node.
This eliminates collisions4 and provides a basis for real-time capability.
Standardization
POWERLINK is an open real-time Ethernet protocol, which means both the specification and an implementation –
known as a "protocol stack" or simply "stack" – are freely available. There are no licensing fees required. The licensing
model for the stack is a BSD5license, which provides the maximum amount of freedom. Development and maintenance
of the POWERLINK specification6 is handled by the Ethernet POWERLINK Standardization Group (EPSG). For more in-
formation, see www.ethernet-powerlink.org.
POWERLINK is both an IEC and IEEE standard as well as a Chinese national standard for communication technolo-
gy:
4 IEC 61784-2: Industrial communication networks - Profiles - Part 2: Additional fieldbus profiles for real-time net-
works based on ISO/IEC 8802-3.
4 IEC 61158: Industrial communication networks - Fieldbus specifications
4 IEEE 61158-2017: IEEE standard for industrial hard real-time communication
4 GB/T 27960-2011: Ethernet POWERLINK communication profile specification
5 Berkeley Software Distribution; open source license with no reciprocal obligation to disclose source code
6 www.ethernet-powerlink.org / Downloads / Technical Documents / EPSG DS 301 V1.x.x - Communication Profile Specification
8 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
7 Value achieved in established MN implementations (e.g. by B&R). The theoretical limit is lower, and is not defined in the specification.
3 POWERLINK – Technology
3.1 POWERLINK in the OSI model
The OSI model is a standardized conceptual model of an open information processing system. The most significant
manufacturer-independent transfer protocols commonly used today are based on this model. It groups the internal
functions of a communication system into seven layers. Each layer builds upon the layer below it and represents an
instance that performs its task according to specific rules. These rules are defined by protocols, which may span mul-
tiple layers.
Layer 1, the physical layer, describes the electrical, mechanical and functional interfaces to the physical transmission
medium. The next layer above it, the data link layer, provides a reliable link between two directly connected nodes by
detecting errors that may occur in the physical layer. These two layers are often referred to collectively as "the physical
layers".
Layers 3 and 4 above them are known collectively as "the transmission layers". Layer 3, the network layer, controls the
logic and timing of data transmission. Layer 4, the transport layer, segments the data and allocates it to the applica-
tions.
Layers 5 (session layer), 6 (presentation layer) and 7 (application layer) are referred to collectively as "the application
layers" since all programs and applications access them directly. As explained above, Ethernet only defines the physical
and data link layers. Protocols that do not access the same layers can be used in combination – like POWERLINK and
CANopen.
POWERLINK specifies the data link layer and the layers above it, while CANopen deals exclusively with
the application layers.
The POWERLINK data link layer (DLL) defines the mechanism for network access. Network nodes, so-called POWERLINK
nodes, are only permitted to send data at defined times. Network access is managed by a dedicated node, called the
managing node (MN). A POWERLINK network always has exactly one active managing node (MN). The MN can manage
up to 239 controlled nodes (CNs).
The POWERLINK cycle is divided into an isochronous and an asynchronous phase. In the isochronous phase, process
data from the network nodes is transferred cyclically. The asynchronous phase allows the exchange of acyclic data
between two or more nodes. This phase is used for network management, configuration, diagnostics and non-time-
critical data queries. It also allows for the transfer of any non-POWERLINK frames (e.g. IP-based data such as websites).
PReq Poll request MN The MN sends this frame along with the payload to each CN.
PRes Poll response CN/MN A CN sends a poll response with real-time data as a response to a
poll request.
SoA Start of asynchro- MN Marks the end of cyclic data communication and thus the start of
nous asynchronous communication and assigns transmission permis-
sions for asynchronous communication.
ASnd Asynchronous send CN/MN This frame transports asynchronous (non-real-time) data.
AMNI* Active Managing MN In networks with redundant masters, a MN uses this frame to indi-
Node Indication, cate that it is switching from passive to active mode to take over for
used by EPSG DS302- a failed MN.
A
*) These frame types are only included in the table for the sake of completeness. They are not shown in the image
above because they represent optional POWERLINK extensions.
The structure of a POWERLINK frame is shown in the image below (Fig. 5). The individual layers (from the OSI model)
encapsulate each other. A higher layer is always embedded in the payload data of the layer below it.
A POWERLINK frame is identified as such by value "0x88AB" in field "Ethertype" in the Ethernet frame header10 .
In the isochronous phase the network stations exchange data cyclically. This is where real-time data traffic occurs.
Cycle time
The isochronous phase is initiated by the MN. The MN sends the Start of Cyclic (SoC) frame to all network stations.
The SoC is also used to synchronize the network. In a fully synchronized network, this frame activates the last received
output data and triggers sampling of input data. The SoC is sent as a multicast frame11. The cycle time is the time
between SoC frames sent by the MN.
11 Type of frame that is received simultaneously by an entire group of nodes (all POWERLINK nodes)
12 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
t Cycle t Cycle
Figure 6: The MN determines the cycle time by sending the SoC frame.
Direct cross-traffic
The poll request (PReq) and poll response (PRes) frames are also sent in the isochronous phase. PReq is a unicast
frame containing the MN's real-time data, generated only by the MN and sent to a specific CN. The respective CN must
respond to a received PReq with a PRes. The PRes contains the CN's real-time data. Since the PRes is defined as a
multicast frame, the CN's real-time data is distributed throughout the entire network. This makes it possible for a CN
to read data from another CN (in the PRes frame) directly from the network. Since this type of communication occurs
directly, without passing through the MN, it is called direct cross-traffic.
Completing data transfer in one cycle makes it possible to achieve the lowest possible latency in CN-to-
CN communication.
One application of cross-traffic is for electronic axis synchronization.
The benefits of poll response chaining are primarily due to the elimination of one PReq frame per station.
This optimization is used in central closed-loop control systems where small volumes of data are trans-
ferred, e.g. in CNC systems (position control).
Multiplexing
To optimize the cycle time and better represent the real application in the network, nodes can also be operated in
multiplexing mode. This means that each CN is only addressed by the MN in every nth cycle.
Multiplexing prescale
1 2 3 4 5 1 2 3 6 7 1 2 3 8 1 2 3 4 5
Standard: 1, 2, 3 Multiplexed: 4 - 8
Time
Advantages of multiplexing
■ Optimizes the use of bandwidth
■ More cyclic nodes possible (without increasing cycle time)
■ Shortens the minimum required POWERLINK cycle time (with same number of nodes)
Multiplexing can increase the maximum number of stations that are possible within one POWERLINK
cycle. Since multiplexing nodes can read PRes frames from other nodes at any time, a combination of
multiplexing and cross-communication can result in highly optimized solutions.
This optimization is used when transmitting status and configuration data (e.g. temperature measure-
ment) used in slow control algorithms.
A CN can be operated in "Standard" (PReq/PRes in every cycle), "Multiplexed" or "Poll Response Chaining"
mode. "Multiplexed Chaining" mode is not an option, i.e. it is not possible to set both modes at once.
The asynchronous phase follows immediately after the isochronous phase (see Fig. 4). The MN initiates this phase by
sending the Start of Asynchronous (SoA) frame. Like the SoC, the SoA is also a multicast frame. In this frame, the MN
grants transfer permission to any station13 in the network (Fig. 10). The selected node may now send either asynchro-
nous POWERLINK data (ASnd) or an Ethernet frame of some sort (e.g. IP data). It is up to the node whether it is sent
as a unicast, multicast or broadcast frame.
The MN grants prioritized transfer permission based on previous access requests from network stations. These re-
quests to the MN can be contained in both asynchronous (ASnd) and cyclic (PRes) frames.
The asynchronous phase makes "hot plugging" possible, allowing CNs to be added to the network without affecting
its real-time behavior.
MN POWERLINK Cycle
Asynchronous phase
CN
When the goal is to optimize the throughput of non-real-time data on a POWERLINK network, multiple
asynchronous send is used.
This optimization is used, for example, when transmitting image data that requires a large amount of
bandwidth.
-The POWERLINK application interface is based on CANopen14. Therefore, POWERLINK can also be referred to as
"CANopen over Ethernet". Although calling it this oversimplifies matters somewhat and fails to highlight POWERLINK's
real-time capabilities, it does capture the fundamental nature of the communication system.
This section describes the structure of the CANopen interface and explains how it is used to establish a data connec-
tion between POWERLINK nodes.
The structure of the CANopen application interface uses an object dictionary (OD). The object dictionary consists of
a group of predefined, numbered objects with various functions.
Objects
Properties of an object:
■ An object can be viewed as a type of container. This container can simply hold data that can be read and written,
or it can possess additional functionality, so that access triggers a predefined action.
■ An object can be addressed via a unique 16-bit index.
■ An object can contain up to 256 subobjects, each addressed via an 8-bit subindex.
■ An object is defined by a number of parameters, including access rights, data type and type of data transfer.
14 Due to the differences in the physical layer and the fixed real-time behavior of POWERLINK compared to CAN bus physics, there are minor differences between CANopen and
POWERLINK.
16 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Name NMT_CycleTiming_REC
Category 15.
Subindex 0x03
Name PResMaxLatency_U32
Table 4: "Object dictionary structure" from EPSG DS 301 V1.x.x - Communication Profile Specification
Application data that is transferred cyclically or acyclically is found the object range ≥ 0x2000.
16 const: Constant; value can only be read and does not change.
POWERLINK – TECHNOLOGY 17
Device profiles
Object groups in the range ≥ 0x6000 have been predefined in order to provide a consistent, vendor-independent in-
terface for specific device types (see Tab. 4). A group of objects dedicated to a specific device type is called a device
profile. Some examples include rotary encoders, frequency inverters and valve controllers.
It is not absolutely necessary to use one of these standard interfaces, but for components that are not permanently
integrated in an overall system it is recommended.
Standardized device profiles are provided by the user organization CAN in Automation (CiA)17. This orga-
nization also assigns each device a CANopen Vendor IDT18.
The Ethernet POWERLINK Standardization Group (EPSG)19 can also assign a (CANopen) vendor ID. How-
ever, this is then only permitted be used for POWERLINK devices.
The Service Data Object protocol can provide asynchronous access to objects. The object dictionary of a POWERLINK
node can be accessed from any other node using the SDO protocol as long as the object exists and access is permitted.
The SDO protocol operates according to the server/client principle. The client reads/writes data stored on the server.
Usage Example
Non-cyclic data access Transferring object data ≥ 0x2000 in the asynchronous phase (ASnd
frame)
17 www.can-cia.org
19 www.ethernet-powerlink.org
18 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
The server20 contains e.g. data in object 0x1C0B/0x01. Another POWERLINK node (SDO client) can access
this data by sending an SDO read command (containing the index and subindex) to the SDO server. The
server answers with an SDO response containing the data from object 0x1C0B/0x01 (in example 0x06).
SDO communication occurs in the asynchronous phase, i.e. the SDO frame is embedded in the ASnd
frame.
SDO read or write commands can also be bundled21 to send multiple read or write commands in a single
ASnd frame. This can increase the throughput of SDO communication.
Cyclically transferred process data objects are embedded in PDO frames. A PDO frame can contain one or more objects
and their data.
Transfer PDO properties:
■ PDO frames transferred cyclically, i.e. time-based not event-based
■ PDO frames are sent as user data in the PRes or PReq frame (see "POWERLINK Payload" in Fig. 5 "POWERLINK
frame structure")
■ Producer-consumer principle:
■ Every node can produce object data for the network in the form of PDO frames.
■ One or more other nodes can read this PDO frame in the same cycle.
■ There is no direct connection between any two nodes.
3.3.4 Mapping
How does user data get from the network (from a PDO frame) into a process variable22 and vice versa?
The answer to this question is summarized as the term "mapping". Mapping functionality is derived from POWERLINK's
CANopen application layer.
Mapping is the process of assigning cyclic network data to a specific node's objects (and their respective
data points / process variables). To exchange cyclic data between two nodes, then, mapping (as well as
source and target objects) is required independently on both the transmitter and receiver ends.
With POWERLINK, mapping occurs in mapping objects.
Mapping objects
Mapping is defined by objects contained, like all other objects, in a bus station's object dictionary. Mapping objects
can be found on both the MN and CNs.
The object dictionary has a range dedicated specifically to mapping.
Object area Object name Contents
RPDO23 0x1400 to 0x14FF RPDO communication parameter Mapping version and source ad-
dressing
TPDO24 0x1800 to 0x18FF TPDO communication parameter Mapping version and target ad-
dressing
RPDO and TPDO mapping always require a corresponding pair of communication and mapping parameters (see Tab.
6) that provides the network all the necessary information about the object data link. This pair is always identified by
the last two characters in the index number.
Example for PDO mapping object pairs (see Tab. 6):
■ RPDO: 0x1401 and 0x1601
■ TPDO: 0x1800 and 0x1A00
22 In this training module, "process variable" refers to application variables that are refreshed cyclically via POWERLINK.
PDO mapping does not create a direct data link between two nodes, but rather describes the correlation
between a data block in the PDO frame (i.e. network) and a source/target object (i.e. application data
point). This source/target object is also found in the object dictionary, just in a different range (≥ 0x2000)
than the PDO mapping objects.
Information about how PDO data is to be interpreted is not transferred along with the PDO data, but is
contained in the object dictionary.
MN CN
Application engineers Application engineers
(PLC processing) (PLC processing)
OD OD
Manufacturer- and Manufacturer- and
device-specific device-specific
objects objects
0x2000 0x2000
… …
PReq
TPDO RPDO
OD PRes MN OD
Mapping objects Mapping objects
... Copy Copy ...
0x14xx according to POWERLINK according to 0x14xx
0x16xx mapping mapping 0x16xx
0x18xx 0x18xx
0x1Axx RPDO PRes TPDO 0x1Axx
… …
Figure 13: The content of mapping objects defines correlation between network and application
These steps represent a pattern that can be applied to the examples below with the same numbering.
Payload [U16]
Network
header TPDO Frame CRC
PRes
Questions 1 through 3 determine the content of the mapping objects for the rotary encoder. According to the POW-
ERLINK specification for CNs, the answer to Question 1 is always a target node ID of 0x00. The content of object
0x1A00/0x01 is composed of the answers to Questions 2 and 3. Objects 0x1800 and 0x1A00 form a pair that represents
a unique description of the TPDO - see Tab. 6 "Object range for PDO mapping objects." on page 19.
Result of question Object Contents Meaning
no.
1 0x1800/0x01 0x00 Target NodeID: Always 0 for
CN
Length in bits Offset in bits Reserved Subindex source ob- Index source object
ject
Payload [U16]
Network
header RPDO Frame CRC
PRes
The answers to questions 1 through 3 determine the content of the mapping objects for the MN. A 0x16xx subobject
in the MN's object dictionary defines how it is to interpret the RPDO data - see Tab. 6 "Object range for PDO mapping
objects." on page 19. The content of this subobject depends on the structure of the RPDO.
The CN that the MN receives data from is determined by the associated object (object pair) of 0x1600: PDO commu-
nication parameter 0x1400. The content of object 0x1400/0x01 reflects NodeID 1 of the rotary encoder since this is
the node from which the PDO is received.
Result of question Object Contents Meaning
no.
1 0x1400/0x01 0x01 Source NodeID: 1 (encoder)
Length in bits Offset in bits Reserved Subindex target ob- Index target object
ject
3.3.6 Mapping example: Rotary encoder sending position data directly to an X20
bus controller
1. Transfer direction: Rotary encoder (CN1) to network - Definition of TPDO mapping
Network
header TPDO Frame CRC
PRes
Questions 1 through 3 determine the content of the mapping objects for the rotary encoder.
Result of question Object Contents Meaning
no.
1 0x1800/0x01 0x00 Target NodeID: Always 0 for
CN
Length in bits Offset in bits Reserved Subindex source ob- Index source object
ject
Network
header RPDO Frame CRC
PRes
The answers to questions 1 through 3 determine the content of the mapping objects for the X20 bus controller (CN2).
A 0x16xx subobject in the X20 bus controller's object dictionary defines how it is to interpret the RPDO data - see Tab.
6 "Object range for PDO mapping objects." on page 19. The content of this subobject depends on the structure
of the RPDO.
The CN that the MN receives data from is determined by the associated object (object pair) of 0x1601: PDO communi-
cation parameter 0x1401. The content of object 0x1401/0x01 reflects NodeID 1 of the rotary encoder since this is the
node from which the PDO is received.
Result of question Object Contents Meaning
no.
1 0x1401/0x01 0x01 Source NodeID: 1 (encoder)
Length in bits Offset in bits Reserved Subindex target ob- Index target object
ject
3) How many object dictionaries are required for a cyclic data link with two nodes?
7) What could be the reason that object 0x1401 is used in the second mapping example rather than object 0x1400?
8) Object 0x1800/0xF0 contains the following value: 0x0030002000FF4000. What does this value mean?
POWERLINK – TECHNOLOGY 25
Additional information about the mapping can be found in the EPSG DS 301 V1.x.x - Communication Pro-
file Specification / Search for objects from Tab. 6 "Object range for PDO mapping objects." on page 19
The term "network management" (NMT) refers to all mechanisms used to query and modify the operating modes of
POWERLINK nodes. It also includes the identification of new nodes.
The MN is responsible for network management (NMT). The MN controls the states of the CNs by querying status
information and issuing NMT commands. Each node follows one of the nodes described in the "EPSG DS 301 V1.x.x -
Communication Profile Specification25 (see Fig. 18 "MN state machine" and CN state machine), which describes possi-
ble state transitions. For each node there is a defined startup sequence that ends in the OPERATIONAL state.
The OPERATIONAL state indicates successful configuration and integration in the POWERLINK network.
Only when this state has been achieved does the node begin exchanging valid cyclic data.
25 " www.ethernet-powerlink.org
26 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
NMT_GS_
INITIALIZATION
NMT_MS (NMT_MT1)
NMT MN state machine auto
[NodeID ==C_ADR_MN_DEF_NODE _ID]
NMT_MS_EPL_MODE
(NMT_MT2)
Timeout (SoC, SoA)
[NMT_StartUp_U32.bit 13 == 0]
NMT_MS_ (NMT_MT6)
PRE_OPERATIONAL_1 Error condition
(NMT_MT3)
auto
NMT_MS_
PRE_OPERATIONAL_2
(NMT_MT4)
auto
NMT_MS_
READY_TO_OPERATE
( NMT_MT5)
auto
NMT_MS_
OPERATIONAL
Type of communication
POWERLINK POWERLINK cycle
No communication Legacy Ethernet
Listen only Reduced cycle (SoC PReq PRes
(IP and others)
(SoA ASnd) SoA Asnd)
NMT_GS_
INITIALIZATION
NMT_CS
NMT CN state machine
(NMT_CT1)
auto,
[NodeID !=
(NMT_CT3)
C_ADR_MN_DEF _NODE _ID ]
Timeout
(SoA,SoC ,PReq,PRes )
NMT_CS_
BASIC _Ethernet NMT_CS_
NOT_ACTIVE
(NMT_CT12)
SoA ,SoC,PReq,PRes
(NMT_CT2)
SoA ,SoC
NMT_CS_EPL_MODE
NMT_CS_ (NMT_CT11)
PRE_OPERATIONAL _1 Error condition
(NMT_CT4)
(NMT_CT5)
SoC
NMT
EnableReadyToOperate
NMT_CS_
PRE_OPERATIONAL _2
(NMT_CT10)
NMT
(NMT_CT6)
auto EnterPreoperational 2
NMT_CS _
READY_TO_OPERATE
(NMT_CT9)
( NMT_CT7)
NMT
NMT
EnterPreoperational 2
StartNode
NMT_CS _
OPERATIONAL
(NMT_CT8)
NMT_CS _
NMT
STOPPED
StopNode
Type of communication
How startup of a POWERLINK network can be carried out step-by-step is shown as an example in Fig. 20 "Startup
procedure for a CN"26. This illustrates the state transitions of a CN (see Fig. 19 "CN state machine") as triggered by:
■ A received POWERLINK frame (SoA, SoC), i.e. status change to:
- NMT_CS_PREOPERATIONAL_1
- NMT_CS_PREOPERATIONAL_2
■ An NMT command directly addressed to the CN (contained in an ASnd frame)
- NMTEnableReadyToOperate: Change to NMT_CS_READY_TO_OPERATE
- NMTStartNode: Change to NMT_CS_OPERATIONAL
MN CN
NMT_GS_POWERED
NMT_GS_INITIALIZING
NMT_GS_RESET_APPLICATION
NMT_GS_RESET_CONFIGURATION
NMT_CS_PRE_OPERATIONAL _1
*
SDO communication [Server]
SoA (R. ServiceID : IdentRequest ) SoA
BOOT_STEP1 E_OK
NMT_MS_PRE_OPERATIONAL _2
NMT_CS_PRE_OPERATIONAL _2
BOOT_STEP2 E_OK
NMT_MS_READY_TO_OPERATE
CHECK_COMMUNICATION E _OK
NMT_MS_OPERATIONAL
Operational
4 POWERLINK – Diagnostics
4.1 Diagnostics tools
Often it is no simple task to figure out why a machine won't start – or even worse, why it stopped working in the middle
of a process. When it comes to pinpointing the source of a malfunction as quickly as possible, there's no substitute for
powerful diagnostics tools and the knowledge of how to use them. These tools are presented in the following sections.
Automation Studio is the first place to go to identify malfunctions in a POWERLINK network. The status data points
and the logger provide a quick initial diagnosis.
ModuleOK
The I/O mapping contains a data point called "ModuleOK"27. For POWERLINK nodes (e.g. X20 bus controller) it is set
to TRUE, as long as:
■ The CN is in the state OPERATIONAL
■ The RD flag in the CN's PRes frame has the value "1".
This means that if the frame contains PDO data, then it is valid.
Module supervised
By default, the MN monitors the Automation Studio hardware configuration for any nodes added to the POWERLINK
network. This can be configured on the CN28 using the "Module Supervised" option. When "Module Supervised = On",
the PLC will enter service mode if the respective CN fails.
Logger
Any network errors detected by the MN, such as problems with SDO communication, are also entered in the logger.
Figure 23: Logger reports a failed SDO write access to an object of CN1 (IF3.ST1).
27 If "ModuleOK" is set to FALSE, then the node is either not in the OPERATIONAL state or its data is invalid – it does not necessarily mean that there is anything wrong with the
module itself.
28 The same setting is available for individual X20 modules and has the same effect.
30 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
To look up the meaning of the error codes, you can either select the error in the logger and press F1, or navigate to
the corresponding section of Automation Help:
Figure 25: Diagnostic data points for the X20BC0083 in the I/O mapping window
(monitor mode)
The Ethernet connection and corresponding cabling of POWERLINK stations can be monitored using the
predefined diagnostics data points for B&R devices – either from the MN or from Automation Studio.
This speeds up the process of pinpointing the source of errors at a hardware level.
Further information
For more information about the features described here, as well as additional diagnostic options, consult Automation
Help:
The following training modules provide helpful information about diagnostics in general (independently of POWER-
LINK):
■ TM920 – Diagnostics and Service for End Users (independently of Automation Studio)
■ TM223 - Automation Studio diagnostics
Exercise: Create an Automation Studio project based on the hardware in the ETAL950 cube.
In the following exercise, a project will be created that will later be used to illustrate various concepts.
1) Create an Automation Studio project and name it "POWERLINK_ETA" (to be used later) with the following hard-
ware configuration:
2) Create a program named "CopyAItoAO" as shown in Tab. 18 "ANSI C program "CopyAItoAO"" on page 59 with
the corresponding variable declaration (local, same data type as individual analog channel, i.e. "INT").
29 Not all nodes support all of the objects (i.e. optional objects) specified in "EPSG DS 301 V1.x.x - Communication Profile Specification".
32 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
4) Map the variables of the "CopyAItoAO" program to the AI and AO modules as shown in Fig. 48 "CN to CN connec-
tion via the MN" on page 59.
5) Set up a direct CN-to-CN connection of CN1 data point "AnalogInput01" and CN2 data point "AnalogOutput01",
as shown in Fig. 49 "Direct CN to CN connection" on page 60. This connection is referred to as cross-traffic or
"crosslink" and doesn't require any user variables or programs on the PLC.
See references to Automation Help provided in section 5.4.1.3 "Direct cross-traffic" on page 58.
The ETA cube's control panel behaves as described in Tab. 19 "Description of POWERLINK ETA test system
functions" on page 61. Turning a potentiometer (P1, P2) changes the value of the 7-segment display
from 0 to 9.9. P1 modifies the left display, and P2 the right display.
3) Modify the eplCyclic.st file for the sample implementation. In the step EPL_READ_OE, change the following lines
(changes in red):
epl.fub.EplSDORead_0.enable := 1;
(*enable the FUB*)
epl.fub.EplSDORead_0.pDevice := ADR('IF3');
(*Device Name of Powerlink interface*)
epl.fub.EplSDORead_0.node := 2;
(*Node Number of the Station to be read*)
epl.fub.EplSDORead_0.index := 16#1C0B;
(*Read Index 16#1C0B : CNLoss SoC*)
epl.fub.EplSDORead_0.subindex := 1;
(*Subindex 1 is the CumulativeCnt_U32*)
epl.fub.EplSDORead_0.pData := ADR(epl.para.readData);
(*Pointer to the variable for the read Data*)
epl.fub.EplSDORead_0.datalen := SIZEOF(epl.para.readData);
(*Length of the Data to be read*)
4) Transfer project to the PLC30
8) The value read from bus controller object 0x1C0B/0x0131, which counts the number of lost SoC frames, appears
in "epl.para.readData".
9) Cause a brief interruption of POWERLINK communication on Node 232 (i.e. disconnect/reconnect Ethernet cable).
11) Open System Diagnostics Manager and check the status variables33 of the X20BC0083 module with NodeID 2:
One of the error counters (EthPhyXLinkLoss) should match the exact number of interruptions.
Nevertheless, this counter is only conditionally comparable with the 0x1C0B/0x01 object, which doesn't count
the number of connection interruptions, but the number of failed SoC frames. Both counters are incremented in
the event of interruption, however.
The CN has an internal time monitor of received SoC frames. When a frame is lost, the value of the
0x1C0B/0x01 object is incremented. The MN can read this value using the SDO protocol (3.3.2 "Service
Data Objects (SDO)" on page 17).
Reading error counter objects like this (see "SDO library - AsEPL" on page 30) can also help identify
sporadic interruptions of the Ethernet connection and localize them using the node number.
B&R devices offer additional error counters34, that are very helpful for diagnosing physical network con-
nections (Ethernet cable and connections). These counters can be read automatically via SDO and viewed
in Automation Studio or System Diagnostics Manager.
Additional diagnostics options are available in the form of external diagnostic tools. Since POWERLINK is based on
standard Ethernet, all Ethernet-based network diagnostics tools can be used. For diagnosis of difficult network prob-
lems, the following solutions have proven effective:
■ WireShark (free - GPL35): http://www.wireshark.org/
■ B&R Analyzer for Wireshark TM: At www.br-automation.com search for "Wireshark
32 Make sure that the node and its I/O modules are not supervised in Automation Studio (Module supervised = off).
33 see Fig. 25 "Diagnostic data points for the X20BC0083 in the I/O mapping window (monitor mode)" on page 30
34 Not all B&R devices provide these counters (see Automation Help under "Diagnostic data points").
35 GPL: General Public License; changes to the software must also be released under the GPL.
POWERLINK – DIAGNOSTICS 35
These programs allow you to log and analyze network traffic using a PC and a standard network card. Wireshark comes
with POWERLINK support. For additional analysis options, you can download a plug-in from the B&R website. Simply
search the B&R website for "Wireshark" and download the "B&R Analyzer for Wireshark TM" plug-in. This plug-in in-
cludes, among other things, logical analysis of network traffic with advanced statistics, as well as the possibility to
connect to hardware for accurate timestamps (X20ET8819).
In this manual, only the use of Wireshark will be discussed in detail.
4.1.5 Wireshark
This section provides an introduction to working with the "Wireshark" tool for capturing and analyzing network com-
munication.
Requirements for network recordings
It is a good idea to install a second Ethernet card in the PC that will be performing the capture, since the
primary one is generally needed for other purposes, such as connecting to the PLC.
To record data traffic, an Ethernet port on the PC performing the capture is connected directly to any station in the
POWERLINK network. Ideally this is done using the same type of cable36 that is used for the POWERLINK network itself.
The location on the network that the packets are captured has only a minor effect on the timing between the frames
(hub and tolerance times, etc.) and no effect on their order.
All protocols (TCP/IP, Windows networks, etc.) should be deactivated in the control panel on the PC per-
forming the capture to prevent unwanted packets from disturbing the POWERLINK network.
Exception: The Npcap Packet driver (NPCAP) must remain enabled; otherwise, the interface will not ap-
pear in Wireshark.
Most network cards have one or more LEDs to indicate the connection status and network activity. As soon as the
connection to an active POWERLINK network is established, these LEDs should light up accordingly.
If the PC fails to connect to the POWERLINK network, check the advanced settings of the PC's network
card. A hub can also be connected between the PC and the network, since the physical connection is
already properly preconfigured and does not require any settings to be changed.
Recommended network card settings:
■ Half-duplex
■ 100 Mbit/s transfer rate
■ Auto crossover (optional)
Wireshark installation
The download link to the latest version and information about the Wireshark installation can be found at:
• http://www.wireshark.org/
This opens the "Capture Interfaces" window, showing you the activity on the POWERLINK network. If the packets are
sorted correctly ("Time" column in ascending order) then the recurring POWERLINK cycle can be observed.
The precision of the timestamp is determined by the interaction between the operating system and net-
work card on the PC performing the capture. The level of precision is generally enough to show the frames
in the correct order, but not enough to represent the exact time that they were received.
To get a reliable timestamp in high resolution you need to use special network analysis equipment. These
tools are introduced in section 4.1.6 "Hardware-supported network analysis".
Filter application
Filters can be used to gain a more focused view of network activity, showing only specific frames or connections. A
distinction is made between two types:
POWERLINK – DIAGNOSTICS 37
■ Display filter: Only affects which frames of a currently running or saved capture are displayed.
■ Capture filter: Only packets that meet the criteria of the filter are captured. This can considerably reduce the size
of a saved capture. The capture filter uses a different syntax and should only be used by experts.
1) Open the Automation Studio project "POWERLINK_ETA"37 and transfer it to the PLC 38.
2) Connect the PC network card to any hub interface on the active POWERLINK network. The X20 bus controller also
has an internal hub (for two interfaces).
3) If you have problems connecting, consult section "Requirements for network recordings" on page 35 .
5) Switch off the CNs or the power supply to the POWERLINK nodes.
6) Starts the Wireshark capture – see "Starting a POWERLINK network recording" on page 36
If the PC's network card is configured correctly, then Wireshark can be used to capture all POWERLINK
network traffic to be analyzed in more detail.
37 Created in "Exercise: Create an Automation Studio project based on the hardware in the ETAL950 cube." on page 31
1) Apply the display filter shown in the image to the capture performed in the previous exercise. The filter ensures
the validity of the PDO data.
3) In the detailed view, right-click on the "Data" field below and select "Apply as column".
4) The new column should appear in the network capture list above.
5) Rename the new column to "PRes payload" by right-clicking on the column and selecting "Edit Column Details".
6) The column can only display values if the current capture does not contain a (dynamic) SDO mapping configu-
ration. To do this, restart the recording as soon as the controlled node is in the OPERATIONAL state in order to
then observe the data during operation - i.e. no stored recordings as previously.
7) Manipulate a DI from a DI module with an attached switch and observe the manipulation in Automation Studio
(or SDM).
8) The same modification must also be visible in the CN2's "PRes payload" in Wireshark. Follow the continuous trace
in Wireshark by activating the automatic scroll function with "Go / Auto Scroll in Live Capture" or by clicking on
the button shown below. Section "Filter application" on page 36 may be helpful here. Recommended filter:
"epl.src == 2 && epl.pres"
POWERLINK transmits payload data in Little Endian format. Keep this in mind when interpreting SDO
and PDO payload data in the Wireshark capture.
POWERLINK – DIAGNOSTICS 39
From the detailed view of a received frame in Wireshark, it is easy to create new columns to view addi-
tional information.
These tools are introduced here to round off the topic of hardware-based network analysis. More detailed
documentation and additional software requirements must be obtained from the respective manufac-
turer.
POWERLINK nodes follow a fixed scheme during startup, which - as described in 3.4 "Network management (NMT)"
on page 25 - is defined by their state machines. The green LED on a POWERLINK node indicates its current status. The
NodeID, or node number, gives the POWERLINK node a unique address. A misconfiguration has an effect right away.
For this reason, the NodeID is also a startup issue and is included in this section.
40 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Every POWERLINK device uses the same LED status/error indicators and corresponding blink codes. A general descrip-
tion of the LEDs and their behavior is provided in EPSG DS 301 V1.x.x - Communication Profile Specification.
1) Open the data sheet for the X20BC0083 module (Tab. 15 "X20BC0083 - Status LEDs" on page 40)
7) Switch off the MN or disconnect the CN from the network (same effect).
POWERLINK – DIAGNOSTICS 41
All in all, just a quick glance at the LED status indicators is needed to recognize which status the node is in.
These 3 cases should be distinguishable:
• Light on = OPERATIONAL (ready for use)
• Light blinking = PRE_OPERATIONAL_1, PRE_OPERATIONAL_2 or READY_TO_OPERATE (node is being
configured)
• Flickering = BASIC_ETHERNET (no connection to MN)
If the LED status indicators continue to blink, resort to more in-depth diagnostics (e.g. with Wireshark).
1) Open the X20CP1586 data sheet (go to www.br-automation.com and search for "X20CP1586")
Note: The blink codes behave largely the same as the ones for the X20BC0083.
2) Switch off the PLC and disconnect from the POWERLINK network.
4) Switch on MN again.
5) Compare your observations with the CN's "S/E" behavior in the previous exercise.
The "S/E" LED on the MN (PLC) behaves the same as the one on the CN. However, the MN starts up
independently, even without a network connection.
Different blink speeds indicate different POWERLINK states. With the exception of the BASIC_ETHERNET
state (rapid flickering), the following rule of thumb applies: The faster the blinking frequency, the higher
the state (LED on = OPERATIONAL). The state of the CN will always trail behind the state of the MN. In
other words, the CN can never be in a higher state than the MN.
1) Open the *.pcap file from "Exercise: Perform a network capture with Wireshark." on page 37
2) Apply and combine (logical operations using ==, !=, &&, ||) various display filters.
Meaning/Application Filters
Start up a CN with the node number <CN NodeID> (epl.src == <CN NodeID> || epl.dest == <CN
NodeID>) && (epl.asnd.svid || epl.pres.stat
>= 0x6d)
3) Use the search function (keyboard shortcut "CTRL+F") to find the recording of any character string in the high-
lighted text (e.g. an NMTReset command).
4) Find another filter for the NMT command "NMTEnableReadyToOperate" in the POWERLINK specification.
The specification can be downloaded from the B&R website under:
www.ethernet-powerlink.org / Downloads / Technical Documents / EPSG DS 301 V1.x.x - Communication Profile
Specification
5) Compare the startup sequence to Fig. 20 "Startup procedure for a CN" on page 28. Use a suitable filter from Tab.
16 to do this.
The startup sequence of a POWERLINK CN can be observed using Wireshark. If you are familiar with the
steps of the startup sequence, this method is ideal for troubleshooting a node that fails to reach the
OPERATIONAL state.
POWERLINK – DIAGNOSTICS 43
Every POWERLINK node has a node number, or NodeID, that uniquely identifies it in the POWERLINK segment. For easy
maintenance41 this number is generally set using two hexadecimal rotary switches.
The node number is applied when the station is switched on. Any modifications made after startup will
be applied after the next startup procedure. The position of the node number switches must match the
configuration of the respective POWERLINK node in Automation Studio.
0x01 - 0xEF Node number of the POWERLINK station. Operation as a controlled node (CN).
NodeID 240 (0xF0) is a special case. This node number is reserved for the managing node (MN).
The range 1 to 239 (0x01 - 0xEF) is available for CNs.
41 Even personnel without special programming skills should be able to quickly and easily exchange a POWERLINK station.
IP addressing
If a POWERLINK node supports IP (Internet Protocol), then the last position in the IP address43 corresponds to the
node number:
■ 192.168.100.NodeID
A gateway is required in order to access this IP address from outside the POWERLINK network. The gateway remaps
the IP address using NAT (Network Address Translation).
4) Open System Diagnostics Manager (SDM). What clues can be gathered here (hardware view, diagnostic data
points, logger)?
5) Maybe open the logger for better readability, as well as the hardware comparison window in Automation Studio
(Online / Compare / Hardware).
6) Now set the node number of (formerly) CN1 to "2" and switch both CNs (formerly CN1 and CN2) off and back on.
8) Perform a network capture with Wireshark and interpret the results of a startup phase.
The SDM overview provides an excellent starting point. Missing modules can quickly be identified in the
hardware view. Troubleshooting is particularly tricky if a node number is assigned twice in the POWER-
LINK network because of the irritating side-effects this causes. If you loose track, it may help to connect
devices to the network successively one at a time.
A systematic approach is absolutely essential for fast error diagnosis. To do this, you can gradually move from a su-
perficial approach for diagnosis to more detailed examination. Depending on the complexity of the error, appropriate
tools are used. The following procedure is recommended:
Step 1: Check the state of the CNs / verify successful startup
• Look at S/E and L/A LEDs
• Remote diagnostics with System Diagnostics Manager (SDM): ModuleOk" data point
• Remote diagnostics with Automation Studio: "ModuleOk" data point
43 In a POWERLINK segment the IP address always starts with 192.168.100.xxx.
POWERLINK – DIAGNOSTICS 45
• Minimum layout
° Reproduce error with minimum number of nodes
° Add CNs one at a time until error occurs
Most errors encountered in a POWERLINK network can be efficiently diagnosed using this method.
46 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Early in the process of designing a POWERLINK application, it is important to clearly define and verify the requirements
to be achieved by the network that connects the electronic components to one another. The more complex the network
and the higher the performance requirements of the application, the more essential this preparation becomes.
A POWERLINK network is self-contained and is not permitted to be connected directly to another net-
work.
Routing and addressing mechanisms are used to interface between multiple IP-based networks. These are described
in Automation Help under:
The cycle time is defined as the time between two SoC (Start of Cyclic) frames. The SoC is sent by the MN to mark the
beginning of a new POWERLINK cycle and synchronize all the stations in the network (see Fig. 4 "POWERLINK cycle"
on page 10).
The parameter "Cycle time" is included in the MN settings in the configuration tool (e.g. Automation Studio). The cor-
responding object number in the OD is 0x1006.
The shortest possible cycle time depends on the following parameters:
■ Number of nodes
■ Volume of cyclic data per node
■ Operating modes of individual nodes (3.2.2 "Isochronous phase" on page 11)
■ Maximum size44 of asynchronous frames (5.1.5 "Asynchronous MTU size (MN parameter)" on page 52)
■ Network latency (topology, hubs, cable length)
MN CN
PRes
These parameters can be used to calculate the cycle time. For additional information, see 5.1.2.1 "Esti-
mated cycle time requirements"
If you at least know the number and type of nodes in the POWERLINK network, you can quickly estimate the fastest
possible cycle time by using the following simplified assumptions:
Figure 38: Simplified formula for calculating the POWERLINK cycle time
IPG Interpacket gap (960 ns); mandatory pause time between two Ethernet frames (according to IEEE 802.3)
Hub level Number of hubs between MN and observed CN (not counting interface on CN itself)
The diagram of the frames in a POWERLINK cycle is a helpful reference when performing this calculation (see Fig. 4
"POWERLINK cycle" on page 10).
Example calculation:
• Network layout:
1 CN receives 30 bytes, sends 136 bytes and is connected via an extra hub.
• Estimation of the shortest possible POWERLINK cycle time:
TCycle Min = 40 µs + 6 µs (PReq) + (6 µs + 8 µs) (PRes) + 3 µs (hub) = 63 µs
In Automation Studio the cycle time is set on the MN POWERLINK interface as shown in the following image:
The minimum cycle time value can be calculated for the topology in System Designer using the Hardware Configura-
tion Analyzer function:
More detailed information and explanations regarding the relationship between topology and timing can also be found
in Automation Help.
This parameter depends on the topology of the network (cable lengths and hubs/switches increase la-
tency).
A line topology ("daisy chain") also includes an integrated hub for each controlled node (see Fig. 37 "Typ-
ical topology of a POWERLINK network" on page 46).
Generally, the ASndMaxLatency value is the same as the PResMaxLatency value for a given station. In
this case, the asynchronous timeout can be set to the highest PRes timeout value in the network (CN
parameter in Automation Studio), since this value also accounts for topology-related delays46.
The parameter "Asynchronous timeout" is included in the MN settings in the configuration tool (e.g. Automation Stu-
dio). The corresponding object number in the MN's OD is 0x1F8A/0x02 and is called "AsyncSlotTimeout" in the POW-
ERLINK specification.
Settings in Automation Studio
Section 5.2 "Automation Studio settings for network timing" on page 53 describes where to find this parameter
in Automation Studio.
46 The difference in frame size between PRes and ASnd is not accounted for.
POWERLINK - DESIGN AND OPTIMIZATION 51
This parameter depends on the topology of the network (cable lengths and hubs/switches increase la-
tency).
The asynchronous MTU47 size defines the maximum payload in bytes that an Ethernet frame in the POWERLINK asyn-
chronous phase is permitted to have.
The parameter "Asynchronous MTU size" is included in the MN settings in the configuration tool (e.g. Automation
Studio). The corresponding object number in the OD (of the MN or CN) is 0x1F98/0x08 and is called "AsyncMTU" in
the POWERLINK specification.
If a network is to be operated with short cycle times, this parameter must not be set too high. The lowest possible
setting is 300 bytes. If, on the other hand, a larger asynchronous throughput is more important for a particular appli-
cation, then the parameter should be set higher (max. 150048 bytes).
CNs monitor the precision of the SoC frames sent by the MN. If an SoC is not received within a defined tolerance, it
is considered lost. The parameter "Loss of SoC tolerance" must therefore be set depending on the performance of
the MN.
The parameter "Loss of SOC tolerance" is included in the MN settings in the configuration tool (e.g. Automation Studio).
The corresponding object number in the CN's OD is 0x1C14.
48 Some IP stacks (on the CN) only support a standard Ethernet MTU of 1500 bytes. In this case, the value must be adjusted accordingly.
POWERLINK - DESIGN AND OPTIMIZATION 53
This parameter should be set to a higher value (more than 2x the cycle time) if the POWERLINK MN is
running on a non-real-time system (e.g. openPOWERLINK under Windows XP). On a real-time capable
system like Linux/RTPREEMPT, it can be lowered to improve error monitoring performance.
With the B&R system, this value is not relevant due to the high-performance MN architecture and there-
fore cannot be set.
The following images show where you can find the POWERLINK timing parameters in Automation Studio.
Further information can be found in Automation Help:
MN parameters
CN parameters
3) Fix the incorrect "Response timeout" value. The new value must be higher than the calculated minimum value.
Use the Hardware Configuration Analyzer to detect and resolve configuration errors before the project
is transfered to the target system. In order to do this, the actual network topology must be represented
in accurately in System Designer.
1) Observe the "CycleIdleTime" data point on the POWERLINK MN interface (monitor mode).
POWERLINK - DESIGN AND OPTIMIZATION 55
The "CycleIdleTime" data point can be used to check the utilization of the POWERLINK network in SDM
or Automation Studio. This practical technique can be used in combination with the calculation of the
theoretical cycle time.
3) The "Time" column shows the time until the next SoC frame.
7) After the MN is restarted (automatically), check the cycle time with Wireshark.
56 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Wireshark can be used to measure timing. However, the displayed timestamps can only be relied on when
additional hardware support is used (X20ET8819). Be sure to account for network topology and hub level
in your measurements.
In Automation Studio, the mapping is further abstracted and is configured in the background. All one sees is a bus
station's cyclically transferred object, which can be linked to a process variable. This is not a direct link – it requires
a number of intermediate steps.
MN to CN connection
When a POWERLINK node is added to an Automation Stu-
dio project, its cyclic data points are available in the I/O
mapping49. For non-B&R devices, the channel name in the
I/O mapping also includes the object number.
With POWERLINK, an I/O mapping channel corresponds to a specific (cyclically) transferred object that
exists on the selected node. All activated I/O mapping channels for CNs are summarized in the "process
image" on the MN.
The two process images (input and output process image) serve as the interface to the PLC application.
The cyclic objects of a POWERLINK node never actually exist in the object dictionary of another node (e.g. the MN), they
are simply represented in its local memory (see Fig. 13 "The content of mapping objects defines correlation between
network and application" on page 20).
Automation Studio / Automation Runtime handle all of the configurations required for an OPERATIONAL CN to transfer
cyclic objects to the MN application.
Configuration set in the background by the MN:
■ Connection of frame data to object: CN mapping
■ Connection of frame data to process image: MN mapping
■ Enable programming access (MN): Connection of process variable to process image
For additional information about the POWERLINK node configuration in Automation Studio, see the help documenta-
tion. The explanations in sections below apply to both 3rd-party devices and B&R devices.
CN to CN - Direct cross-communication
In Automation Studio, a cross-communication link (CN to CN) can be established with little effort. The CNs are con-
figured via Automation Runtime. The procedure presented in the help documentation applies to other nodes besides
the described iCNs:
In a data link with cross-communication, an (RPDO) frame error – caused by electromagnetic interference,
for example – can only be detected by the application. Such an application might take the form of a
cyclically incremented counter that is also contained in the PDO and is monitored by the receiving node.
With a normal PReq-PRes data link, a (repeated) frame error would cause a state change in the MN or CN.
49 For CNs that support dynamic mapping, a cyclic channel must first be activated in the I/O configuration.
POWERLINK - DESIGN AND OPTIMIZATION 57
A POWERLINK offers numerous parameters that can influence the performance of the network. This section will intro-
duce and describe the most important parameters.
The following Automation Studio settings can be used to shorten the POWERLINK cycle time or increase the maximum
number of nodes (CNs participating in the full cycle) in a POWERLINK network.
5.4.1.1 Multiplexing
Multiplexing prescaler (MN parameters)
This parameter defines the prescaler for multiplexing stations. It determines the number of POWERLINK cycles across
which the multiplexed nodes should be distributed. A value of 3 means that a multiplexing CN is addressed in every
third cycle (see "Multiplexing" on page 13). The number of multiplexed stations is divided by the multiplexing prescaler,
and the result is rounded up to the next whole number. This results in the number of multiplexed stations per cycle.
If you multiply the multiplexing prescaler by the POWERLINK cycle time, the result is the "cycle time of a multiplexing
node", i.e. the time it takes to update the data of a node for which multiplexing is activated.
This parameter is only available if the MN supports multiplexing.
Multiplexed station (CN parameters)
Multiplexed mode is activated for each CN individually as shown below.
Automation Studio automatically calculates the multiplexing slot in which a CN is addressed. The slot can also be
defined manually under the "Advanced multiplexing" settings.
This parameter is only available if the CN and MN both support this mode.
58 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Poll response chaining is activated for each CN individually as shown below. This parameter is only available if the CN
and MN both support this mode.
For additional information about PRes chaining, see the POWERLINK specification and Automation Help.
5.4.1.3Direct cross-traffic
Another way to reduce the required POWERLINK cycle time is using direct cross-traffic (see "Direct cross-traffic" on
page 12) for CN-to-CN communication. An example of an application using direct cross-traffic is for motor control in
cases where a drive needs to read the position of a master axis to synchronize movement of coupled axes.
Data path:
1) The first CN (bus controller with AI module) sends analog input data to the MN in the PRes frame.
2) The MN receives the data and makes it available to its application in a process image.
3) The process image is mapped to a process variable.
4) The contents of the process variable for the analog input module (AI) are copied to the process variable for the
analog output module (AO) in a task.
5) The AO process variable is mapped to the process image for the AO module.
6) The MN sends the AO data to the second CN (bus controller with AO module) in the PReq frame.
Direct CN to CN communication
This data path via the MN can be eliminated by having the CNs communicate with each other directly.
60 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
With the right configuration, a PRes frame can be received by any other CN in the network. This configuration of a
"monitoring" node generally takes place during startup, but can also occur later while the node is in the OPERATIONAL
state. The path taken by the data is reduced to a single step, as shown in the image above (Fig. 49 "Direct CN to CN
connection").
Data path:
1) The first CN (bus controller with AI module) sends analog input data to the MN in the PRes frame, and the second
CN (bus controller with AO module) receives the data.
The mapping of a "monitoring" CN needs to be configured (on the MN) so that it successfully links the
received PRes data to the AO module. A cyclic data connection to the MN does not exist here, however.
Figure 50: Panel elements and their data points in the AS sample project "POWERLINK_ETA"
1) Start Automation Studio project "POWERLINK_ETA" and transfer the project to the PLC50
4) Force data point AnalogOutput02 in the I/O mapping of the X20AO4622 module using any values
6) Compare with your own project and examine the path taken by the analog data using Fig. 48 "CN to CN connec-
tion via the MN" on page 59 as a reference.
7) Force data point AnalogOutput01 in the I/O mapping of the X20AO4622 module. Why is this not possible?
Note: The process variable entered in the I/O mapping is AnalogInput01 of module X20AI4622, but is not a PLC
variable like in the previous case. Compare with Fig. 49 "Direct CN to CN connection" on page 60 .
8) Change the I/O mapping so that the lower seven-segment display also receives the data from potentiometer P1,
which is connected to module X20AI4622. Here, direct cross-traffic is to be used as the connection type:
The POWERLINK connection between analog input 2 and analog output 2 goes through the MN and can
therefore be influenced by the MN. The (already digitalized) data take the following path:
■ X20AI4622 / X2X / Bus controller A / PRes / MN / PLC task / MN: PReq / Bus controller B / X2X /
X20AO4622
In contrast, the direct connection (with direct cross-traffic) between AI1 and AO1 cannot be influenced
by the MN since the data never passes through it. The data takes the following path:
■ X20AI4622 / X2X / Bus controller A / PRes / Bus controller B / X2X / X20AO4622
1) Change the connection between AnalogInput02 and AnalogOutput02 in the Automation Studio project "POWER-
LINK_ETA" back to a CN-MN-CN path (no direct cross-traffic, see Fig. 48 "CN to CN connection via the MN").
3) Interrupt the CN-MN-CN data path by stopping the copy process on the MN (PLC). To do this, open the Watch
window for the object "CopyAItoAO" and stop cyclic execution.
The MN periodically sends the latest output data value to CN2. From POWERLINK's point of view, data
transfer works fine, but the output data is no longer updated by the PLC. In the Watch window you can
see that only the input data (AnalogInput) is being updated.
In order to complete this exercise, you must first work through section 4.1.5 "Wireshark".
Trace the path of cyclic data (PDOs) between two CNs in Wireshark. Compare two different approaches, each involving
different POWERLINK frames in the data link. Also observe the effects on the shortest possible cycle time.
POWERLINK - DESIGN AND OPTIMIZATION 63
2) Compare the two captures Direkt_Crosslink.pcap (from previous exercise) and Link_over_MN.pcap.
When there is direct cross-communication between two CNs without a "detour" through the MN, no data
is sent in the PReq frame to the "output data bus controller", since it gets all the data it needs straight
from the PRes frame of the "input data bus controller". Only the minimum size of the PReq frame needs
to be sent to the bus controller, since it contains no data.
Direct cross-traffic can therefore have a very positive effect on the overall system:
■ Node-to-node response time decreases
■ Theoretically required cycle time decreases
■ Increases max. number of CNs in the POWERLINK network
■ Reduces the load on the MN because it does not have to copy the data
The best use of direct cross-traffic is obtained in combination with 5.4.1.2 "Poll response chaining" or
with several cross-traffic connections with poll response chaining for the transmitting and Multiplexing
for the receiving nodes.
For a more detailed explanation of this POWERLINK extension, see section 3.2.3 "Asynchronous phase" on page 14.
Asynchronous slots per cycle (MN parameter)
This parameter can be used to increase the number of asynchronous frames that can be sent per cycle.
An additional asynchronous frame in the POWERLINK cycle can only be transmitted by a node that sup-
ports Multiple ASnd. The MN must also support the feature of course.
The way these components interact can be optimized for the needs of a particular application using various settings
in Automation Studio.
The following image shows the numbered individual steps that add up to the overall system response time (total
latency). For additional information, see Automation Help.
Latency optimization
Automation Studio offers a number of ways to reduce the overall response time of a PLC system. These configuration
parameters and the effect they have on the system are described in Automation Help (see previous help documentation
link). The direction of data transfer (e.g. for input/output latency) is specified from the perspective of the PLC.
For these settings to have an effect, it is important that all cyclic processes are synchronized, i.e. that all
cycle times are whole number factors or multiples of each other.
Automation Runtime system timer must also be synchronized with the POWERLINK cycle.
Most of these configuration parameters are only available for B&R devices and are not included in the POWERLINK
specification, since their influence extends beyond the POWERLINK network.
Synchronization of the overall system
For a detailed description of synchronization between the individual system components and their hardware depen-
dencies, see Automation Help under:
With SG4 target systems, for example, task classes are synchronized with the POWERLINK network using the settings
under <CPU> → Settings → Timing → System timer.
POWERLINK - DESIGN AND OPTIMIZATION 65
Figure 52: Synchronizing tasks with the POWERLINK network in SG4 systems
Optimization limits
Optimizing latency always comes at the cost of available CPU processing time and the size of frames that can be
transferred in a single bus cycle. In other words, the latency can only be optimized if a task is not very time-intensive
and the volume of data to be transferred in each cycle is not to large.
Where the limit lies here depends strongly on the application and can therefore only be determined in practical situ-
ations.
Generally, you have to choose between an optimal response time and stable synchronization of stations
with the POWERLINK cycle.
66 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Every device with a POWERLINK interface must include a description of its char-
acteristics in the form of an XML device description (XDD) file.
This file can be interpreted by a configuration tool in order to configure the indi-
vidual nodes and in turn the entire POWERLINK network (from the MN).
The XDD file describes the object dictionary and other network and device parameters of the respective
POWERLINK node.
The XDD file is comparable to the configuration files for other bus systems:
■ GSD: PROFIBUS
■ EDS: (CANopen, DeviceNet)
The format is standardized. Sample files and additional information are available on the EPSG website (www.ether-
net-powerlink.org) and in Automation Help:
XDD checker
It is possible to have an XDD file checked for errors. You can upload a file to the EPSG website and receive an email
listing any errors that are found.
■ www.ethernet-powerlink.org / Service
3) Import the XDD file. See section of Automation Help referenced above. Here you will find a description of how to
import an XDD file into Automation Studio.
5) Check the POWERLINK status of the rotary encoder using the S/E LED.
6) Rotate the encoder shaft and observe changes to the input data (monitor mode)
Automation Studio's XDD import feature makes it easy to integrate 3rd-party devices in the POWERLINK
network. The XDD file must be obtained from the manufacturer of the device.
1) Why does not a cyclic data channel need to be activated in Automation Studio for the rotary encoder?
2) Why are the mapping objects (see Tab. 6 "Object range for PDO mapping objects." on page 19) not written during
startup (perform Wireshark trace)?
3) What does the write access to object 0x1010/0x01 with the content "Save" mean52 (according to the POWERLINK
specification)?
4) What does the write access to object 0x1011/0x01 with the content "Load" mean (according to the POWERLINK
specification)?
If a device is made of several different and replaceable modules that transfer their data via POWERLINK, it is possible to
describe each module with a separate file. The configuration tool imports more than just an XDD alone; it also imports
modular XDD files of all "child modules" as well as the "head station" as can be seen in Fig. 53 .
Modular XDDs for the X20 system can be found here:
■ www.br-automation.com / Downloads / Control and I/O systems / X20 system / Bus controller / X20BC0083 /
Fieldbus device description files
Figure 53: Example for the description of modular devices with XDD files
52 In order to observe access to 0x1010 in the Wireshark trace, you may first have to use the AsEPL library in Automation Studio to write the object 0x1011/0x01 with the content
"load" and then turn the node off/on. This can happen as described in "Exercise: Read objects using the SDO protocol." on page 32, with SDO write access instead of SDO read
access.
68 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
Modular XDD files are used to import modular 3rd-party devices to any configuration tool. The X20 system
can be used as a CN with an openPOWERLINK-based MN, for example.
As can be seen in the following image, individual XDD files of various CNs can be imported to a configuration tool
whereby an overall network configuration is created. In the example with an openPOWERLINK MN, the configuration
tool is called "openConfigurator". If a B&R MN were used, then the configuration tool would be Automation Studio.
The configuration is provided to the openPOWERLINK MN as a CDC file in order to write the CNs' parameters (objects)
using the SDO protocol and configure the network.
Figure 54: XDD application example: Configuring a POWERLINK network with an openPOWERLINK MN
6.4.1 openPOWERLINK
openPOWERLINK is an open source implementation of the POWERLINK protocol that can be used either as a managing
node (MN) or a controlled node (CN). This implementation of the POWERLINK protocol is also called a "protocol stack"
or simply "stack". The openPOWERLINK stack was developed as a generic implementation that can easily be ported to
various hardware and software platforms. The Intel PC architecture (x86) under GNU/Linux is used as the reference
platform for openPOWERLINK. Ported versions are available for Windows, VxWorks and FPGA platforms, among others.
openPOWERLINK can be downloaded here:
■ http://sourceforge.net/projects/openpowerlink/
6.4.2 CODESYS
A POWERLINK MN can also be implemented using the CODESYS tool chain and specific PLC manufacturers.
7 Summary
Although Automation Studio makes working with the POWERLINK protocol exceptionally easy, the full benefit of this
powerful technology can only be enjoyed with a more comprehensive understanding of its inner workings. That was
the motivation for creating this training module. The better you understand the processes involved, the faster you
will be able to set up and optimize a POWERLINK network, and the more effectively you will be able use the available
diagnostic tools.
When you begin troubleshooting, it is best to try the most basic diagnostic features first. These include the LEDs on
each POWERLINK node as well as the messages and data points that are provided in Automation Studio or System
Diagnostics Manager.
If these approaches are unsuccessful, the next course of action is a more detailed network capture. Further analysis
is then generally conducted by the device manufacturer on the basis of this capture. It is important for the actual
network behavior to be reflected with precise timing. This ensures that further analysis based on the capture will lead
to successful results.
70 POWERLINK CONFIGURATION AND DIAGNOSTICS TM950
"Exercise: Questions regarding integration of a rotary encoder in a POWERLINK network " on page 67
1) The rotary encoder uses a preconfigured mapping that cannot be modified, also called a "static mapping". A data
channel must only be activated in the I/O configuration if the mapping of the node can be configured dynamical-
ly, like the bus controller for example.
2) Reason: Also static mapping. The mapping is not modified; it is already provided.
3) See POWERLINK specification "EPSG DS 301 V1.x.x - Communication Profile Specification": Save the current val-
ues of all parameters that can be saved in nonvolatile memory for later use. This means these parameters will not
have to be reconfigured via SDO and instead can be loaded automatically at the next startup.
4) See POWERLINK specification "EPSG DS 301 V1.x.x - Communication Profile Specification": Load the default con-
figuration for parameters that can be saved in nonvolatile memory. This resets the node configuration. The de-
fault configuration is not activated until the node is restarted.
AUTOMATION ACADEMY 71
Automation Academy
Your knowledge advantage
The Automation Academy provides targeted training courses for our customers as well as for our own employees.
Expand your skills in the field of automation technology and learn to independently implement efficient automation
solutions using B&R systems.
Classroom learning
B&R offers standard seminars at all B&R locations. Services include seminar documents, effective communication of
training course content by experienced trainers and an Automation Diploma. A combination of group work and self-
study provides the high level of flexibility needed to maximize the learning experience.
Virtual classroom
Remote Lectures supplement B&R's continuing education portfolio with a virtual classroom, offering an alternative to
our on-site seminars. Selected content from our standard seminars is offered online. In addition to remote learning
methods, powerful simulation tools and secure remote maintenance are used.
Online courses
Take control of the content and learn at your own pace. With B&R online courses, you can take your first steps in the
world of B&R automation at any time. Based on a comprehensive narrative, you will independently work out how to use
our products. The mix of different media allows a logical sequence to be followed when learning as well as a targeted
choice of information to be used as a reference.
Contact
Would you like additional training? Are you interested in finding out what the B&R Automation Academy has to offer?
If so, this is the right place.
Access additional information here:
https://www.br-automation.com/de/academy/
br-automation.com