...
The EtherCAT specification requires this Sync Manager usage:
Sync Manager Usage
Sync Manager | Name | Direction | Master view | Slave view | PDO |
0 | Mailbox Write | M -> S | Output | Consumer |
|
1 | Mailbox Read | S -> M | Input | Producer |
|
2 | Process Data Write | M -> S | Output | Consumer | RxPDO |
3 | Process Data Read | S -> M | Input | Producer | TxPDO |
Input Only slaves can use Sync Manager 2 as Input.
...
This protocol allows to access a CANopen object dictionary. CANopen is a common field bus based on CAN. CoE allows to organize the acyclic data in an object dictionary. The object Dictionary is divided into different areas.
CoE Object Dictionary
Index range | Area |
0x0000 - 0x0FFF | Data Type Area |
0x1000 - 0x1FFF | CoE Communication Area |
0x2000 - 0x5FFF | Manufacturer Specific Area |
0x6000 - 0xFFFF | Profile Area |
Just like in CANopen there are services to upload and download these objects also known as SDOs (Service Data Objects). The slave can also send an Emergency message to the master to propagate local errors. In contrast to CANopen a CoE message is not limited to 8 bytes, thus allowing a more efficient data transfer. Additionally the SDO Info Service is provided that enables the master to completely read all meta information about all objects. CoE also introduces Complete Access. This method can be used to upload or download all sub-indices of an object at once. If an object does not fit into a mailbox, it can be exchanged via Segmented SDO transfer.
There are special objects reserved to define the PDO mapping. A PDO (Process Data Object) determines which objects are cyclically transfered as process data. There are special PDO mapping objects. Each object can have several entries. Each entry defines the index, sub-index and bit size of an object that is used for process data.
PDO mapping objects
Index range | PDO | Direction |
0x1600 - 0x17FF | RxPDO | M -> S |
0x1A00 - 0x1B00 | TxPDO | S -> M |
Each Sync Manager has a PDO Assignment Object (0x1C10 - 0x1C2F). Its entries list the PDO Mapping objects that are assigned to a Sync Manager.
Sync Manager Assignment objects
Sync Manager | Name | Direction | PDO Assignment Object |
2 | Process Data Write | M -> S | 0x1C12 |
3 | Process Data Read | S -> M | 0x1C13 |
...
Figure 4: PDO Mapping in EtherCAT
...
Slave behavior in all EtherCAT states
State | Symbol | configured by master | slave behavior |
Init | INIT | - | initial state (power up) |
Pre-Operational | PreOP | Mailboxes | acyclic communication possible |
Safe-Operational | SafeOP | Input Sync Manager | send process data |
Operational | OP | Output Sync Manager | process received process data |
Bootstrap (optional) | BOOT | Mailboxes (Boot mode) | Boot mode (firmware update) |
Not all state transition are possible. The following figure shows all allowed transitions.
Figure 5: EtherCAT State Machine
...
If an ESC IP Core is implemented into an FPGA it might be connected to a Soft-CPU via a 32bit memory bus. There are buses that do not allow byte access. Since most ESC events are cleared by reading a register, it might be possible that an ESC event is accidentally cleared without processing it. If this feature is enabled in the IP Core ESC, events can only be cleared by writing the corresponding ESC register or memory.
Introduction to CC-Link IE TSN
CC Link IE TSN is an ethernet based industrial communication stack. It is based on earlier CC Link IE concepts, uniting them with the ideas of time synchronized networking (TSN). The standards are maintained by the CC Link Partners Association (CLPA).
In a CC-Link IE TSN network, all stations perform time synchronization using either PTP IEEE1588v2 or gPTP IEEE802.1AS. The time synchronization is performed in the initialization sequence and periodically during the runtime sequence.
Communications are performed with the communication cycle divided into time slots as a time sharing method. Settings related to the time sharing method are configured once in the initialization sequence.
...
Communication
Cycle
...
Time
slot
...
Cycle
start
offset
...
Cycle end
offset
...
Available Ethernet frame for communications
...
EtherType
...
Category
...
10 ms
...
TSLT1
...
0 ms
...
5 ms
...
0x890F
...
CC-Link IE TSN network
...
...
TSLT2
...
5 ms
...
6 ms
...
0x88F7
...
Time synchronization
...
...
TSLT0
...
6 ms
...
10 ms
...
All others
...
IP communication (such as SLMP,
CC-Link IE Field Network Basic), etc.
Table 3: Example of time slots in a cycle
In this example Tslt1 is used for the cyclic communication, Tslt2 for the time synchronization and Tslt0 for everything else. Length and order of the timeslots can be configured as needed, but the catch all timeslot is usually last. Some extras, such as guard banding etc. are also possible options.
All devices taking part in the cyclic communication will observe these timeslots. Common start time of the timeslots is ensured by the time synchronization.
Note: 10ms is only for the example, cycle times are usually lower.
Central Concepts
SLMP
SLMP (Seamless Messaging Protocol) is a protocol used to implement communication between applications seamlessly without awareness of the network hierarchy and boundaries. It is often used in communication between the CC-Link family network and other general-purpose Ethernet devices.
SLMP messages are defined as payload, using a lower level network service such as TCP/IP, UDP or CC Link IE TSN as transport layer. In the port CC Link IE TSN implementation, SLMP is provided by GOAL and uses UDP.
The CC Link IS TSN stack uses SLMP messages extensively for the setup process.
TSN
Two methods for time synchronization are supported by CC Link IE TSN:
PTP, described in IEEE1588v2
gPTP, described in IEEE802.1AS
Both methods used timestamped ethernet frames to determine delays and derive a timestamp that is the same on all devices in the system. In the port CC Link IE TSN implementation, they are provided by the underlying GOAL runtime. For both methods, the ethernet controller of the hardware needs to support time stamping of incoming and outgoing frames. For gPTP, two hardware clocks should be provided, though the implementation in GOAL also works with just one.
Qbv
While TSN ensures common starttime of cycles, another mechanism is needed to ensure messages are only sent inside of the corresponding timeslots. For each message to be sent, it must always be checked if the timeslot is open and if the message can be fully transmitted inside of it. If not, the message must be queued for the next transmission cycle.
Every time a timeslot opens, it will check if there are queued message to be sent.
This is standardized in IEEE802.1Qbv. Qbv can be supported by hardware or simulated in software. The software variant requires calculation effort that often makes it only usable for Class A devices.
Link Devices
The data that is transferred, is locally organized in so-called link devices. These differentiate by direction and by data type.
...
Name
...
Size of an element
...
Direction
...
Content
...
...
RX
...
1 Bit
...
To Master
...
Input
...
Digital, “Points”
...
RY
...
1 Bit
...
To Remote Station
...
Output
...
Digital, “Points”
...
RWr
...
2 Byte
...
To Master
...
Input
...
Compound Data, “Words”
...
RWw
...
2 Byte
...
To Remote Station
...
Output
...
Compound Data, “Words”
...
Safety In
...
...
...
Input
...
*
...
Safety Out
...
...
...
Output
...
*
...
Statusword
...
8 Byte
...
To Master
...
...
Status Information
(standardized content)
Table 4: Overview of link devices
*not yet supported
Remote Stations provide data in link devices with predefined sizes, positions and meaning. The master device selects data for cyclic transfer from the available link devices by defining payloads during the communication setup.
The statusword link device is standardized data provided only in the direction from remote stations to the master. It contains predefined bit data concerning the status of the remote station and its cyclic connection.